Skip to content

Instantly share code, notes, and snippets.

@luk3thomas
Last active December 27, 2015 03:42
Show Gist options
  • Save luk3thomas/c6d608fc17b1a8e4781b to your computer and use it in GitHub Desktop.
Save luk3thomas/c6d608fc17b1a8e4781b to your computer and use it in GitHub Desktop.

Revisions

  1. luk3thomas revised this gist Dec 27, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@ npm install --save-dev babel-core \

    ```
    { "extends": "airbnb/base"
    , rules:
    , "rules":
    { "func-names": 0
    , "no-undef": 0
    }
  2. luk3thomas revised this gist Dec 27, 2015. 1 changed file with 14 additions and 0 deletions.
    14 changes: 14 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,12 @@
    npm install --save-dev babel-core \
    babel-loader \
    babel-preset-es2015 \
    eslint \
    eslint-config-airbnb \
    imports-loader \
    jasmine \
    karma \
    karma-eslint \
    karma-jasmine \
    karma-phantomjs-launcher \
    karma-webpack \
    @@ -15,6 +18,17 @@ npm install --save-dev babel-core \
    webpack
    ```

    #### .eslintrc

    ```
    { "extends": "airbnb/base"
    , rules:
    { "func-names": 0
    , "no-undef": 0
    }
    }
    ```

    #### karma.config.js

    ```javascript
  3. luk3thomas revised this gist Dec 27, 2015. No changes.
  4. luk3thomas revised this gist Dec 27, 2015. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,5 @@
    #### Setup

    Install the dependencies

    ```
    npm install --save-dev babel-core \
    babel-loader \
  5. luk3thomas revised this gist Dec 27, 2015. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -3,7 +3,18 @@
    Install the dependencies

    ```
    npm install --save-dev babel-core babel-loader babel-preset-es2015 imports-loader jasmine karma karma-jasmine karma-phantomjs-launcher karma-webpack phantomjs sinon webpack
    npm install --save-dev babel-core \
    babel-loader \
    babel-preset-es2015 \
    imports-loader \
    jasmine \
    karma \
    karma-jasmine \
    karma-phantomjs-launcher \
    karma-webpack \
    phantomjs \
    sinon \
    webpack
    ```

    #### karma.config.js
  6. luk3thomas created this gist Dec 27, 2015.
    58 changes: 58 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    #### Setup

    Install the dependencies

    ```
    npm install --save-dev babel-core babel-loader babel-preset-es2015 imports-loader jasmine karma karma-jasmine karma-phantomjs-launcher karma-webpack phantomjs sinon webpack
    ```

    #### karma.config.js

    ```javascript
    module.exports = function(config) {
    config.set({
    frameworks: [ 'jasmine' ],

    files: [
    'test/**/*_test*'
    ],

    preprocessors: {
    'test/**/*_test*': 'webpack'
    },

    webpack: {
    module: {
    loaders: [
    { test: /js$/
    , loader: 'babel'
    , exclude: /node_modules/
    , query: { presets: ['es2015'] }
    }
    ]
    }
    },

    webpackMiddleware: {
    noInfo: true
    }
    });
    };
    ```

    #### webpack.config.js

    ```javascript
    module.exports =
    { entry: './src/index.js'
    , module:
    { loaders:
    [ { test: 'js$'
    , exclude: /node_modules/
    , loader: 'babel'
    , query: { presets: ['es2015'] }
    }
    ]
    }
    };
    ```