babel-plugin-ignore-html-and-css-imports
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -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 @@ } |
{ | ||
"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", |
11914
17
221