hast-util-from-parse5
Advanced tools
Comparing version 4.0.0 to 4.0.1
{ | ||
"name": "hast-util-from-parse5", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Transform Parse5’s AST to HAST", | ||
@@ -28,5 +28,2 @@ "license": "MIT", | ||
"devDependencies": { | ||
"babel-core": "^6.26.3", | ||
"babel-preset-env": "^1.7.0", | ||
"babelify": "^8.0.0", | ||
"browserify": "^16.0.0", | ||
@@ -42,2 +39,3 @@ "esmangle": "^1.0.1", | ||
"tape": "^4.0.0", | ||
"tinyify": "^2.4.3", | ||
"to-vfile": "^5.0.0", | ||
@@ -49,4 +47,4 @@ "unist-util-visit": "^1.1.3", | ||
"format": "remark . -qfo && prettier --write '**/*.js' && xo --fix", | ||
"build-bundle": "browserify index.js --bare -s hastUtilFromParse5 -g [ babelify --presets [ \"babel-preset-env\" ] ] > hast-util-from-parse5.js", | ||
"build-mangle": "esmangle hast-util-from-parse5.js > hast-util-from-parse5.min.js", | ||
"build-bundle": "browserify index.js -s hastUtilFromParse5 > hast-util-from-parse5.js", | ||
"build-mangle": "browserify index.js -p tinyify -s hastUtilFromParse5 > hast-util-from-parse5.min.js", | ||
"build": "npm run build-bundle && npm run build-mangle", | ||
@@ -53,0 +51,0 @@ "test-api": "node test", |
@@ -54,3 +54,3 @@ # hast-util-from-parse5 [![Build Status][travis-badge]][travis] [![Coverage Status][codecov-badge]][codecov] | ||
### `toParse5(ast[, options])` | ||
### `fromParse5(ast[, options])` | ||
@@ -63,2 +63,10 @@ Transform an `ASTNode` to a [HAST Node][node]. | ||
###### `options.space` | ||
Whether the root of the given tree is in the `'html'` or `'svg'` space (enum, | ||
`'svg'` or `'html'`, default: `'html'`). | ||
If an `svg` element is found in the HTML space, `toHTML` automatically switches | ||
to the SVG space when entering the element, and switches back when leaving. | ||
###### `options.file` | ||
@@ -65,0 +73,0 @@ |
12368
14
168