build using babel + webpack

parent 81d433ce
......@@ -7,6 +7,12 @@ Build-Depends:
debhelper (>= 9)
, dh-buildinfo
, nodejs
, node-babel-cli
, node-babel-preset-es2015
, webpack
, node-babel-loader
, node-babel-core
, node-d3-array (>= 1)
Standards-Version: 4.1.0
Homepage: https://d3js.org/d3-geo/
Vcs-Git: https://anonscm.debian.org/git/pkg-javascript/node-d3-geo.git
......
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,7 @@
+{
+ "presets": [
+ ["es2015", {
+ "loose": false,
+ }],
+ ],
+}
......@@ -7,9 +7,16 @@
%:
dh $@
#override_dh_auto_build:
override_dh_auto_build:
babeljs src -d lib
babeljs index.js -d lib
sed -i 's/.\/src/./' lib/index.js
webpack --config debian/webpack.config.js index.js build/d3-geo.js --target=web --output-library=d3-geo --output-library-target=umd --module-bind 'js=babel-loader'
# topojson-client is not packaged
#override_dh_auto_test:
# tape 'test/**/*.js'
override_dh_auto_clean:
rm -rf lib build
dh_auto_clean
'use strict';
var fs = require('fs');
var path = require('path');
var webpack = require('webpack');
var config = {
resolve: {
modules: ['/usr/lib/nodejs'],
},
resolveLoader: {
modules: ['/usr/lib/nodejs'],
}
}
module.exports = config;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment