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

1.3.0 to enable in browser usage. #26

Merged
merged 7 commits into from Mar 30, 2015
Merged

1.3.0 to enable in browser usage. #26

merged 7 commits into from Mar 30, 2015

Conversation

MoOx
Copy link
Collaborator

@MoOx MoOx commented Mar 30, 2015

@Nyalab here is a proposal for 1.3.0

  • Added: better exception messages
  • 6to5 to babel (note the babel-tape-runner thing + lots of import * as changes)
  • Added: full browserify compatibility (by avoiding dynamic require)
  • Optimisation for node: lazyload hardcoded require when needed.

If you are ok with that, just tell me so I can merge and release.

Note that babel-node behave now as node (just execute one file), that’s
why we need to use babel-tape-runner.
This commit is an optimisation for node of the previous browserify
enhancement and keep the browserify compatibility.
@MoOx
Copy link
Collaborator Author

MoOx commented Mar 30, 2015

Build now pass. See #19 workaround

@ooflorent
Copy link
Contributor

Can you move caniuse-db and shelljs deps to devDependencies?

)
)
.map(file => file.replace(".json", ""))
.map(feature => `"${feature}": function() { return require("${path.join("caniuse-db", "features-json", feature)}")}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

Requiring every features will add a lot of bytes to the browser build.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I know. But it's "lot's of bytes" vs "not working at all".

@MoOx
Copy link
Collaborator Author

MoOx commented Mar 30, 2015

caniuse-db is a requirement as well as shelljs since it's used in postinstall hook.
What are your thinking about ?

@ooflorent
Copy link
Contributor

shelljs and caniuse-db are only used during the build and though should not be included as dependencies but dev ones.

@MoOx
Copy link
Collaborator Author

MoOx commented Mar 30, 2015

caniuse-api needs those 2 packages. For real.
shelljs is used to launch the features.js with fresh data on install from caniuse-db. Not before publishing. On install by the end user.

You already try to make some changes for this package but they got reverted because they were breaking everything.

Are you just using caniuse-api somewhere?

@MoOx
Copy link
Collaborator Author

MoOx commented Mar 30, 2015

Also, that totally not the point of the PR so please use another issue for asking those weird changes that don't solve anything :p

@Nyalab
Copy link
Owner

Nyalab commented Mar 30, 2015

looks good to me, you can merge when you want :shipit:

MoOx added a commit that referenced this pull request Mar 30, 2015
1.3.0 to enable in browser usage.
@MoOx MoOx merged commit 01fb024 into master Mar 30, 2015
@MoOx MoOx deleted the better-exception branch March 30, 2015 08:29
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

3 participants