-
Notifications
You must be signed in to change notification settings - Fork 98
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
Example for package that uses npm to build artifacts #65
Comments
I'm also trying to figure this out at the moment. Would appreciate some directions |
I just briefly checked the package and the NPM deployment seems to work. However, I assume that you also want to create a Zip package with: npm run package Can you clarify this a bit? |
I'm mainly just struggling to work out how to create a nice nix derivation that produces the artifacts output by This may in fact be easy, which is why I'm mainly asking for an example! |
Can't you do something like this? First generate the expressions with { nixpkgs ? <nixpkgs>
, system ? builtins.currentSystem
}:
(import ./default.nix {
pkgs = import nixpkgs { inherit system; };
inherit system;
}).package.override {
postInstall = ''
patchShebangs node_modules
npm run package
'';
} I was not able to fully deploy the package because for some mysterious reason |
Just a question, are we meant to be using |
I've been struggling all day with a package that uses npm scripts to produce bundled artifacts, rather than being used directly via npm install.
I found it pretty difficult to work out how to use the tooling here for that - an example in the README would go a long way.
The text was updated successfully, but these errors were encountered: