Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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 0.0.1 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc