forked from boranton/testcafe-workshop
🐢 Adding css
This commit is contained in:
parent
80e3ad69c8
commit
86330e922d
@ -3,8 +3,7 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>VanillaJS • TodoMVC</title>
|
||||
<link rel="stylesheet" href="node_modules/todomvc-common/base.css">
|
||||
<link rel="stylesheet" href="node_modules/todomvc-app-css/index.css">
|
||||
<script src="bundle.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<section class="todoapp">
|
||||
@ -39,6 +38,5 @@
|
||||
<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="bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
11
js/app.js
11
js/app.js
@ -1,5 +1,6 @@
|
||||
/*global app, $on */
|
||||
require('todomvc-common');
|
||||
require('todomvc-common/base.css');
|
||||
require('todomvc-app-css/index.css');
|
||||
require('./view');
|
||||
require('./helpers');
|
||||
require('./controller');
|
||||
@ -22,11 +23,15 @@ require('./template');
|
||||
this.controller = new app.Controller(this.model, this.view);
|
||||
}
|
||||
|
||||
var todo = new Todo('todos-vanillajs');
|
||||
var todo;
|
||||
|
||||
function setView() {
|
||||
todo.controller.setView(document.location.hash);
|
||||
}
|
||||
$on(window, 'load', setView);
|
||||
|
||||
$on(window, 'load', function() {
|
||||
todo = new Todo('todos-vanillajs');
|
||||
setView();
|
||||
});
|
||||
$on(window, 'hashchange', setView);
|
||||
})();
|
||||
|
||||
@ -8,7 +8,9 @@
|
||||
"babel": "5.8.21",
|
||||
"babel-core": "5.8.21",
|
||||
"babel-loader": "5.3.2",
|
||||
"css-loader": "0.15.6",
|
||||
"jasmine-core": "2.3.4",
|
||||
"style-loader": "0.12.3",
|
||||
"webpack": "1.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,12 @@ module.exports = {
|
||||
filename: 'bundle.js',
|
||||
path: here()
|
||||
},
|
||||
context: here('js')
|
||||
context: here('js'),
|
||||
module: {
|
||||
loaders: [
|
||||
{test: /\.css$/, loaders: ['style', 'css']}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
function here(d) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user