Skip to content

Commit

Permalink
feat(webpack): use jade as default template engine
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Feb 4, 2016
1 parent a1febdc commit 45f6557
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 24 deletions.
20 changes: 0 additions & 20 deletions lib/index.html

This file was deleted.

15 changes: 15 additions & 0 deletions lib/index.jade
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
doctype html
html
head
meta(charset="utf-8")
meta(name="viewport" content="width=device-width, initial-scale=1")
meta(http-equiv="X-UA-Compatible" content="IE=edge,chrome=1")
title= htmlWebpackPlugin.options.title
if htmlWebpackPlugin.files.favicon
link(rel="shortcut icon" href=htmlWebpackPlugin.files.favicon)
each css in htmlWebpackPlugin.files.css
link(rel="stylesheet" href=css)
body
app
each js in htmlWebpackPlugin.files.js
script(src=js)
6 changes: 5 additions & 1 deletion lib/webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ module.exports = function (type, options) {
test: /\.(png|jpg|gif)$/,
loader: 'url?limit=1000&name=images/[hash].[ext]',
exclude: [/node_modules/]
},
{
test: /\.jade$/,
loaders: ['jade']
}
]
},
Expand All @@ -91,7 +95,7 @@ module.exports = function (type, options) {
plugins: [
new HtmlWebpackPlugin(Object.assign({}, {
title: 'Tooling',
template: dir('lib/index.html')
template: dir('lib/index.jade')
}, toolingConfig.index))
]
}
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^0.9.1",
"file-loader": "^0.8.5",
"html-webpack-plugin": "^1.7.0",
"html-webpack-plugin": "^2.8.1",
"jade": "^1.11.0",
"jade-loader": "^0.8.0",
"json-loader": "^0.5.4",
"npm-install-webpack-plugin": "^2.0.0",
"object-string": "0.0.1",
Expand All @@ -69,7 +71,7 @@
"vue-hot-reload-api": "^1.2.2",
"vue-html-loader": "^1.0.0",
"vue-loader": "^7.5.0",
"webpack": "^1.12.9",
"webpack": "^1.12.13",
"webpack-hot-server": "^0.1.1"
},
"devDependencies": {
Expand All @@ -80,7 +82,7 @@
"tooling": {
"index": {
"title": "tooling index",
"template": "example/index.template"
"template": "lib/index.jade"
}
},
"config": {
Expand Down

0 comments on commit 45f6557

Please sign in to comment.