Skip to content

Commit

Permalink
once again fiddle with browserify
Browse files Browse the repository at this point in the history
  • Loading branch information
boneskull committed May 27, 2020
1 parent e79ee45 commit 5df8f53
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
1 change: 0 additions & 1 deletion .eslintrc.yml
Expand Up @@ -32,7 +32,6 @@ overrides:
- 'bin/*'
- 'docs/_data/**/*.js'
- 'lib/cli/**/*.js'
- 'lib/growl.js'
- 'lib/nodejs/**/*.js'
- 'scripts/**/*.js'
- 'test/integration/helpers.js'
Expand Down
6 changes: 5 additions & 1 deletion karma.conf.js
Expand Up @@ -37,7 +37,11 @@ module.exports = config => {
.ignore('supports-color')
.ignore('./lib/esm-utils.js')
.ignore('./lib/cli/*.js')
.ignore('./lib/nodejs/*.js')
.ignore('./lib/nodejs/serializer.js')
.ignore('./lib/nodejs/worker.js')
.ignore('./lib/nodejs/buffered-worker-pool.js')
.ignore('./lib/nodejs/buffered-runner.js')
.ignore('./lib/nodejs/reporters/buffered.js')
.on('bundled', (err, content) => {
if (err) {
throw err;
Expand Down
2 changes: 1 addition & 1 deletion lib/mocha.js
Expand Up @@ -9,7 +9,7 @@
var escapeRe = require('escape-string-regexp');
var path = require('path');
var builtinReporters = require('./reporters');
var growl = require('./growl');
var growl = require('./nodejs/growl');
var utils = require('./utils');
var mocharc = require('./mocharc.json');
var errors = require('./errors');
Expand Down
4 changes: 2 additions & 2 deletions lib/growl.js → lib/nodejs/growl.js
Expand Up @@ -8,8 +8,8 @@
const os = require('os');
const path = require('path');
const {sync: which} = require('which');
const {EVENT_RUN_END} = require('./runner').constants;
const {isBrowser} = require('./utils');
const {EVENT_RUN_END} = require('../runner').constants;
const {isBrowser} = require('../utils');

/**
* @summary
Expand Down
16 changes: 15 additions & 1 deletion package-scripts.js
Expand Up @@ -34,7 +34,21 @@ function test(testName, mochaParams) {
module.exports = {
scripts: {
build: {
script: `browserify -e browser-entry.js --plugin ./scripts/dedefine --ignore './lib/cli/*.js' --ignore './lib/esm-utils.js' --ignore 'chokidar' --ignore 'fs' --ignore 'glob' --ignore 'path' --ignore 'supports-color' --ignore './lib/nodejs/*.js' -o mocha.js`,
script: `browserify -e browser-entry.js \
--plugin ./scripts/dedefine \
--ignore 'chokidar' \
--ignore 'fs' \
--ignore 'glob' \
--ignore 'path' \
--ignore 'supports-color' \
--ignore './lib/cli/*.js' \
--ignore './lib/esm-utils.js' \
--ignore './lib/nodejs/serializer.js' \
--ignore './lib/nodejs/buffered-runner.js' \
--ignore './lib/nodejs/reporters/buffered.js' \
--ignore './lib/nodejs/worker.js' \
--ignore './lib/nodejs/buffered-worker-pool.js' \
-o mocha.js`,
description: 'Build browser bundle'
},
lint: {
Expand Down
8 changes: 6 additions & 2 deletions package.json
Expand Up @@ -156,15 +156,19 @@
},
"browser": {
"./index.js": "./browser-entry.js",
"./lib/growl.js": "./lib/browser/growl.js",
"./lib/nodejs/growl.js": "./lib/browser/growl.js",
"tty": "./lib/browser/tty.js",
"./lib/cli/*.js": false,
"chokidar": false,
"fs": false,
"glob": false,
"path": false,
"supports-color": false,
"./lib/nodejs/*.js": false
"./lib/nodejs/serializer.js": false,
"./lib/nodejs/worker.js": false,
"./lib/nodejs/buffered-worker-pool.js": false,
"./lib/nodejs/buffered-runner.js": false,
"./lib/nodejs/reporters/buffered.js": false
},
"prettier": {
"singleQuote": true,
Expand Down

0 comments on commit 5df8f53

Please sign in to comment.