Changeset - a362b892cb43
[Not reviewed]
default
0 2 0
Drew Perttula - 6 years ago 2019-06-05 06:00:40
drewp@bigasterisk.com
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)
2 files changed with 20 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/web/light9-vidref-live.js
Show inline comments
 
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 {
 
    
 
    static get properties() {
 
        return {
 
            description: { type: String }
 
        };
 
    }
 

	
 
    static get styles() {
 
        return css`
 
        :host {
 
            border: 2px solid #46a79f;
 
            display: inline-block;
 
        }
 
        `;
 
    }
 

	
 
    firstUpdated() {
 
        const ws = reconnectingWebSocket('live', (msg) => {
 
            this.shadowRoot.querySelector('#live').src = 'data:image/jpeg;base64,' + msg.jpeg;
 
            this.description = msg.description;
 
        });
 
        
makefile
Show inline comments
 
@@ -9,57 +9,73 @@ gst_packages:
 
PYTHON=/usr/bin/python3
 

	
 
create_virtualenv:
 
	mkdir -p env
 
	virtualenv -p $(PYTHON) env
 
	env/bin/pip install -U pip
 
	ln -sf ../env/bin/python bin/python
 

	
 
install_python_deps:
 
	env/bin/pip install --index-url https://projects.bigasterisk.com/ --extra-index-url https://pypi.org/simple -U -r requirements.txt
 

	
 
binexec:
 
	chmod a+x bin/*
 

	
 

	
 
node_modules/bower/bin/bower:
 
	npm install
 

	
 
bin/node:
 
	ln -sf `which nodejs` 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
 

	
 
effect_node_setup: create_virtualenv packages binexec install_python_deps
 

	
 
tkdnd_build:
 
	# get tkdnd r95 with subversion
 
	# then apply tkdnd-patch-on-r95 to that
 
	cd tkdnd/trunk
 
	./configure
 
	make
 

	
 
### build ###
 

	
 
coffee:
 
	zsh -c 'cd light9/web; ../../node_modules/coffeescript/bin/coffee --map -cw {.,live,timeline,paint,effects}/*.coffee'
 

	
 
mypy:
 
	inv mypy
 

	
 
reformat:
 
	inv reformat
 

	
 
### show ###
0 comments (0 inline, 0 general)