File tree Expand file tree Collapse file tree 3 files changed +1
-25
lines changed Expand file tree Collapse file tree 3 files changed +1
-25
lines changed Original file line number Diff line number Diff line change 33
44*
55
6- # TODO remove bundles (which in the tarball are inside `build`) in v7
7- ! /build /** /*
8-
96! /dist /** /*
107! /esm /** /*
118! /types /** /*
Original file line number Diff line number Diff line change 4343 "build:es5:watch" : " yarn build:cjs:watch # *** backwards compatibility - remove in v7 ***" ,
4444 "build:esm:watch" : " tsc -p tsconfig.esm.json --watch" ,
4545 "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" ,
4747 "circularDepCheck" : " madge --circular src/index.ts" ,
4848 "clean" : " rimraf dist esm build coverage *.js.map *.d.ts" ,
4949 "fix" : " run-s fix:eslint fix:prettier" ,
Original file line number Diff line number Diff line change 77*/
88
99import * as fs from 'fs' ;
10- import * as fse from 'fs-extra' ;
1110import * as path from 'path' ;
1211
1312const NPM_BUILD_DIR = 'build/npm' ;
@@ -49,26 +48,6 @@ ASSETS.forEach(asset => {
4948 }
5049} ) ;
5150
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-
7251// package.json modifications
7352const packageJsonPath = path . resolve ( buildDir , 'package.json' ) ;
7453// eslint-disable-next-line @typescript-eslint/no-var-requires
You can’t perform that action at this time.
0 commit comments