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 module build #492

Merged
merged 13 commits into from
Jul 30, 2018
Merged

Add module build #492

merged 13 commits into from
Jul 30, 2018

Conversation

hipstersmoothie
Copy link
Collaborator

@hipstersmoothie hipstersmoothie commented Jul 29, 2018

Module build (still has import/export in output) for ESM and webpack. The future is now!

Also in this PR:

  • actually git ignore the build files. there was a space at the end that made the gitignore still include the files
  • upgrade to babel@7
    • can use .babelrc.js to determine babel setup far more easily without repeating oneself
  • remove babel-preset-stage-0 and add plugins we actually use. the stage- presets are being deprecated
    • @babel/plugin-proposal-class-properties
    • @babel/plugin-syntax-object-rest-spread
  • remove unneeded (default) config from karma.conf.js
  • add karma-browserify to make the test run ridiculously fast.
    • previously took a min or two to start up browser test
    • now it's almost instant
  • remove unused stuff from browser-build.js (I want to delete most of this since we don't use much of it, another PR)
  • only include babel-plugin-source-map-support for "development" env and not browser

Old time running npm run test: 43.04s
New time running npm run test: 72s

  • document module (es) build

@hipstersmoothie
Copy link
Collaborator Author

hipstersmoothie commented Jul 29, 2018

@edi9999 review please 😃

@@ -41,5 +41,9 @@ node_modules

package-lock.json

# Browser Version
browser/lib/*.js
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the files should be deleted if they are in .gitignore (.gitignore only applies to additions, not to modifications)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

they were. it was actually just a whitespace issue. it was:

browser/lib/*.js (space at the end, not ignored)

changed to:

browser/lib/*.js (no space at the end, ignored)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good to merge?

Copy link
Contributor

Choose a reason for hiding this comment

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

The file browser/lib/jimp.min.js is still in the repository in your Pull Request :

https://github.com/hipstersmoothie/jimp/blob/00093b99f32c1f71cc9be4aea613a0e0e52e7a45/browser/lib/jimp.min.js

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oops! addressed this.

@hipstersmoothie
Copy link
Collaborator Author

Added some docs too on the module build and using it with webpack too. 👍

@edi9999 edi9999 merged commit 7c608e8 into jimp-dev:master Jul 30, 2018
@hipstersmoothie hipstersmoothie deleted the module-buidl branch July 30, 2018 09:38
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