Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e90d12
commit b2725f7
Showing
12 changed files
with
129 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,6 @@ export { | |
|
||
export { | ||
Camera, | ||
BoxGeometry, | ||
Geometry, | ||
Material, | ||
Mesh, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,41 @@ | ||
// deletes project artifacts | ||
export async function clean() { | ||
await folder('./node_modules').delete().exec().catch(() => {}) | ||
await folder('./pack').delete().exec().catch(() => {}) | ||
await file('./index.js').delete().exec().catch(() => {}) | ||
await folder('node_modules').delete().exec().catch(() => {}) | ||
await folder('pack').delete().exec().catch(() => {}) | ||
await file('index.js').delete().exec().catch(() => {}) | ||
} | ||
|
||
// builds the project | ||
export async function build() { | ||
await shell('tsc-bundle ./src/tsconfig.json --outFile ./index.js').exec() | ||
await shell('tsc-bundle src/tsconfig.json --outFile index.js').exec() | ||
} | ||
|
||
// runs the software in watch mode. | ||
export async function watch() { | ||
await build() | ||
await Promise.all([ | ||
shell('tsc-bundle ./src/tsconfig.json --outFile ./index.js --watch').exec(), | ||
shell('tsc-bundle src/tsconfig.json --outFile index.js --watch').exec(), | ||
shell('smoke-run index.js -x node index').exec() | ||
]) | ||
} | ||
|
||
// compiles and packs this demo | ||
export async function pack() { | ||
await shell('tsc-bundle ./src/tsconfig.json --outFile ./pack/index.js').exec() | ||
await file('./pack/index.js').prepend('#!/usr/bin/env node\n').exec() | ||
await folder('./pack').add('./scene').exec() | ||
await folder('./pack/scene').remove('source').exec() | ||
await folder('./pack').add('./package.json').exec() | ||
await folder('./pack').add('./terminal.gif').exec() | ||
await folder('./pack').add('./readme.md').exec() | ||
await folder('./pack').add('./license').exec() | ||
await folder('pack').delete().exec() | ||
await shell('tsc-bundle src/tsconfig.json --outFile pack/index.js').exec() | ||
await file('pack/index.js').prepend('#!/usr/bin/env node\n').exec() | ||
await folder('pack').add('scene').exec() | ||
await folder('pack/scene').remove('source').exec() | ||
await folder('pack').add('package.json').exec() | ||
await folder('pack').add('terminal.gif').exec() | ||
await folder('pack').add('readme.md').exec() | ||
await folder('pack').add('license').exec() | ||
await shell('cd pack && npm pack').exec() | ||
} | ||
|
||
// installs the 'zero-zx81' demo. | ||
export async function install_cli() { | ||
await pack() | ||
const package = JSON.parse(await file('./package.json').read('utf-8')) | ||
await shell(`cd ./pack && npm install zero-demo-${package['version']}.tgz -g`).exec() | ||
const package = JSON.parse(await file('package.json').read('utf-8')) | ||
await shell(`cd pack && npm install zero-demo-${package['version']}.tgz -g`).exec() | ||
} |