Skip to content

Commit 5ad172b

Browse files
committed
👟 remove versionTick make task
1 parent f7b8761 commit 5ad172b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ lint:
99

1010
dist: bundle uglify
1111

12-
versionTick:
12+
version:
1313
node ./tasks/version
14-
15-
version: versionTick dist
14+
make dist
1615
git add -A dist js

tasks/bundle.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ const fs = require('fs');
22
const execSync = require('child_process').execSync;
33

44
// get file paths from index.js
5-
let indexSrc = fs.readFileSync( './js/index.js', 'utf8' );
5+
const indexPath = 'js/index.js';
6+
let indexSrc = fs.readFileSync( `./${indexPath}`, 'utf8' );
67
let cjsBlockRegex = /module\.exports = factory\([\w ,'\.\-\(\)\/\n]+;/i;
78
let cjsBlockMatch = indexSrc.match( cjsBlockRegex );
89
let paths = cjsBlockMatch[0].match( /require\('([\.\-\/\w]+)'\)/gi );
910

1011
paths = paths.map( function( path ) {
1112
return path.replace( `require('.`, 'js' ).replace( `')`, '.js' );
1213
});
13-
paths.push('js/index.js');
14+
paths.push( indexPath );
1415

1516
execSync( `cat ${paths.join(' ')} > dist/zdog.dist.js`);
1617

0 commit comments

Comments
 (0)