Socket
Socket
Sign inDemoInstall

babili-webpack-plugin

Package Overview
Dependencies
74
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.5 to 0.0.6

yarn.lock

20

lib/index.js
"use strict";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -12,11 +12,9 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

var _require = require("webpack-sources");
var _require = require("webpack-sources"),
SourceMapSource = _require.SourceMapSource,
RawSource = _require.RawSource;
var SourceMapSource = _require.SourceMapSource;
var RawSource = _require.RawSource;
module.exports = function () {
function BabiliPlugin() {
var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

@@ -32,2 +30,3 @@ _classCallCheck(this, BabiliPlugin);

var options = this.options;
var jsregex = options.test || /\.js($|\?)/i;

@@ -38,2 +37,5 @@ var commentsRegex = typeof options.comments === "undefined" ? /@preserve|@license/ : options.comments;

var _babel = this.options.babel || babel;
var _babili = this.options.babili || babiliPreset;
compiler.plugin("compilation", function (compilation) {

@@ -87,4 +89,4 @@ if (useSourceMap) {

// do the transformation
var result = babel.transform(input, {
presets: [babiliPreset],
var result = _babel.transform(input, {
presets: [_babili],
sourceMaps: useSourceMap,

@@ -91,0 +93,0 @@ babelrc: false,

{
"name": "babili-webpack-plugin",
"version": "0.0.5",
"version": "0.0.6",
"description": "Babili Plugin for Webpack",

@@ -23,10 +23,10 @@ "main": "lib/index.js",

"dependencies": {
"babel-core": "^6.14.0",
"babel-preset-babili": "0.0.4",
"babel-core": "^6.18.0",
"babel-preset-babili": "^0.0.5",
"webpack-sources": "^0.1.2"
},
"devDependencies": {
"babel-cli": "^6.14.0",
"babel-cli": "^6.18.0",
"babel-preset-es2015": "^6.14.0",
"eslint": "^3.3.1",
"eslint": "^3.8.0",
"expect": "^1.20.2",

@@ -33,0 +33,0 @@ "mocha": "^3.0.2",

@@ -9,3 +9,3 @@ # babili-webpack-plugin

This might NOT be the best way to use babili. You can also use it with babel-loader for webpack (include `babili` in list of presets) and should be faster than using this.
This might NOT be the best way to use babili. You can also use it with babel-loader for webpack (include `babili` in list of presets) and should be faster than using this. Further info - [#8](https://github.com/boopathi/babili-webpack-plugin/issues/8).

@@ -39,2 +39,4 @@ [![Build Status](https://travis-ci.org/boopathi/babili-webpack-plugin.svg?branch=master)](https://travis-ci.org/boopathi/babili-webpack-plugin) [![npm version](https://badge.fury.io/js/babili-webpack-plugin.svg)](https://badge.fury.io/js/babili-webpack-plugin)

+ `sourceMap`: Default: uses [webpackConfig.devtool](https://webpack.github.io/docs/configuration.html#devtool). Set this to override that.
+ `babel`: Pass in a custom babel-core instead. `require("babel-core")`
+ `babili`: Pass in a custom babili preset instead - `require("babel-preset-babili")`.

@@ -41,0 +43,0 @@ ## LICENSE

@@ -14,2 +14,3 @@ "use strict";

const options = this.options;
const jsregex = options.test || /\.js($|\?)/i;

@@ -24,2 +25,5 @@ const commentsRegex = typeof options.comments === "undefined"

const _babel = this.options.babel || babel;
const _babili = this.options.babili || babiliPreset;
compiler.plugin("compilation", function (compilation) {

@@ -68,4 +72,4 @@ if (useSourceMap) {

// do the transformation
const result = babel.transform(input, {
presets: [babiliPreset],
const result = _babel.transform(input, {
presets: [_babili],
sourceMaps: useSourceMap,

@@ -72,0 +76,0 @@ babelrc: false,

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc