changeset 1946:a362b892cb43

more makefile hacks to turn debug.js into an ES6 module Ignore-this: 79b9757e462e9007ae4c2c5eaaf9d917 (can't wait for the js build fairy to come clean all this up)
author Drew Perttula <drewp@bigasterisk.com>
date Wed, 05 Jun 2019 06:00:40 +0000
parents 157985a971dc
children 3b2255e3576d
files light9/web/light9-vidref-live.js makefile
diffstat 2 files changed, 20 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/light9/web/light9-vidref-live.js	Wed Jun 05 05:29:06 2019 +0000
+++ b/light9/web/light9-vidref-live.js	Wed Jun 05 06:00:40 2019 +0000
@@ -1,7 +1,8 @@
 import { LitElement, TemplateResult, html, css } from '/node_modules/lit-element/lit-element.js';
-import { debug } from '/lib/debug/debug-build-es6.js';
+import debug from '/lib/debug/debug-build-es6.js';
 debug.enable('*');
-log = debug('live')
+const log = debug('live');
+log('hi it is live')
 
 class Light9VidrefLive extends LitElement {
     
--- a/makefile	Wed Jun 05 05:29:06 2019 +0000
+++ b/makefile	Wed Jun 05 06:00:40 2019 +0000
@@ -30,15 +30,31 @@
 bower: node_modules/bower/bin/bower bin/node
 	cd light9/web/lib; nodejs ../../../node_modules/bower/bin/bower install
 
-npm:
+npm_install:
 	npm install
+
+node_modules/n3/n3-browser.js:
 	(cd node_modules/n3; nodejs ../browserify/bin/cmd.js --standalone N3 --require n3 -o n3-browser.js)
+
+light9/web/lib/debug/debug-build.js:
 	node_modules/browserify/bin/cmd.js light9/web/lib/debug/src/browser.js -o light9/web/lib/debug/debug-build.js --standalone debug
+
+light9/web/lib/debug/debug-build-es6.js:
+	node_modules/browserify/bin/cmd.js light9/web/lib/debug/src/browser.js -o light9/web/lib/debug/debug-build-es6.js --standalone debug
+	echo "export default window.debug;" >> light9/web/lib/debug/debug-build-es6.js
+
+lit_fix:
 	perl -pi -e "s,'lit-html,'/node_modules/lit-html,; s,lit-html',lit-html/lit-html.js'," node_modules/lit-element/lit-element.js
+
+round_fix:
 	perl -pi -e 's/module.exports = rounding/export { rounding }/' node_modules/significant-rounding/index.js
+
+debug_es6: 
 	node_modules/browserify/bin/cmd.js light9/web/lib/debug/src/browser.js -o light9/web/lib/debug/debug-build-es6.js
 	node_modules/cjs-to-es6/index.js light9/web/lib/debug/debug-build-es6.js
 
+npm: npm_install node_modules/n3/n3-browser.js light9/web/lib/debug/debug-build.js light9/web/lib/debug/debug-build-es6.js lit_fix round_fix debug_es6
+
 
 bin/ascoltami2: gst_packages link_to_sys_packages