]> gerrit.simantics Code Review - simantics/district.git/blob - bundle.js
159e4f7b65d5fec2045ef05a3859dcd9f890b1c3
[simantics/district.git] / bundle.js
1 // this example will bundle every dependency
2 var P = require("../")
3 P({ path: "./" })
4   .on("package", bundleIt)
5   .on("entry", function (e) {
6     console.error(e.constructor.name, e.path.substr(e.root.dirname.length + 1))
7     e.on("package", bundleIt)
8   })
9
10 function bundleIt (p) {
11   p.bundleDependencies = Object.keys(p.dependencies || {})
12 }
13