- How do I setup the project for development?
- What's the development workflow?
- Why do my files automatically change?
- I can't make a "Work in progress" commit because the build is broken
- Why are the dev tools scripts so verbose?
- Why are there so many config files?
- Why isn't the build bundled or minified?
- Why does the Babel build script contain the
--source-maps
option? - Why does the
format-eslint
script ignore errors? - Why does the
start-src
script use--require node_modules/dotenv/config
?
- If you don't have write access to this repo, fork it
- Clone the repo
- Install dependencies:
npm ci
- Ensure everything is working:
npm run validate
- Use VS Code? Run command
Extensions: Show Recommended Extensions
and install
-
Create a system-wide link for use in other directories:
npm link
-
Start develop mode:
npm run dev
-
For TDD fans:
npm run test--watch
-
Write code
-
Create new temporary directory to test app population named
create-exposed-app-test-my-new-feature
-
Run
npx create-exposed-app
in new directoryNote: This should reference your local
create-exposed-app
copy, setup by previous linking command -
Create a pull request on GitHub
-
Remove the system-wide link:
npm unlink
-
Remove the temporary test directory
create-exposed-app-test-my-new-feature
See ADR-005: Format Files and ADR-006: Format Files Programmatically.
Include the --no-verify
option during the commit:
git commit -m "WIP" --no-verify
See ADR-002: Prefer Configurable Dev Tools.
See ADR-003: Prefer Multiple Config Files.
See ADR-004: Minimally Transform Source Code During Build.
This option is available in the Babel config file (sourceMaps: true
), but has diffrent behaviour. Only the command line supports the creation of .map
files. See babel/babel#5261.
Linting errors should not be reported when formatting, that it was the lint
command is for.
Errors are ignored by appending the following: >/dev/null 2>&1 || true
.
The recommended setup advises preloading with --require dotenv/config
. However due to a known problem in Babel, this must be prefixed with node_modules
.