Set up npm run build to build dyna3

This commit is contained in:
Glen Whitney 2019-12-09 12:08:05 -05:00
parent 660f42b31f
commit 83318c7884
2 changed files with 8 additions and 1 deletions

View File

@ -5,6 +5,13 @@
"private": "true", "private": "true",
"main": "dyna3.js", "main": "dyna3.js",
"scripts": { "scripts": {
"clean": "rm -r site",
"prebuild": "npm run clean",
"build:coffee": "coffee -o site -c -m src/*.litcoffee",
"build:ext":
"coffee src/helpers/pkglock_to_externals.litcoffee > site/externals.js",
"build:copy": "cp src/*.html site && cp -r node_modules site",
"build": "npm run build:coffee && npm run build:ext && npm run build:copy",
"test": "qunit" "test": "qunit"
}, },
"repository": { "repository": {

View File

@ -14,7 +14,7 @@ When you load dyna3, you should initially see a three-dimensional coordinate sys
scene = new J3.Scene() scene = new J3.Scene()
geometry = new J3.SphereBufferGeometry(1, 5, 5) geometry = new J3.SphereBufferGeometry(1, 5, 5)
material = new J3.MeshBasicMaterial( {color: 0x0000ff} ) material = new J3.MeshBasicMaterial {color: 0xff00ff}
ball = new J3.Mesh(geometry, material) ball = new J3.Mesh(geometry, material)
scene.add ball scene.add ball