From 62e5f823c12c29f7257387d6c37260ebc2de1490 Mon Sep 17 00:00:00 2001 From: haad Date: Sun, 31 Dec 2017 09:48:10 +0200 Subject: [PATCH 1/2] Build debug build by default --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0952262..2e7a316 100644 --- a/package.json +++ b/package.json @@ -49,10 +49,10 @@ "examples:node": "node examples/eventlog.js", "examples:browser": "open examples/browser/browser.html", "test": "mocha", - "build": "npm run build:es5 && npm run build:dist && npm run build:examples", + "build": "npm run build:es5 && npm run build:debug && npm run build:dist && npm run build:examples", "build:examples": "webpack --config conf/webpack.example.config.js --sort-modules-by size", "build:dist": "webpack --config conf/webpack.config.js --sort-modules-by size && mkdir -p examples/browser/lib && cp dist/orbitdb.min.js examples/browser/lib/orbitdb.min.js", - "build:debug": "webpack --config conf/webpack.debug.config.js --sort-modules-by size && mkdir -p examples/browser/lib && cp dist/orbitdb.js examples/browser/lib/orbitdb.min.js", + "build:debug": "webpack --config conf/webpack.debug.config.js --sort-modules-by size && mkdir -p examples/browser/lib && cp dist/orbitdb.js examples/browser/lib/orbitdb.js", "build:es5": "babel src --out-dir ./dist/es5/ --presets babel-preset-es2015 --plugins babel-plugin-transform-runtime" } } From 9b5b785c13931173eb8e0c0ee99d4732dcab1227 Mon Sep 17 00:00:00 2001 From: haad Date: Sun, 31 Dec 2017 09:55:35 +0200 Subject: [PATCH 2/2] Copy sourcemaps to examples/browser/lib/ --- Makefile | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8d55509..c5eb408 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,7 @@ build: test cp dist/orbitdb.min.js examples/browser/lib/orbitdb.min.js cp node_modules/ipfs/dist/index.min.js examples/browser/lib/ipfs.min.js cp dist/orbitdb.js examples/browser/lib/orbitdb.js + cp dist/orbitdb.js.map examples/browser/lib/orbitdb.js.map cp node_modules/ipfs/dist/index.js examples/browser/lib/ipfs.js @echo "Build success!" @echo "Output: 'dist/', 'examples/browser/'" diff --git a/package.json b/package.json index 2e7a316..41aae4b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "build": "npm run build:es5 && npm run build:debug && npm run build:dist && npm run build:examples", "build:examples": "webpack --config conf/webpack.example.config.js --sort-modules-by size", "build:dist": "webpack --config conf/webpack.config.js --sort-modules-by size && mkdir -p examples/browser/lib && cp dist/orbitdb.min.js examples/browser/lib/orbitdb.min.js", - "build:debug": "webpack --config conf/webpack.debug.config.js --sort-modules-by size && mkdir -p examples/browser/lib && cp dist/orbitdb.js examples/browser/lib/orbitdb.js", + "build:debug": "webpack --config conf/webpack.debug.config.js --sort-modules-by size && mkdir -p examples/browser/lib && cp dist/orbitdb.js examples/browser/lib/orbitdb.js && cp dist/orbitdb.js.map examples/browser/lib/orbitdb.js.map", "build:es5": "babel src --out-dir ./dist/es5/ --presets babel-preset-es2015 --plugins babel-plugin-transform-runtime" } }