This repository was archived by the owner on Mar 31, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-10
lines changed
Expand file tree Collapse file tree 3 files changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -4,20 +4,24 @@ const colors = require('colors');
44const exec = require ( 'child_process' ) . exec ;
55const pkg = require ( '../package.json' ) ;
66
7+ const basename = 'cashcash'
8+ const packageName = 'CashCash' ;
9+ const releaseYear = 2016 ;
10+
711const preamble = `/*!
8- * CashCash ${ pkg . version }
12+ * ${ packageName } ${ pkg . version }
913 *
1014 * ${ pkg . description }
1115 *
1216 * Source code available at: ${ pkg . homepage }
1317 *
14- * (c) 2016 -present ${ pkg . author . name } (${ pkg . author . url } )
18+ * (c) ${ releaseYear } -present ${ pkg . author . name } (${ pkg . author . url } )
1519 *
16- * CashCash may be freely distributed under the ${ pkg . license } license.
20+ * ${ packageName } may be freely distributed under the ${ pkg . license } license.
1721 */
1822` ;
1923
20- exec ( `$(npm bin)/uglifyjs src/cashcash .js --beautify 'indent-level=2' --preamble '${ preamble } ' --output dist/cashcash .js` ) ;
21- exec ( `$(npm bin)/uglifyjs src/cashcash .js --compress --mangle --preamble '${ preamble } ' --output dist/cashcash .min.js` ) ;
24+ exec ( `$(npm bin)/uglifyjs src/${ basename } .js --beautify 'indent-level=2' --preamble '${ preamble } ' --output dist/${ basename } .js` ) ;
25+ exec ( `$(npm bin)/uglifyjs src/${ basename } .js --compress --mangle --preamble '${ preamble } ' --output dist/${ basename } .min.js` ) ;
2226
23- console . log ( colors . green ( `CashCash ${ pkg . version } built successfully!` ) ) ;
27+ console . log ( colors . green ( `${ packageName } ${ pkg . version } built successfully!` ) ) ;
Original file line number Diff line number Diff line change @@ -5,16 +5,18 @@ const commaNumber = require('comma-number');
55const fs = require ( 'fs' ) ;
66const gzipSize = require ( 'gzip-size' ) ;
77
8+ const basename = 'cashcash' ;
9+
810const table = new cliTable ( {
911 style : {
1012 head : [ 'cyan' ]
1113 }
1214} ) ;
1315
1416table . push (
15- { 'Uncompressed' : `${ commaNumber ( fs . statSync ( ' dist/cashcash .js' ) . size ) } bytes` } ,
16- { 'Minified' : `${ commaNumber ( fs . statSync ( ' dist/cashcash .min.js' ) . size ) } bytes` } ,
17- { 'Minified + gzipped' : `${ commaNumber ( gzipSize . sync ( fs . readFileSync ( ' dist/cashcash .min.js' ) ) ) } bytes` }
17+ { 'Uncompressed' : `${ commaNumber ( fs . statSync ( ` dist/${ basename } .js` ) . size ) } bytes` } ,
18+ { 'Minified' : `${ commaNumber ( fs . statSync ( ` dist/${ basename } .min.js` ) . size ) } bytes` } ,
19+ { 'Minified + gzipped' : `${ commaNumber ( gzipSize . sync ( fs . readFileSync ( ` dist/${ basename } .min.js` ) ) ) } bytes` }
1820) ;
1921
2022console . log ( table . toString ( ) ) ;
Original file line number Diff line number Diff line change @@ -9,6 +9,8 @@ function colorizedText(color, text) {
99} ;
1010
1111puppeteer . launch ( { args : [ '--no-sandbox' ] } ) . then ( async browser => {
12+ console . log ( 'Started' ) ;
13+
1214 const page = await browser . newPage ( ) ;
1315
1416 let statuses = [ ] ;
@@ -95,7 +97,6 @@ puppeteer.launch({ args: ['--no-sandbox'] }).then(async browser => {
9597
9698 console . log ( stats ) ;
9799 console . log ( 'Finished in ' + ( executionTime / 1000 ) + ' seconds' ) ;
98- console . log ( '' ) ;
99100
100101 await browser . close ( ) ;
101102
You can’t perform that action at this time.
0 commit comments