Partial builds with NPM package?
See original GitHub issueI’m using Webpack now and I’m wondering if something like “custom builds” is possible when using NPM version of the package. Since Bluebird is already modularized, it would be nice if there was some way of excluding features I’m not using.
For now I’ll fork it and do
require('./timers.js')(Promise,INTERNAL);
// require('./any.js')(Promise,Promise$_CreatePromiseArray,PromiseArray);
// require('./race.js')(Promise,INTERNAL);
require('./call_get.js')(Promise);
// require('./filter.js')(Promise,Promise$_CreatePromiseArray,PromiseArray,apiRejection);
// require('./generators.js')(Promise,apiRejection,INTERNAL);
// require('./map.js')(Promise,PromiseArray,INTERNAL,apiRejection);
// require('./nodeify.js')(Promise);
// require('./promisify.js')(Promise,INTERNAL);
// require('./props.js')(Promise,PromiseArray);
// require('./reduce.js')(Promise,Promise$_CreatePromiseArray,PromiseArray,apiRejection,INTERNAL);
// require('./settle.js')(Promise,Promise$_CreatePromiseArray,PromiseArray);
// require('./some.js')(Promise,Promise$_CreatePromiseArray,PromiseArray,apiRejection);
require('./progress.js')(Promise,isPromiseArrayProxy);
require('./cancel.js')(Promise,INTERNAL);
but it would be cool to have a better solution.
Edit: Oh wait, I can’t fork it and edit since this is generated.
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
Run npm install only when needed and/or partially
An approach that works for me is to use MSBuild incremental build support in ... Unfortunately there's no way to install only the...
Read more >html-partials-compiler - npm
html-partials-compiler. Easily build a static html file by including html partials using npm. This is open source software.
Read more >How To Speed Up Continuous Integration Build With New ...
How To Speed Up Continuous Integration Build With New NPM CI And package-lock.json. It never hurts to get some more speed ( ...
Read more >How to make your own npm package with typescript
There is a lot of mystery around making your own npm package. ... We can use this to do incremental/watch builds npm run...
Read more >cash/partial_builds.md at master - GitHub
Partial Builds. Cash is bundled using minipacco, therefore it supports partial builds out of the box. Guide. Replace the content of src/methods.ts with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just an update that we’re working with v8 to have long stack traces in production by default for native promises. My approach (personally) over the last few years has been to try and improve the native promises situation.
That said - you can always just run the partial build (with the build tool) and
require
that.v3.5.1 (latest) actually ships the core (partial) build to NPM-- no building necessary. Switched to that, and shaved off a few kb’s. Thanks.