File tree 3 files changed +1
-25
lines changed
3 files changed +1
-25
lines changed Original file line number Diff line number Diff line change 3
3
4
4
*
5
5
6
- # TODO remove bundles (which in the tarball are inside `build`) in v7
7
- ! /build /** /*
8
-
9
6
! /dist /** /*
10
7
! /esm /** /*
11
8
! /types /** /*
Original file line number Diff line number Diff line change 43
43
"build:es5:watch" : " yarn build:cjs:watch # *** backwards compatibility - remove in v7 ***" ,
44
44
"build:esm:watch" : " tsc -p tsconfig.esm.json --watch" ,
45
45
"build:types:watch" : " tsc -p tsconfig.types.json --watch" ,
46
- "build:npm" : " ts-node ../../scripts/prepack.ts --bundles --skipBundleCopy && npm pack ./build/npm" ,
46
+ "build:npm" : " ts-node ../../scripts/prepack.ts --bundles && npm pack ./build/npm" ,
47
47
"circularDepCheck" : " madge --circular src/index.ts" ,
48
48
"clean" : " rimraf dist esm build coverage *.js.map *.d.ts" ,
49
49
"fix" : " run-s fix:eslint fix:prettier" ,
Original file line number Diff line number Diff line change 7
7
*/
8
8
9
9
import * as fs from 'fs' ;
10
- import * as fse from 'fs-extra' ;
11
10
import * as path from 'path' ;
12
11
13
12
const NPM_BUILD_DIR = 'build/npm' ;
@@ -49,26 +48,6 @@ ASSETS.forEach(asset => {
49
48
}
50
49
} ) ;
51
50
52
- // TODO remove in v7! Until then:
53
- // copy CDN bundles into npm dir to temporarily keep bundles in npm tarball
54
- // inside the tarball, they are located in `build/`
55
- // for now, copy it by default, unless explicitly forbidden via an command line arg
56
- const tmpCopyBundles = packageWithBundles && ! process . argv . includes ( '--skipBundleCopy' ) ;
57
- if ( tmpCopyBundles ) {
58
- const npmTmpBundlesPath = path . resolve ( buildDir , 'build' ) ;
59
- const cdnBundlesPath = path . resolve ( 'build' , 'bundles' ) ;
60
- try {
61
- if ( ! fs . existsSync ( npmTmpBundlesPath ) ) {
62
- fs . mkdirSync ( npmTmpBundlesPath ) ;
63
- }
64
- void fse . copy ( cdnBundlesPath , npmTmpBundlesPath ) ;
65
- } catch ( error ) {
66
- console . error ( `Error while tmp copying CDN bundles to ${ buildDir } ` ) ;
67
- process . exit ( 1 ) ;
68
- }
69
- }
70
- // end remove
71
-
72
51
// package.json modifications
73
52
const packageJsonPath = path . resolve ( buildDir , 'package.json' ) ;
74
53
// eslint-disable-next-line @typescript-eslint/no-var-requires
You can’t perform that action at this time.
0 commit comments