Skip to content

Commit

Permalink
chore(ci): expand travis testing (#278)
Browse files Browse the repository at this point in the history
* REMOVE webpack devDependency as we have multiple peerDep versions
* Add matrix testing against supported node & webpack versions
* Enable codecov.io reporting
* Add travis script for test and coverage
* Rename cov script to cover to take advantage of `postcover`
* Add postcover script for travis linting after testing
* Temporarily allows failures on `OSX` ( timeout on node4 )
  • Loading branch information
joshwiens authored and cogell committed Nov 11, 2016
1 parent 21dda21 commit 20e3ea6
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# babel-loader [![Build Status](https://travis-ci.org/babel/babel-loader.svg?branch=master)](https://travis-ci.org/babel/babel-loader)
# 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)[![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).
Expand All @@ -25,7 +25,7 @@ __Note:__ If you're upgrading from babel 5 to babel 6, please take a look [at th
module: {
loaders: [
{
test: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel', // 'babel-loader' is also a valid name to reference
query: {
Expand All @@ -46,7 +46,7 @@ You can pass options to the loader by writing them as a [query string](https://g
module: {
loaders: [
{
test: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel?presets[]=es2015'
}
Expand All @@ -60,7 +60,7 @@ module: {
module: {
loaders: [
{
test: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
Expand All @@ -75,7 +75,7 @@ module: {

* `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 and the contents of .babelrc file if it exists. This can set to a custom value to force cache busting if the identifier changes.
* `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.


__Note:__ The `sourceMap` option is ignored, instead sourceMaps are automatically enabled when webpack is configured to use them (via the `devtool` config option).
Expand Down Expand Up @@ -105,14 +105,14 @@ module: {

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.
**NOTE:** You must run `npm install babel-plugin-transform-runtime --save-dev` to include this in your project and `babel-runtime` itelf 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: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
Expand All @@ -128,7 +128,7 @@ loaders: [
If using cacheDirectory results in an error similar to the following:

```
ERROR in ./frontend/src/main.jsx
ERROR in ./frontend/src/main.js
Module build failed: Error: ENOENT, open 'true/350c59cae6b7bce3bb58c8240147581bfdc9cccc.json.gzip'
@ multi app
```
Expand All @@ -139,7 +139,7 @@ That means that most likely, you're not setting the options correctly, and you'r
```javascript
loaders: [
{
test: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel?cacheDirectory=true'
}
Expand All @@ -151,7 +151,7 @@ That's not the correct way of setting boolean values. You should do instead:
```javascript
loaders: [
{
test: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel?cacheDirectory'
}
Expand All @@ -165,7 +165,7 @@ loaders: [
// the optional 'runtime' transformer tells babel to require the runtime
// instead of inlining it.
{
test: /\.jsx?$/,
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
Expand Down

0 comments on commit 20e3ea6

Please sign in to comment.