💣 boom! Adding webpack

This commit is contained in:
Kent C. Dodds 2015-08-10 06:20:01 -06:00
parent 674b1c6db4
commit 80e3ad69c8
6 changed files with 1314 additions and 10 deletions

1286
bundle.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -39,13 +39,6 @@
<p>Refactored by <a href="https://github.com/cburgmer">Christoph Burgmer</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
<script src="node_modules/todomvc-common/base.js"></script>
<script src="js/helpers.js"></script>
<script src="js/store.js"></script>
<script src="js/model.js"></script>
<script src="js/template.js"></script>
<script src="js/view.js"></script>
<script src="js/controller.js"></script>
<script src="js/app.js"></script>
<script src="bundle.js"></script>
</body>
</html>

View File

@ -1,4 +1,11 @@
/*global app, $on */
require('todomvc-common');
require('./view');
require('./helpers');
require('./controller');
require('./model');
require('./store');
require('./template');
(function () {
'use strict';

View File

@ -1,5 +1,5 @@
/*global qs, qsa, $on, $parent, $delegate */
require('./helpers');
(function (window) {
'use strict';

6
package.json Executable file → Normal file
View File

@ -5,6 +5,10 @@
"todomvc-app-css": "2.0.1"
},
"devDependencies": {
"jasmine-core": "2.3.4"
"babel": "5.8.21",
"babel-core": "5.8.21",
"babel-loader": "5.3.2",
"jasmine-core": "2.3.4",
"webpack": "1.11.0"
}
}

14
webpack.config.js Normal file
View File

@ -0,0 +1,14 @@
var path = require('path');
module.exports = {
entry: './app.js',
output: {
filename: 'bundle.js',
path: here()
},
context: here('js')
};
function here(d) {
return d ? path.join(__dirname, d) : __dirname;
}