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

Rebuilding native modules causes issues with native modules used in grunt tasks #29

Open
maxkorp opened this issue Apr 10, 2015 · 3 comments

Comments

@maxkorp
Copy link
Contributor

maxkorp commented Apr 10, 2015

In my case, we're trying to use https://github.com/bwin/grunt-asar for packaging up our application contents, but when the build-atom-shell task runs, it rebuilds that task as well. Is there a way with npm to call rebuild only for dependencies, and not devdependencies? That might resolve the issue.

@maxkorp
Copy link
Contributor Author

maxkorp commented Apr 10, 2015

Hrm, apparently not
npm/npm#5952

However I'm not sure that would be ideal anyways. As I mentioned in #26, I have a separate module that gets prepared for build elsewhere. Currently, once that's done, I just copy it in it's ready-to-build state into node_modules. That works, but if we only did dependencies, I wouldn't be able to do that anymore.

Perhaps an optional config parameter for nativeModulesToRebuild or something? and if it's null, just rebuild all like it currently does? I imagine it would still recurse. I'd be happy to try putting that in (I'm no good with Coffeescript, or RX.js but I don't think that would stop me) if it would be welcome.

@anaisbetts
Copy link
Owner

Hm, in Atom proper, the build folder gets its own package.json / node_modules, this should work. It'd be Hard(tm) to build some kind of filter, we don't have much control over this at all - we just ask npm to rebuild the module.

@maxkorp
Copy link
Contributor Author

maxkorp commented Apr 15, 2015

That's one way to handle it, and it's certainly not bad, although it might be a bit cleaner if we can handle the same folder solution. npm rebuild can take one or more specific modules to rebuild, so we could say if nativeModulesToRebuild or whatever is specified, we can just call npm rebuild moduleA moduleD

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

No branches or pull requests

2 participants