├── .babelrc ├── .gitignore ├── integration ├── run.js └── styles │ ├── bundle.js │ ├── config.js │ ├── index.html │ ├── index.js │ └── styles.css ├── karma.conf.js ├── lib ├── basic │ └── index.js ├── config │ ├── configure.js │ ├── loader.js │ └── utils.js ├── configure.js ├── index.js ├── loader.js └── utils.js ├── package.json ├── src ├── assets │ └── index.js ├── babel │ └── index.js ├── basic │ └── index.js ├── config │ ├── clone.js │ ├── configure.js │ ├── inject │ │ ├── env.js │ │ ├── index.js │ │ ├── loader.js │ │ ├── plugin.js │ │ └── resolve.js │ ├── loader.js │ ├── merge.js │ ├── utils.js │ └── validate.js ├── es6 │ └── index.js ├── helpers.js ├── html │ └── index.js ├── index.js ├── react │ └── index.js └── styles │ └── index.js ├── test-entry.js ├── test-helpers.js └── test ├── assets ├── fixtures │ ├── config.js │ ├── entry.js │ ├── fonts │ │ ├── rw-widgets.eot │ │ ├── rw-widgets.svg │ │ ├── rw-widgets.ttf │ │ └── rw-widgets.woff │ └── img │ │ ├── loader-big.gif │ │ └── loader.gif └── unit.js ├── babel ├── fixtures │ ├── config.js │ ├── entry.js │ └── foo.es6 └── unit.js ├── basic ├── fixtures │ ├── config.js │ ├── data.json │ └── entry.js └── unit.js ├── configure.js ├── loader.js ├── react ├── fixtures │ ├── Component.jsx │ ├── config.js │ └── entry.js └── unit.js ├── styles ├── fixtures │ ├── config.js │ ├── entry.js │ └── styles.css └── unit.js └── validations.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | stage: 1, 3 | plugins: [ 4 | "object-assign" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.es6.js 3 | -------------------------------------------------------------------------------- /integration/run.js: -------------------------------------------------------------------------------- 1 | require('babel/register'); 2 | 3 | var path = require('path') 4 | var argv = require('yargs').argv; 5 | var open = require('open'); 6 | var Mocha = require('mocha') 7 | var webpack = require('webpack'); 8 | 9 | var test = argv._[0]; 10 | 11 | if (!test) 12 | throw new Error('must include a test') 13 | 14 | var config = require(path.join(__dirname, test, 'config.js')) 15 | 16 | 17 | console.log(config) 18 | var compiler = webpack(config) 19 | 20 | if (argv.watch) 21 | compiler.watch({}, report) 22 | else 23 | compiler.run(function(err, stats) { 24 | report(err, stats) 25 | }) 26 | 27 | var first = true; 28 | 29 | function runServerTests(stats) { 30 | var test = require(path.join(__dirname, test, 'config.js')) 31 | var mocha = new Mocha({ 32 | reporter: 'Spec', 33 | globals: 34 | }); 35 | } 36 | 37 | function report(err, stats) { 38 | if (argv.open && first) 39 | open(path.join(__dirname, test, 'output/index.html'), 'chrome'); 40 | 41 | first = false 42 | if (err) { 43 | console.error(err.stack || err) 44 | if (err.details) console.error(err.details) 45 | return process.on("exit", function () { process.exit(1) }) 46 | } 47 | process.stdout.write(stats.toString() + '\n') 48 | } 49 | 50 | var errors = (stats.compilation.errors || []).join('\n'); 51 | var warnings = (stats.compilation.warnings || []).join('\n'); 52 | -------------------------------------------------------------------------------- /integration/styles/bundle.js: -------------------------------------------------------------------------------- 1 | /******/ (function(modules) { // webpackBootstrap 2 | /******/ // The module cache 3 | /******/ var installedModules = {}; 4 | 5 | /******/ // The require function 6 | /******/ function __webpack_require__(moduleId) { 7 | 8 | /******/ // Check if module is in cache 9 | /******/ if(installedModules[moduleId]) 10 | /******/ return installedModules[moduleId].exports; 11 | 12 | /******/ // Create a new module (and put it into the cache) 13 | /******/ var module = installedModules[moduleId] = { 14 | /******/ exports: {}, 15 | /******/ id: moduleId, 16 | /******/ loaded: false 17 | /******/ }; 18 | 19 | /******/ // Execute the module function 20 | /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21 | 22 | /******/ // Flag the module as loaded 23 | /******/ module.loaded = true; 24 | 25 | /******/ // Return the exports of the module 26 | /******/ return module.exports; 27 | /******/ } 28 | 29 | 30 | /******/ // expose the modules object (__webpack_modules__) 31 | /******/ __webpack_require__.m = modules; 32 | 33 | /******/ // expose the module cache 34 | /******/ __webpack_require__.c = installedModules; 35 | 36 | /******/ // __webpack_public_path__ 37 | /******/ __webpack_require__.p = ""; 38 | 39 | /******/ // Load entry module and return exports 40 | /******/ return __webpack_require__(0); 41 | /******/ }) 42 | /************************************************************************/ 43 | /******/ ([ 44 | /* 0 */ 45 | /***/ function(module, exports, __webpack_require__) { 46 | 47 | 48 | __webpack_require__(1) 49 | 50 | 51 | /***/ }, 52 | /* 1 */ 53 | /***/ function(module, exports, __webpack_require__) { 54 | 55 | // style-loader: Adds some css to the DOM by adding a