Skip to content

Commit d5bf6b6

Browse files
Akul Guptalynndang
Akul Gupta
authored and
lynndang
committed
[aframe-1.4.1] update npm run dist build process
1 parent 6be49cf commit d5bf6b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "dist/aframe-master.js",
77
"scripts": {
88
"dev": "cross-env INSPECTOR_VERSION=dev webpack serve --port 8080",
9-
"dist": "node scripts/updateVersionLog.js && node scripts/buildTo.js",
9+
"dist": "rm -rf dist && node scripts/updateVersionLog.js && node scripts/buildTo.js",
1010
"dist:max": "webpack --config webpack.config.js",
1111
"dist:min": "webpack --config webpack.prod.config.js",
1212
"docs": "markserv --dir docs --port 9001",

scripts/buildTo.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ var name = process.argv[2] || '8frame-master';
55

66
console.log('Building 8frame as:', name);
77

8-
const distMin = pkg.scripts['dist:min'].replace(/aframe-master/g, name);
9-
const distMax = pkg.scripts['dist:max'].replace(/aframe-master/g, name);
8+
const distMin = pkg.scripts['dist:min'] + ` --output-filename ${name}.min.js`;
9+
const distMax = pkg.scripts['dist:max'] + ` --output-filename ${name}.js`;
1010

1111
console.log('>', distMin);
1212
execSync(distMin, {stdio: 'inherit'});

0 commit comments

Comments
 (0)