Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noredink/jetpack
https://github.com/noredink/jetpack
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/noredink/jetpack
- Owner: NoRedInk
- License: other
- Created: 2017-03-03T15:25:22.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T08:35:05.000Z (4 months ago)
- Last Synced: 2024-12-23T04:06:21.551Z (11 days ago)
- Language: Haskell
- Size: 689 KB
- Stars: 65
- Watchers: 8
- Forks: 3
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jetpack [![Build Status](https://travis-ci.org/NoRedInk/jetpack.svg?branch=master)](https://travis-ci.org/NoRedInk/jetpack)
> **NOTE:** Jetpack is an internal NoRedInk build tool that we decided to open source in hopes that it might be useful to others. It has never been our goal to develop a fully featured front-end build system for other use cases; it currently compiles only Elm and CoffeeScript because that's all our build needs. We're open to potentially accepting outside contributions to support other use cases, but please understand that this remains an internal tool first, and we can't make any promises that anything will be accepted. Thanks for understanding, and by all means don't feel bad about forking! ❤️
## Motivation
Webpack didn't work out for us; it did more than we needed, and builds were taking too long.
Jetpack is focused on compilation speed. It only compiles the stuff we need and creates the concatenated output js.Given an entry point, it follows all `require` statements and creates a dependency tree. It then builds all files using the appropriate compiler, concatenates the compiled js, and wraps modules in functions so that the requires know how to get the right functions.
## Configuration
```jsonc
{
"entry_points": "./FOLDER/TO/THE/ENTRY_POINTS",
"modules_directories": [ // folders where jetpack should try to find modules
"./node_modules",
"./vendor/assets/javascripts/FOO"
],
"source_directory": "./ui/src", // jetpack will try to resolve modules in source_directory before checking in modules_directories
"elm_root_directory": "./ui", // where your elm-package.json is
"temp_directory": "./.jetpack/build_artifacts", // jetpack's build_artifacts will be here
"log_directory": "./.jetpack/logs", // jetpack will log stuff in here
"output_js_directory": "assets/javascripts", // js will be written to this folder
"elm_bin_path": "./node_modules/.bin/elm-make", // path to elm binary
"coffee_path": "./node_modules/.bin/coffee", // path to coffee
"no_parse": ["./node_modules/clipboard/dist/clipboard.js"] // files that shouldn't be parsed
}
```## Development
```bash
direnv allow
stack setup
stack build
stack test
```Run `./script/format.sh` to format everything correctly.