Skip to content

Commit 7960302

Browse files
committed
removed cjs from build
1 parent 1d82c99 commit 7960302

File tree

3 files changed

+5
-24
lines changed

3 files changed

+5
-24
lines changed

package-scripts.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,28 +16,15 @@ module.exports = {
1616
description: 'delete the dist directory and run all builds',
1717
default: series(
1818
rimraf('dist'),
19-
concurrent.nps(
20-
'build.es',
21-
'build.cjs',
22-
'build.umd.main',
23-
'build.umd.min'
24-
)
19+
concurrent.nps('build.umd.main', 'build.umd.min')
2520
),
26-
es: {
27-
description: 'run the build with rollup (uses rollup.config.js)',
28-
script: 'rollup --config --environment FORMAT:es'
29-
},
30-
cjs: {
31-
description: 'run rollup build with CommonJS format',
32-
script: 'rollup --config --environment FORMAT:cjs'
33-
},
3421
umd: {
3522
min: {
3623
description: 'run the rollup build with sourcemaps',
3724
script: 'rollup --config --sourcemap --environment MINIFY,FORMAT:umd'
3825
},
3926
main: {
40-
description: 'builds the cjs and umd files',
27+
description: 'builds the umd files',
4128
script: 'rollup --config --sourcemap --environment FORMAT:umd'
4229
}
4330
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "redux-form-doc-version-checker",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description":
55
"A widget to notify people if they are not reading the most recent docs.",
66
"main": "dist/doc-check.cjs.js",

rollup.config.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,11 @@ import replace from 'rollup-plugin-replace'
77

88
const minify = process.env.MINIFY
99
const format = process.env.FORMAT
10-
const es = format === 'es'
1110
const umd = format === 'umd'
12-
const cjs = format === 'cjs'
1311

1412
let output
1513

16-
if (es) {
17-
output = { file: `dist/doc-check.es.js`, format: 'es' }
18-
} else if (umd) {
14+
if (umd) {
1915
if (minify) {
2016
output = {
2117
file: `dist/doc-check.umd.min.js`,
@@ -24,15 +20,13 @@ if (es) {
2420
} else {
2521
output = { file: `dist/doc-check.umd.js`, format: 'umd' }
2622
}
27-
} else if (cjs) {
28-
output = { file: `dist/doc-check.cjs.js`, format: 'cjs' }
2923
} else if (format) {
3024
throw new Error(`invalid format specified: "${format}".`)
3125
} else {
3226
throw new Error('no format specified. --environment FORMAT:xxx')
3327
}
3428

35-
const exports = es ? 'named' : 'default'
29+
const exports = 'default'
3630

3731
export default {
3832
name: 'DocChecker',

0 commit comments

Comments
 (0)