babel-plugin-ignore-html-and-css-imports
Advanced tools
| { | ||
| "name": "babel-plugin-ignore-html-and-css-imports", | ||
| "version": "0.0.2", | ||
| "description": "Ignore html and css imports in your code. Useful for testing meteor without it's context", | ||
| "main": "lib/index.js", | ||
| "scripts": { | ||
| "build": "babel src --out-dir lib --copy-files", | ||
| "test": "echo \"Error: no test specified\" && exit 1" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/lgandecki/babel-plugin-ignore-html-and-css-imports.git" | ||
| }, | ||
| "keywords": [ | ||
| "babel-plugin", | ||
| "html", | ||
| "import", | ||
| "string" | ||
| ], | ||
| "author": "Łukasz Gandecki", | ||
| "license": "MIT", | ||
| "bugs": { | ||
| "url": "https://github.com/lgandecki/babel-plugin-ignore-html-and-css-importsissues" | ||
| }, | ||
| "homepage": "https://github.com/lgandecki/babel-plugin-ignore-html-and-css-imports#readme", | ||
| "devDependencies": { | ||
| "babel-cli": "^6.4.0", | ||
| "babel-preset-es2015": "^6.3.13" | ||
| } | ||
| } |
+2
-8
@@ -15,10 +15,4 @@ 'use strict'; | ||
| var node = path.node; | ||
| if (endsWith(node.source.value, '.html')) { | ||
| var dir = _path2.default.dirname(_path2.default.resolve(state.file.opts.filename)); | ||
| var absolutePath = _path2.default.resolve(dir, node.source.value); | ||
| var html = _fs2.default.readFileSync(absolutePath, "utf8"); | ||
| path.replaceWith(t.variableDeclaration("var", [t.variableDeclarator(t.identifier(node.specifiers[0].local.name), t.stringLiteral(html))])); | ||
| if (endsWith(node.source.value, '.html') || endsWith(node.source.value, '.scss') || endsWith(node.source.value, '.css')) { | ||
| path.remove(); | ||
| } | ||
@@ -25,0 +19,0 @@ } |
+1
-1
| { | ||
| "name": "babel-plugin-ignore-html-and-css-imports", | ||
| "version": "0.0.1", | ||
| "version": "0.0.2", | ||
| "description": "Ignore html and css imports in your code. Useful for testing meteor without it's context", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
11914
5.02%17
6.25%221
13.92%