# HG changeset patch # User Drew Perttula # Date 2019-06-05 06:00:40 # Node ID a362b892cb4364fd15fbad5c86ede9f4d59234e9 # Parent 157985a971dc0495d74f70207dcc8e521e5fc651 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) diff --git a/light9/web/light9-vidref-live.js b/light9/web/light9-vidref-live.js --- a/light9/web/light9-vidref-live.js +++ b/light9/web/light9-vidref-live.js @@ -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 { diff --git a/makefile b/makefile --- a/makefile +++ b/makefile @@ -30,15 +30,31 @@ bin/node: 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