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

removal of browser.js in favor of browserify --standalone #3

Open
jakeburden opened this issue Aug 4, 2016 · 1 comment
Open

removal of browser.js in favor of browserify --standalone #3

jakeburden opened this issue Aug 4, 2016 · 1 comment

Comments

@jakeburden
Copy link
Member

We may be able to remove the browser.js file and change our build steps to look more like this:

"watch:js": "watchify -s src/index.js -o dist/openshare.js -dv",
"build:js": "browserify -s src/index.js -g uglifyify | uglifyjs -cm > dist/openshare.js",

notice the -s flag and change in entry point from src/browser.js to src/index.js

from the browserify docs:

--standalone -s  Generate a UMD bundle for the supplied export name.
                   This bundle works with other module systems and sets the name
                   given as a window global if no module system is found.
@jakeburden
Copy link
Member Author

jakeburden commented Oct 25, 2016

some problems have been reported with gulp build systems not playing well with the pre-compiled version.

I think think fixing this issue would resolve those issues.

until then use this cdn for a pre-compiled version:

<script  src='https://cdn.rawgit.com/OpenShare/openshare/master/dist/openshare.js'></script>

npm/browserify run scripts seem to work well for me as well but that might not be the case for everyone

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

No branches or pull requests

1 participant