https://github.com/replete/abstractionless-task-runner
An alternative to npm-scripts and gulp. Use real APIs instead of CLIs or intermediate plugins.
https://github.com/replete/abstractionless-task-runner
Last synced: 8 months ago
JSON representation
An alternative to npm-scripts and gulp. Use real APIs instead of CLIs or intermediate plugins.
- Host: GitHub
- URL: https://github.com/replete/abstractionless-task-runner
- Owner: replete
- Created: 2016-10-12T02:15:16.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-12T11:29:50.000Z (over 9 years ago)
- Last Synced: 2025-01-14T11:05:11.034Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# abstractionless task runner
Why? It's just another option beside these usual approaches to frontend tooling:
## CLIs (e.g npm scripts)
Implements tasks with CLIs inside npm script definitions inside `package.json`.
Beyond simple projects, these implementations can end up highly verbose and/or hide options in separate .json files.
Sometimes package CLIs are third-party and/or out-of-sync, and it gets really messy when you want to involve async tasks.
## Task-runners (e.g. gulp)
Implement tasks with a task runner such as gulp. Often you are interacting with an abstraction of the thing you want to use (a plugin), which can easily be out-of-sync, buggy, or at times completely broken. When it works though, it's great.
## Bundlers (e.g webpack)
Bundlers like webpack are magical and can be the perfect solution. But they can also become extremely complicated to get working, and can suffer from the same problems as task-runners because they also rely on plugins.
# Package APIs + browser-sync
Write your own script and deal with package APIs directly.
* I've found `bs.watch()` to be faster than multiple concurrent package CLI watchers and easier to orchestrate.
* `glob, fs-extra, browser-sync` are required globally, but do what you will.
* `fs-extra` exposes a useful `outputFile` method, which creates parent directories if they dont currently exist
## TODO:
- [x] Separate and expose build/reload tasks to npm scripts
- [ ] Add more package examples
- [ ] Find useful abstractions (eg, transforming path strings)