File tree Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Expand file tree Collapse file tree 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 4747.vs
4848.tscache
4949* .user
50- * .js
5150* .map
5251! gruntfile.js
5352node_modules
@@ -76,4 +75,5 @@ packages/**/*.ngsummary.json
7675pnpm-lock.yaml
7776
7877packages /** /* js.map
79- packages /** /* js
78+ packages /** /* js
79+ hooks
Original file line number Diff line number Diff line change 1+ const copy = require ( 'recursive-copy' ) ;
2+ const through = require ( 'through2' ) ;
3+
4+ const options = {
5+ overwrite : true ,
6+ expand : true ,
7+ dot : true ,
8+ junk : true ,
9+ filter : [ '**/*' ] ,
10+ rename ( filePath ) {
11+ return filePath . replace ( / ( .* ) \. j s ( \. m a p ) ? $ / , '$1.mjs$2' ) ;
12+ } ,
13+ transform ( src , dest , stats ) {
14+ return through ( function ( chunk , enc , done ) {
15+ const output = chunk . toString ( ) . replace ( / ( (?: (?: " f i l e " : " ) | s o u r c e M a p p i n g U R L = ) .* ) \. j s ( \. m a p ) ? / g, '$1.mjs$2' ) ;
16+ done ( null , output ) ;
17+ } ) ;
18+ } ,
19+ } ;
20+
21+ copy ( './build/esm' , './' , options )
22+ // .on(copy.events.COPY_FILE_START, function (copyOperation) {
23+ // console.info('Copying file ' + copyOperation.src + '...');
24+ // })
25+ . on ( copy . events . COPY_FILE_COMPLETE , function ( copyOperation ) {
26+ console . info ( 'Copied to ' + copyOperation . dest ) ;
27+ } )
28+ . on ( copy . events . ERROR , function ( error , copyOperation ) {
29+ console . error ( 'Unable to copy ' + copyOperation . dest ) ;
30+ } )
31+ . then ( function ( results ) {
32+ console . info ( results . length + ' file(s) copied' ) ;
33+
34+ } )
35+ . catch ( function ( error ) {
36+ return console . error ( 'Copy failed: ' + error ) ;
37+ } ) ;
You can’t perform that action at this time.
0 commit comments