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

rebuild-native-modules workflow #22

Open
Wortex17 opened this issue Mar 8, 2015 · 4 comments
Open

rebuild-native-modules workflow #22

Wortex17 opened this issue Mar 8, 2015 · 4 comments

Comments

@Wortex17
Copy link

Wortex17 commented Mar 8, 2015

Can you document / explain what rebuild-native-modules exactly does?
Which modules (where) does it rebuild? Can i define the directory where the packages lie that need to be rebuilt? (if they are not in the default directory).
Does it rebuild them matching the previously generated custom distribution?

In line of that question, is this feedback when running it expected?:

 Found existing node.js installation, skipping install to save time!
Warning: Arguments to path.resolve must be strings Use --force to continue.
@anaisbetts
Copy link
Owner

rebuild-native-modules recompiles all of the modules you've installed via npm install to be compatible with Atom Shell (on initial install, they will be built against your system's node.js, which won't work). You don't need to define a directory, it will always be looking through your app's packages (even if they are >2nd level dependencies i.e. a JS lib which depends on a native module). Basically, if it works right, you don't have to think about it at all :)

The warning isn't expected, can you run with --verbose --stack?

@Wortex17
Copy link
Author

Wortex17 commented Mar 8, 2015

So, if I understood correctly, I "only" looks at the modules installed at the package.json from where grunt was started too, right?
Is it possible to define a different package / root directory for that process?
My workflow is different as I have a project which builds a branded atom-shell (by using grunt-build-atom-shell), but a seperate project which actually contains the modules (this will be the app later started with the custom branded shell). they are not the same and thus do not share a package.json
I wanted to seperate the logic between building the shell and building the app within.
For this purpose, it would be really usefull if I could decide where the native-module rebuilding is executed in.

The warning isn't expected, can you run with --verbose --stack?

Will do, while opening a seperate issue for that

@anaisbetts
Copy link
Owner

@Wortex17 I believe it looks at the root package.json. I'm not sure that this supports your scenario out of the box, but I'd take a PR to make it work

@Wortex17
Copy link
Author

Wortex17 commented Mar 9, 2015

Hmm i'm wondering what it would need to be configurable this way.
I think it would be sufficient to change the cwd somewhere the rebuild-native-modules task.
grunt-build-atom-shell works different that most of the other grunt modules I'm used to. Currently there is no way to define mutliple build setups (just a global configuration used for all tasks), so I guess I would have to provide a setting in the config to set the cwd of the r-n-m task.

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