Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
erm0l0v committed Aug 24, 2015
1 parent ea3aae3 commit 34dca78
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules

example/dest/*
!example/dest/index.html
11 changes: 11 additions & 0 deletions example/dest/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>

<script src="app.js"></script>
</body>
</html>
4 changes: 4 additions & 0 deletions example/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require.ensure('./module', function (require) {
var module = require('./module');
console.log(module);
});
1 change: 1 addition & 0 deletions example/js/module.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = 'Hello World!!!';
21 changes: 21 additions & 0 deletions example/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
var WebpackMd5Hash = require('../plugin/webpack_md5_hash');
var path = require('path');


var src = path.join(__dirname, '/js'),
dest = path.join(__dirname, "/dest");

module.exports = {
context: src,
entry: {
app: './app.js'
},
output: {
path: dest,
filename: "[name].js",
chunkFilename: "[chunkhash].[id].chunk.js"
},
plugins: [
new WebpackMd5Hash()
]
};

0 comments on commit 34dca78

Please sign in to comment.