diff --git a/make.js b/make.js index 32488b5..1b794a3 100644 --- a/make.js +++ b/make.js @@ -1,5 +1,6 @@ /* eslint-disable no-template-curly-in-string */ const b = require('substance-bundler') +const rollup = require('substance-bundler/extensions/rollup') const DIST = 'dist/' const TMP = 'tmp/' @@ -20,7 +21,8 @@ b.task('default', ['publish']) b.task('build', ['build:lib']) b.task('build:lib', () => { - b.js('index.es.js', { + rollup(b, { + input: 'index.es.js', output: [{ file: DIST + 'texture-xml-utils.js', format: 'umd', @@ -31,17 +33,18 @@ b.task('build:lib', () => { }, { file: DIST + 'texture-xml-utils.cjs.js', format: 'cjs' + }, { + file: DIST + 'texture-xml-utils.es.js', + format: 'esm' }], external: [ 'substance' ] }) - b.minify(DIST + 'texture-xml-utils.js', { - debug: false - }) }) b.task('build:tests:browser', () => { - b.js('test/index.js', { - output: [{ + rollup(b, { + input: 'test/index.js', + output: { file: TMP + 'tests.js', format: 'umd', name: 'tests', @@ -49,7 +52,7 @@ b.task('build:tests:browser', () => { 'substance': 'substance', 'substance-test': 'substanceTest' } - }], + }, external: [ 'substance', 'substance-test' ] }) }) diff --git a/package.json b/package.json index 1e6fb79..79bd76c 100644 --- a/package.json +++ b/package.json @@ -28,9 +28,10 @@ "devDependencies": { "esm": "3.0.47", "nyc": "11.8.0", + "rollup": "^1.20.3", "standard": "12.0.1", "substance": "0.142.0", - "substance-bundler": "0.25.5", + "substance-bundler": "^0.27.1", "substance-test": "0.13.2", "tap-spec": "5.0.0", "uglify-es": "3.3.9"