File tree 2 files changed +39
-2
lines changed
2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change 47
47
.vs
48
48
.tscache
49
49
* .user
50
- * .js
51
50
* .map
52
51
! gruntfile.js
53
52
node_modules
@@ -76,4 +75,5 @@ packages/**/*.ngsummary.json
76
75
pnpm-lock.yaml
77
76
78
77
packages /** /* 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