You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

babel-plugin-ignore-html-and-css-imports

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-ignore-html-and-css-imports - npm Package Compare versions

Comparing version

to
0.0.2

.history/package_20170922185252.json

10

lib/index.js

@@ -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 @@ }

2

package.json
{
"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",