From df7019fa68f86ee482c93dcaafa750286915b310 Mon Sep 17 00:00:00 2001 From: juanelas Date: Sun, 15 Mar 2020 17:06:00 +0100 Subject: [PATCH] issue #3 fixed. Better building process in general --- build/build.browser.tests.js | 15 +- build/build.dts.js | 2 +- build/build.rollup.js | 50 +- .../bigint-crypto-utils-latest.browser.min.js | 1 + ...int-crypto-utils-latest.browser.mod.min.js | 2 +- package-lock.json | 974 ++++++------------ package.json | 10 +- types/bigint-crypto-utils.d.ts | 184 +--- 8 files changed, 360 insertions(+), 878 deletions(-) create mode 100644 dist/bigint-crypto-utils-latest.browser.min.js diff --git a/build/build.browser.tests.js b/build/build.browser.tests.js index b41f66e..90f7c62 100644 --- a/build/build.browser.tests.js +++ b/build/build.browser.tests.js @@ -1,10 +1,10 @@ 'use strict'; const rollup = require('rollup'); +const resolve = require('@rollup/plugin-node-resolve'); const replace = require('@rollup/plugin-replace'); -const resolve = require('rollup-plugin-node-resolve'); -const commonjs = require('rollup-plugin-commonjs'); -const multiEntry = require('rollup-plugin-multi-entry'); +const commonjs = require('@rollup/plugin-commonjs'); +const multi = require('@rollup/plugin-multi-entry'); const fs = require('fs'); const path = require('path'); @@ -17,14 +17,15 @@ const rootDir = path.join(__dirname, '..'); // Let's first create the appropriate html file loading mocha, chai and a bundle of the tests -const templatePath = path.join(rootDir, 'src', 'browser-test-template.html'); -const dstDir = path.join(rootDir, 'test', 'browser'); +const templatePath = path.join(rootDir, pkgJson.directories.src, 'browser-test-template.html'); +const dstDir = path.join(rootDir, pkgJson.directories.test, 'browser'); const dstFileName = path.join(dstDir, 'index.html'); const template = fs.readFileSync(templatePath, 'utf-8'); +const bundleFile = path.join(rootDir, pkgJson.directories.dist, pkgJson.name + '-latest.browser.mod.min.js'); const testsJs = `