Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build process with browserify (closes #21) #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marcofugaro
Copy link

@marcofugaro marcofugaro commented Aug 25, 2018

This library is currently written in node. In this PR, browserify generates that code into a bundle that is usable from a browser and with other build tools that are not browserify.

Closes #21

@marcofugaro
Copy link
Author

@freeman-lab @rreusser anyone?

package.json Outdated
"scripts": {
"start": "watchify-server example.js | garnish",
"test": "standard && browserify test.js | smokestack | tap-spec",
"build": "browserify demo/index.js -o demo/bundle.js",
"deploy": "npm run build && surge demo control-panel.surge.sh"
"build": "browserify -s control index.js -o build/control-panel.js",
Copy link
Contributor

@rreusser rreusser Sep 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be appropriate to add the es2040 browserify transform to this, i.e.:

browserify -s control index.js -o build/control-panel.js -t es2040

This repo uses template strings (const too, I think?) which at this point are mostly supported, but my iPad, for one, fails with const and template strings so that it's probably best to just transpile to ES5 while we're at it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, makes sense

@rreusser
Copy link
Contributor

rreusser commented Sep 4, 2018

Thanks for the PR! It seems pretty straightforward and seems like the right move!

@marcofugaro
Copy link
Author

Thank you! This plugin looks nicer and has a better api than dat.gui, it's a shame it was usable only with browserify. Happy to help

@rreusser
Copy link
Contributor

rreusser commented Sep 5, 2018

Oh, whoopsie. I'm glad to help get this merged, but looks like I don't have permissions. /ping @freeman-lab 😄

Also, @marcofugaro It might be of interest that I've been working on a new version of this which you can find here: https://rreusser.github.io/control-panel-2/ https://github.com/rreusser/control-panel-2 It has the additional feature that the state behaves like a regular object. You can wrap it in a UI which connects to events so that modifications feed right back into the UI. It needs some work in order to get it over the line, but the primary goal was to address some recurring needs based on lots of usage of control-panel.

@marcofugaro
Copy link
Author

@rreusser nice! really interesting approach! keep it up!

@marcofugaro
Copy link
Author

@freeman-lab You don't want to merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants