Skip to content
This repository has been archived by the owner on Feb 15, 2023. It is now read-only.

feat: nixify the template #269

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

johnrichardrinehart
Copy link

@johnrichardrinehart johnrichardrinehart commented Nov 15, 2021

Description

I'm on NixOS and so I try my best to keep project-specific build tools out of my PATH. There are other developers like me who would like to start with this template, but would have to either embrace some system side-effects (installing rollup, npm, etc. to the global PATH) or implement something like the solution in this PR.

You should be able to confirm this behavior with

  1. a nix package manager installation or by using https://github.com/DavHau/nix-portable
  2. nix build .

The build output will be in ./result. In my case this looks like

$ tree -L 2 ./result    
./result
├── build
│   ├── bundle.css
│   ├── bundle.js
│   └── bundle.js.map
├── favicon.png
├── global.css
└── index.html

Note that nix develop (to spin up a development shell) will currently spit out some warnings since I've chosen to use NODE_PATH (instead of ln -s the node_modules directory in /nix/store) and rollup doesn't seem to use this environment variable. I've opened rollup/rollup#4271 to address this. If this repository's maintainers would like to wait until that issue is resolved (and possibly until a related PR is merged, there) then we can keep this open until then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant