mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2025-12-19 17:58:43 -05:00
chore: add start script
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
"build": "cross-env NODE_ENV=production FORCE_COLOR=1 lerna run build --stream",
|
"build": "cross-env NODE_ENV=production FORCE_COLOR=1 lerna run build --stream",
|
||||||
"build:watch": "FORCE_COLOR=1 lerna run build:watch --stream --concurrency 99 --no-sort",
|
"build:watch": "FORCE_COLOR=1 lerna run build:watch --stream --concurrency 99 --no-sort",
|
||||||
"lint": "eslint packages --ext .js --ext .jsx",
|
"lint": "eslint packages --ext .js --ext .jsx",
|
||||||
|
"start": "MONO=true ./packages/cli/lib/index.js serve --entry ./test/integration/sn.js",
|
||||||
"test": "yarn run test:unit",
|
"test": "yarn run test:unit",
|
||||||
"test:integration": "aw puppet -c aw.config.js --type integration",
|
"test:integration": "aw puppet -c aw.config.js --type integration",
|
||||||
"test:unit": "aw -c aw.config.js"
|
"test:unit": "aw -c aw.config.js"
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ const propTypes = [
|
|||||||
'elementType',
|
'elementType',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const watch = process.argv.indexOf('-w') > 2;
|
||||||
|
|
||||||
const config = (isEsm) => {
|
const config = (isEsm) => {
|
||||||
const outputFile = isEsm ? pkg.module : pkg.main;
|
const outputFile = isEsm ? pkg.module : pkg.main;
|
||||||
const basename = path.basename(outputFile);
|
const basename = path.basename(outputFile);
|
||||||
@@ -71,7 +73,7 @@ const config = (isEsm) => {
|
|||||||
const esmExternals = peers;
|
const esmExternals = peers;
|
||||||
|
|
||||||
// peers that are not devDeps should be externals for full bundle
|
// peers that are not devDeps should be externals for full bundle
|
||||||
const bundleExternals = peers.filter(p => typeof (pkg.devDependencies || {})[p] === 'undefined');
|
const bundleExternals = peers.filter((p) => typeof (pkg.devDependencies || {})[p] === 'undefined');
|
||||||
|
|
||||||
const external = isEsm ? esmExternals : bundleExternals;
|
const external = isEsm ? esmExternals : bundleExternals;
|
||||||
const globals = {};
|
const globals = {};
|
||||||
@@ -157,6 +159,6 @@ const config = (isEsm) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [
|
||||||
config(),
|
watch ? false : config(),
|
||||||
config(true),
|
config(true),
|
||||||
];
|
].filter(Boolean);
|
||||||
|
|||||||
Reference in New Issue
Block a user