https://github.com/eeue56/elm-package-for-production
https://github.com/eeue56/elm-package-for-production
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eeue56/elm-package-for-production
- Owner: eeue56
- License: bsd-3-clause
- Created: 2016-07-12T20:33:03.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-07-12T23:52:51.000Z (almost 9 years ago)
- Last Synced: 2025-04-15T01:15:32.795Z (19 days ago)
- Language: Python
- Size: 8.79 KB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-package-for-production
Wrap around elm-package with config options so you don't have to duplicate everything all the time. Look at [this example file](example/prod_elm_package.json) for an idea on the additional config stuff.
Usage:
- `--app` will compile the app
- `--tests` will compile the tests```
(py3)Noahs-MacBook-Pro:example noah$ python ../prod_package.py --app
Packages configured successfully!
Success! Compiled 0 modules.
Packages configured successfully!
Success! Compiled 1 module.
Successfully generated build/main.js
(py3)Noahs-MacBook-Pro:example noah$ python ../prod_package.py --test
Packages configured successfully!
Success! Compiled 0 modules.
Packages configured successfully!
Success! Compiled 2 modules.
Successfully generated _elm_tests.js
```## Motivation
A lot of Elm code has a file directory that looks like this:
- `elm-package.json`
- `src`
- `test/elm-package.json`Both the elm-package.jsons _should_ be almost exactly the same, except the test one will just add the test deps and sources. So, this generates an actual `elm-package.json` on the fly, compiles the code, then deletes the `elm-package.json`. This will help your production code be more reliable and save your ops team heartache.