This commit is contained in:
chrosey
2017-09-13 07:52:34 +02:00
parent a1f16c37f4
commit 2340b0226b
24621 changed files with 2912161 additions and 149 deletions
+159
View File
@@ -0,0 +1,159 @@
# Changelog
## v6.4.0
### 🚀 New Feature
- added metadata passing from babel to webpack, which is currently used by react-intl (#398) @Ognian
## v6.3.2
### 😢 Regression
- `forceEnv` was interfering with regular environment handling
## v6.3.1
### 🐛 Bug Fix
- The new `forceEnv` options wasn't working as expected (#379) @chrisvasz
## v6.3.0
### 🚀 New Feature
- Add new config option `forceEnv` (#368) @moimael
Allow to override BABEL_ENV/NODE_ENV at loader-level. Useful for isomorphic applications which have separate babel config for client and server.
### 🐛 Bug Fix
- Update loader-utils dependency to ^0.2.16 to fix compatibility with webpack 2 (#371) @leonaves
### 💅 Polish
- Improve FS caching to do less sync calls which improves performance slightly (#375) @akx
## v6.2.10
Support for webpack 2.2-rc has been added in this release
### 🐛 Bug Fix
- If cache directory not writable, try to fallback to tmpdir before failing
## v6.2.9
### 😢 Regression
Source maps on windows did not work correctly with v6.2.8.
Thanks @josephst
### 🏠 Internal
- Add AppVeyor to run tests on windows @danez
- Fix tests on windows (#343) @danez
## v6.2.8
### 🐛 Bug Fix
- gzipped files should have `.gz` as the extension, not `.gzip` (#326) @bjornstar
- fix options.sourceFileName gennerate bug (#260) @creeperyang
### 📝 Documentation
- Update README docs for cacheDirectory's actual behaviour (#245) @sohkai
- updates docs re: transform-runtime (#197) @gbrassey
### 🏠 Internal
- Use eslint and nyc (#321) @danez
- Adjust travis config (#320) @danez
- Use babel to compile babel-loader (#319) @danez
## v6.2.7
### 😢 Regression
Fallback to `os.tmpdir()` if no cachedir found (#318) (fixes #317) @danez
Fixes an issue with v6.2.6 when using `babel-loader` as a global package.
## v6.2.6
### 🐛 Bug Fix
- Use standard cache dir as default `cacheDirectory` (#301) @fson
Use the common cache directory, `./node_modules/.cache/babel-loader`, as the default cache directory (when the cacheDirectory setting is enabled).
```js
query: {
cacheDirectory: true
}
```
## v6.2.5
- Don't show the call stack for a Babel error (such as when you have a syntax error)
<img width="415" alt="screenshot 2016-08-15 15 24 37" src="https://cloud.githubusercontent.com/assets/30594/17664401/727ba098-62fc-11e6-9f12-42da0cf47f14.png">
- resolve the .babelrc relative to the file path rather than the cwd (current working directory).
* fix: more concise formatting for Babel errors (#287) (Andrey Popp)
* fix(resolve-rc): resolve-rc relative file path (#253) (Luke Page)
* add babel-core and preset-2015 to dev dependencies (#273) (timse)
* chore(docs): add issue and pr templates (#280) (Joshua Wiens)
* chore(docs): fix badge formatting (Joshua Wiens)
* chore(ci): expand travis testing (#278) (Joshua Wiens)
* Update README: add env vars to cacheIdentifier (#267) (Dominik Ferber)
* add npm badge [skip ci] (Henry Zhu)
* update [skip ci] (Henry Zhu)
* remove jsx references as well [skip ci] (Henry Zhu)
* Save the transform to devDependencies (Ray Booysen)
* Remove 'react' preset (Jake Rios)
* Removed babel-preset-react from README.md (Ben Stephenson)
## v6.2.4
* change allowed peer deps (all webpack 2 beta versions)
## v6.2.3
* change allowed peer deps (2.0.7-beta)
## v6.2.2
* Update peerDependencies to accept webpack 2 [#208](https://github.com/babel/babel-loader/pull/208)
* Remove duplicated dependencies
## v6.2.0
* Pass true filenames [#106](https://github.com/babel/babel-loader/issues/106)
* Remove babel-core from devDependencies
## v6.1.0
* Merge [PR #146](https://github.com/babel/babel-loader/pull/146) Set source file name relative to options.sourceRoot
* Merge [PR #136](https://github.com/babel/babel-loader/pull/136) use container-based infrastructure for faster build
* Merge [PR #121](https://github.com/babel/babel-loader/pull/121) Make babelrc configurable
* Merge [PR #113](https://github.com/babel/babel-loader/pull/113) Include BABEL_ENV || NODE_ENV in cacheIdentifier
## v6.0.1
* Update to babel v6.
## v5.3.1
* Merge [PR #85](https://github.com/babel/babel-loader/pull/85) - Don't override sourcemap if sourcesContent already exists.
## v5.3.1
* Merge [PR #82](https://github.com/babel/babel-loader/pull/82) - Fallback global options to empty object to avoid conflicts with object-assign polyfill.
## v5.3.0
* Merge [PR #79](https://github.com/babel/babel-loader/pull/79) - This should allow babel-loader to work with [enhanced-require](https://github.com/webpack/enhanced-require).
## v5.2.0
* Include `.babelrc` file into the `cacheIdentifier` if it exists
+22
View File
@@ -0,0 +1,22 @@
Copyright (c) 2014-2016 Luís Couto <hello@luiscouto.pt>
MIT License
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+225
View File
@@ -0,0 +1,225 @@
# babel-loader
[![NPM Status](https://img.shields.io/npm/v/babel-loader.svg?style=flat)](https://www.npmjs.com/package/babel-loader)
[![Build Status](https://travis-ci.org/babel/babel-loader.svg?branch=master)](https://travis-ci.org/babel/babel-loader)
[![Build Status](https://ci.appveyor.com/api/projects/status/vgtpr2i5bykgyuqo/branch/master?svg=true)](https://ci.appveyor.com/project/danez/babel-loader/branch/master)
[![codecov](https://codecov.io/gh/babel/babel-loader/branch/master/graph/badge.svg)](https://codecov.io/gh/babel/babel-loader)
> Babel is a compiler for writing next generation JavaScript.
This package allows transpiling JavaScript files using [Babel](https://github.com/babel/babel) and [webpack](https://github.com/webpack/webpack).
__Notes:__ Issues with the output should be reported on the babel [issue tracker](https://github.com/babel/babel/issues);
## Installation
```bash
npm install babel-loader babel-core babel-preset-env webpack --save-dev
```
or
```bash
yarn add babel-loader babel-core babel-preset-env webpack --dev
```
__Note:__ [npm](https://npmjs.com) deprecated [auto-installing of peerDependencies](https://github.com/npm/npm/issues/6565) since npm@3, so required peer dependencies like babel-core and webpack must be listed explicitly in your `package.json`.
__Note:__ If you're upgrading from babel 5 to babel 6, please take a look [at this guide](https://medium.com/@malyw/how-to-update-babel-5-x-6-x-d828c230ec53#.yqxukuzdk).
## Usage
[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)
Within your webpack configuration object, you'll need to add the babel-loader to the list of modules, like so:
```javascript
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['env']
}
}
]
}
```
### Options
See the `babel` [options](http://babeljs.io/docs/usage/options/).
You can pass options to the loader by writing them as a [query string](https://github.com/webpack/loader-utils):
```javascript
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader?presets[]=env'
}
]
}
```
or by using the [query property](https://webpack.github.io/docs/using-loaders.html#query-parameters):
```javascript
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['env']
}
}
]
}
```
or by using global options:
> Be aware that this only works in webpack 1 and not in version 2.
```javascript
module: {
loaders: [
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader'
}
]
},
babel: {
presets: ['es2015']
}
```
This loader also supports the following loader-specific option:
* `cacheDirectory`: Default `false`. When set, the given directory will be used to cache the results of the loader. Future webpack builds will attempt to read from the cache to avoid needing to run the potentially expensive Babel recompilation process on each run. If the value is blank (`loader: 'babel-loader?cacheDirectory'`) or `true` (`loader: babel-loader?cacheDirectory=true`) the loader will use the default cache directory in `node_modules/.cache/babel-loader` or fallback to the default OS temporary file directory if no `node_modules` folder could be found in any root directory.
* `cacheIdentifier`: Default is a string composed by the babel-core's version, the babel-loader's version, the contents of .babelrc file if it exists and the value of the environment variable `BABEL_ENV` with a fallback to the `NODE_ENV` environment variable. This can be set to a custom value to force cache busting if the identifier changes.
* `babelrc`: Default `true`. When `false`, will ignore `.babelrc` files (except those referenced by the `extends` option).
* `forceEnv`: Default will resolve BABEL_ENV then NODE_ENV. Allow you to override BABEL_ENV/NODE_ENV at the loader level. Useful for isomorphic applications with different babel configuration for client and server.
__Note:__ The `sourceMap` option is ignored, instead sourceMaps are automatically enabled when webpack is configured to use them (via the `devtool` config option).
## Troubleshooting
### babel-loader is slow!
Make sure you are transforming as few files as possible. Because you are probably
matching `/\.js$/`, you might be transforming the `node_modules` folder or other unwanted
source.
To exclude `node_modules`, see the `exclude` option in the `loaders` config as documented above.
You can also speed up babel-loader by as much as 2x by using the `cacheDirectory` option.
This will cache transformations to the filesystem.
### babel is injecting helpers into each file and bloating my code!
babel uses very small helpers for common functions such as `_extend`. By default
this will be added to every file that requires it.
You can instead require the babel runtime as a separate module to avoid the duplication.
The following configuration disables automatic per-file runtime injection in babel, instead
requiring `babel-plugin-transform-runtime` and making all helper references use it.
See the [docs](http://babeljs.io/docs/plugins/transform-runtime/) for more information.
**NOTE:** You must run `npm install babel-plugin-transform-runtime --save-dev` to include this in your project and `babel-runtime` itself as a dependency with `npm install babel-runtime --save`.
```javascript
loaders: [
// the 'transform-runtime' plugin tells babel to require the runtime
// instead of inlining it.
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['env'],
plugins: ['transform-runtime']
}
}
]
```
#### **NOTE:** transform-runtime & custom polyfills (e.g. Promise library)
Since [babel-plugin-transform-runtime](https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-runtime) includes a polyfill that includes a custom [regenerator runtime](https://github.com/facebook/regenerator/blob/master/packages/regenerator-runtime/runtime.js) and [core.js](https://github.com/zloirock/core-js), the following usual shimming method using `webpack.ProvidePlugin` will not work:
```javascript
// ...
new webpack.ProvidePlugin({
'Promise': 'bluebird'
}),
// ...
```
The following approach will not work either:
```javascript
require('babel-runtime/core-js/promise').default = require('bluebird');
var promise = new Promise;
```
which outputs to (using `runtime`):
```javascript
'use strict';
var _Promise = require('babel-runtime/core-js/promise')['default'];
require('babel-runtime/core-js/promise')['default'] = require('bluebird');
var promise = new _Promise();
```
The previous `Promise` library is referenced and used before it is overridden.
One approach is to have a "bootstrap" step in your application that would first override the default globals before your application:
```javascript
// bootstrap.js
require('babel-runtime/core-js/promise').default = require('bluebird');
// ...
require('./app');
```
### The node API for `babel` has been moved to `babel-core`.
If you receive this message it means that you have the npm package `babel` installed and use the short notation of the loader in the webpack config (which is not valid anymore as of webpack 2.x):
```js
{
test: /\.js$/,
loader: 'babel',
}
```
Webpack then tries to load the `babel` package instead of the `babel-loader`.
To fix this you should uninstall the npm package `babel` as it is deprecated in babel v6. (instead install `babel-cli` or `babel-core`)
In the case one of your dependencies is installing `babel` and you cannot uninstall it yourself, use the complete name of the loader in the webpack config:
```js
{
test: /\.js$/,
loader: 'babel-loader',
}
```
## [License](http://couto.mit-license.org/)
+106
View File
@@ -0,0 +1,106 @@
"use strict";
var crypto = require("crypto");
var mkdirp = require("mkdirp");
var findCacheDir = require("find-cache-dir");
var fs = require("fs");
var os = require("os");
var path = require("path");
var zlib = require("zlib");
var defaultCacheDirectory = null;
var read = function read(filename, callback) {
return fs.readFile(filename, function (err, data) {
if (err) {
return callback(err);
}
return zlib.gunzip(data, function (err, content) {
var result = {};
if (err) {
return callback(err);
}
try {
result = JSON.parse(content);
} catch (e) {
return callback(e);
}
return callback(null, result);
});
});
};
var write = function write(filename, result, callback) {
var content = JSON.stringify(result);
return zlib.gzip(content, function (err, data) {
if (err) {
return callback(err);
}
return fs.writeFile(filename, data, callback);
});
};
var filename = function filename(source, identifier, options) {
var hash = crypto.createHash("SHA1");
var contents = JSON.stringify({
source: source,
options: options,
identifier: identifier
});
hash.end(contents);
return hash.read().toString("hex") + ".json.gz";
};
var handleCache = function handleCache(directory, params, callback) {
var source = params.source;
var options = params.options || {};
var transform = params.transform;
var identifier = params.identifier;
var shouldFallback = typeof params.directory !== "string" && directory !== os.tmpdir();
mkdirp(directory, function (err) {
if (err) return shouldFallback ? handleCache(os.tmpdir(), params, callback) : callback(err);
var file = path.join(directory, filename(source, identifier, options));
return read(file, function (err, content) {
var result = {};
if (!err) return callback(null, content);
try {
result = transform(source, options);
} catch (error) {
return callback(error);
}
return write(file, result, function (err) {
if (err) return shouldFallback ? handleCache(os.tmpdir(), params, callback) : callback(err);
callback(null, result);
});
});
});
};
module.exports = function (params, callback) {
var directory = void 0;
if (typeof params.directory === "string") {
directory = params.directory;
} else {
if (defaultCacheDirectory === null) {
defaultCacheDirectory = findCacheDir({ name: "babel-loader" }) || os.tmpdir();
}
directory = defaultCacheDirectory;
}
handleCache(directory, params, callback);
};
+173
View File
@@ -0,0 +1,173 @@
"use strict";
var assign = require("object-assign");
var babel = require("babel-core");
var loaderUtils = require("loader-utils");
var path = require("path");
var cache = require("./fs-cache.js");
var exists = require("./utils/exists")();
var relative = require("./utils/relative");
var read = require("./utils/read")();
var resolveRc = require("./resolve-rc.js");
var pkg = require("./../package.json");
function BabelLoaderError(name, message, codeFrame, hideStack, error) {
Error.call(this);
Error.captureStackTrace(this, BabelLoaderError);
this.name = "BabelLoaderError";
this.message = formatMessage(name, message, codeFrame);
this.hideStack = hideStack;
this.error = error;
}
BabelLoaderError.prototype = Object.create(Error.prototype);
BabelLoaderError.prototype.constructor = BabelLoaderError;
var STRIP_FILENAME_RE = /^[^:]+: /;
var formatMessage = function formatMessage(name, message, codeFrame) {
return (name ? name + ": " : "") + message + "\n\n" + codeFrame + "\n";
};
var transpile = function transpile(source, options) {
var forceEnv = options.forceEnv;
var tmpEnv = void 0;
delete options.forceEnv;
if (forceEnv) {
tmpEnv = process.env.BABEL_ENV;
process.env.BABEL_ENV = forceEnv;
}
var result = void 0;
try {
result = babel.transform(source, options);
} catch (error) {
if (forceEnv) restoreBabelEnv(tmpEnv);
if (error.message && error.codeFrame) {
var message = error.message;
var name = void 0;
var hideStack = void 0;
if (error instanceof SyntaxError) {
message = message.replace(STRIP_FILENAME_RE, "");
name = "SyntaxError";
hideStack = true;
} else if (error instanceof TypeError) {
message = message.replace(STRIP_FILENAME_RE, "");
hideStack = true;
}
throw new BabelLoaderError(name, message, error.codeFrame, hideStack, error);
} else {
throw error;
}
}
var code = result.code;
var map = result.map;
var metadata = result.metadata;
if (map && (!map.sourcesContent || !map.sourcesContent.length)) {
map.sourcesContent = [source];
}
if (forceEnv) restoreBabelEnv(tmpEnv);
return {
code: code,
map: map,
metadata: metadata
};
};
function restoreBabelEnv(prevValue) {
if (prevValue === undefined) {
delete process.env.BABEL_ENV;
} else {
process.env.BABEL_ENV = prevValue;
}
}
function passMetadata(s, context, metadata) {
if (context[s]) {
context[s](metadata);
}
}
module.exports = function (source, inputSourceMap) {
var _this = this;
var webpackRemainingChain = loaderUtils.getRemainingRequest(this).split("!");
var filename = webpackRemainingChain[webpackRemainingChain.length - 1];
var globalOptions = this.options.babel || {};
var loaderOptions = loaderUtils.parseQuery(this.query);
var userOptions = assign({}, globalOptions, loaderOptions);
var defaultOptions = {
metadataSubscribers: [],
inputSourceMap: inputSourceMap,
sourceRoot: process.cwd(),
filename: filename,
cacheIdentifier: JSON.stringify({
"babel-loader": pkg.version,
"babel-core": babel.version,
babelrc: exists(userOptions.babelrc) ? read(userOptions.babelrc) : resolveRc(path.dirname(filename)),
env: userOptions.forceEnv || process.env.BABEL_ENV || process.env.NODE_ENV || "development"
})
};
var options = assign({}, defaultOptions, userOptions);
if (userOptions.sourceMap === undefined) {
options.sourceMap = this.sourceMap;
}
if (options.sourceFileName === undefined) {
options.sourceFileName = relative(options.sourceRoot, options.filename);
}
var cacheDirectory = options.cacheDirectory;
var cacheIdentifier = options.cacheIdentifier;
var metadataSubscribers = options.metadataSubscribers;
delete options.cacheDirectory;
delete options.cacheIdentifier;
delete options.metadataSubscribers;
this.cacheable();
if (cacheDirectory) {
var callback = this.async();
return cache({
directory: cacheDirectory,
identifier: cacheIdentifier,
source: source,
options: options,
transform: transpile
}, function (err) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
code = _ref.code,
map = _ref.map,
metadata = _ref.metadata;
if (err) return callback(err);
metadataSubscribers.forEach(function (s) {
return passMetadata(s, _this, metadata);
});
return callback(null, code, map);
});
}
var _transpile = transpile(source, options),
code = _transpile.code,
map = _transpile.map,
metadata = _transpile.metadata;
metadataSubscribers.forEach(function (s) {
return passMetadata(s, _this, metadata);
});
this.callback(null, code, map);
};
+29
View File
@@ -0,0 +1,29 @@
"use strict";
var path = require("path");
var exists = require("./utils/exists")({});
var read = require("./utils/read")({});
var cache = {};
var find = function find(start, rel) {
var file = path.join(start, rel);
if (exists(file)) {
return read(file);
}
var up = path.dirname(start);
if (up !== start) {
return find(up, rel);
}
};
module.exports = function (loc, rel) {
rel = rel || ".babelrc";
var cacheKey = loc + "/" + rel;
if (!(cacheKey in cache)) {
cache[cacheKey] = find(loc, rel);
}
return cache[cacheKey];
};
+18
View File
@@ -0,0 +1,18 @@
"use strict";
var fs = require("fs");
module.exports = function (cache) {
cache = cache || {};
return function (filename) {
if (!filename) {
return false;
}
cache[filename] = cache[filename] || fs.existsSync(filename);
return cache[filename];
};
};
+18
View File
@@ -0,0 +1,18 @@
"use strict";
var fs = require("fs");
module.exports = function (cache) {
cache = cache || {};
return function (filename) {
if (!filename) {
throw new Error("filename must be a string");
}
cache[filename] = cache[filename] || fs.readFileSync(filename, "utf8");
return cache[filename];
};
};
+14
View File
@@ -0,0 +1,14 @@
"use strict";
var path = require("path");
module.exports = function relative(sourceRoot, filename) {
var rootPath = sourceRoot.replace(/\\/g, "/").split("/")[1];
var fileRootPath = filename.replace(/\\/g, "/").split("/")[1];
if (rootPath && rootPath !== fileRootPath) {
return filename;
}
return path.relative(sourceRoot, filename);
};
+167
View File
@@ -0,0 +1,167 @@
{
"_args": [
[
{
"raw": "babel-loader@^6.2.9",
"scope": null,
"escapedName": "babel-loader",
"name": "babel-loader",
"rawSpec": "^6.2.9",
"spec": ">=6.2.9 <7.0.0",
"type": "range"
},
"c:\\xampp\\htdocs\\laravel\\node_modules\\laravel-mix"
]
],
"_from": "babel-loader@>=6.2.9 <7.0.0",
"_id": "babel-loader@6.4.1",
"_inCache": true,
"_location": "/babel-loader",
"_nodeVersion": "6.10.0",
"_npmOperationalInternal": {
"host": "packages-12-west.internal.npmjs.com",
"tmp": "tmp/babel-loader-6.4.1.tgz_1489655219470_0.16571268811821938"
},
"_npmUser": {
"name": "danez",
"email": "daniel@tschinder.de"
},
"_npmVersion": "4.4.3",
"_phantomChildren": {},
"_requested": {
"raw": "babel-loader@^6.2.9",
"scope": null,
"escapedName": "babel-loader",
"name": "babel-loader",
"rawSpec": "^6.2.9",
"spec": ">=6.2.9 <7.0.0",
"type": "range"
},
"_requiredBy": [
"/laravel-mix"
],
"_resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-6.4.1.tgz",
"_shasum": "0b34112d5b0748a8dcdbf51acf6f9bd42d50b8ca",
"_shrinkwrap": null,
"_spec": "babel-loader@^6.2.9",
"_where": "c:\\xampp\\htdocs\\laravel\\node_modules\\laravel-mix",
"author": {
"name": "Luis Couto",
"email": "hello@luiscouto.pt"
},
"ava": {
"files": [
"test/**/*.test.js",
"!test/fixtures/**/*",
"!test/helpers/**/*"
],
"source": [
"src/**/*.js"
],
"babel": "inherit"
},
"bugs": {
"url": "https://github.com/babel/babel-loader/issues"
},
"dependencies": {
"find-cache-dir": "^0.1.1",
"loader-utils": "^0.2.16",
"mkdirp": "^0.5.1",
"object-assign": "^4.0.1"
},
"description": "babel module loader for webpack",
"devDependencies": {
"ava": "^0.17.0",
"babel-cli": "^6.18.0",
"babel-core": "^6.0.0",
"babel-eslint": "^7.1.0",
"babel-plugin-istanbul": "^3.0.0",
"babel-plugin-react-intl": "^2.1.3",
"babel-preset-es2015": "^6.0.0",
"babel-preset-latest": "^6.16.0",
"babel-register": "^6.18.0",
"codecov": "^1.0.1",
"cross-env": "^2.0.0",
"eslint": "^3.8.1",
"eslint-config-babel": "^6.0.0",
"eslint-plugin-flowtype": "^2.25.0",
"nyc": "^10.0.0",
"react": "^15.1.0",
"react-intl": "^2.1.2",
"react-intl-webpack-plugin": "^0.0.3",
"rimraf": "^2.4.3",
"webpack": "^2.2.0-rc"
},
"directories": {},
"dist": {
"shasum": "0b34112d5b0748a8dcdbf51acf6f9bd42d50b8ca",
"tarball": "https://registry.npmjs.org/babel-loader/-/babel-loader-6.4.1.tgz"
},
"files": [
"lib"
],
"gitHead": "48325ea5516c117da8e75a80b8b53f24760e4413",
"homepage": "https://github.com/babel/babel-loader",
"keywords": [
"webpack",
"loader",
"babel",
"es6",
"transpiler",
"module"
],
"license": "MIT",
"main": "lib/index.js",
"maintainers": [
{
"name": "couto",
"email": "hello@luiscouto.pt"
},
{
"name": "danez",
"email": "daniel@tschinder.de"
},
{
"name": "hzoo",
"email": "hi@henryzoo.com"
},
{
"name": "sebmck",
"email": "sebmck@gmail.com"
}
],
"name": "babel-loader",
"nyc": {
"all": true,
"include": [
"src/**/*.js"
],
"require": [
"babel-register"
],
"sourceMap": false,
"instrument": false
},
"optionalDependencies": {},
"peerDependencies": {
"babel-core": "^6.0.0",
"webpack": "1 || 2 || ^2.1.0-beta || ^2.2.0-rc"
},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/babel/babel-loader.git"
},
"scripts": {
"build": "babel src/ --out-dir lib/",
"clean": "rimraf lib/",
"coverage": "nyc report --reporter=json && codecov -f coverage/coverage-final.json",
"lint": "eslint src test",
"prepublish": "npm run clean && npm run build",
"preversion": "npm test",
"test": "npm run lint && cross-env BABEL_ENV=test npm run build && npm run test-only",
"test-ci": "cross-env BABEL_ENV=test npm run build && npm run test-only",
"test-only": "nyc ava"
},
"version": "6.4.1"
}