]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/example/example-npm.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / init-package-json / example / example-npm.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/example/example-npm.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/init-package-json/example/example-npm.js
new file mode 100644 (file)
index 0000000..292da6a
--- /dev/null
@@ -0,0 +1,11 @@
+var init = require('../init-package-json.js')
+var dir = process.cwd()
+var npm = require('npm')
+
+npm.load(function (er, npm) {
+  if (er) throw er
+  init(dir, npm.config.get('init-module'), npm.config, function (er, data) {
+    if (er) throw er
+    console.log('written successfully')
+  })
+})