From 83318c78848ed3edac75b62c41757a6d6770105b Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Mon, 9 Dec 2019 12:08:05 -0500 Subject: [PATCH] Set up npm run build to build dyna3 --- package.json | 7 +++++++ src/dyna3.litcoffee | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 711baa6..2cfdff0 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,13 @@ "private": "true", "main": "dyna3.js", "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" }, "repository": { diff --git a/src/dyna3.litcoffee b/src/dyna3.litcoffee index ffd2fa8..092cfd3 100644 --- a/src/dyna3.litcoffee +++ b/src/dyna3.litcoffee @@ -14,7 +14,7 @@ When you load dyna3, you should initially see a three-dimensional coordinate sys scene = new J3.Scene() 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) scene.add ball