And that’s frustrating, because the place where a make alternative could really shine is not in making the syntax for specifying scripts nicer, but in figuring out how to design the dependency APIs so that you aren’t almost guaranteed to get them wrong in subtle ways.
# [clean]() Clean build directory
```bash
rm -rf ./build
```
# [format]() Format the source code
```bash
npx prettier --write .
```
# [build](clean format) Build the project
```bash
npm run build
```
# [deploy](build) Deploy to surge.sh
```bash
surge ./build my-project.surge.sh
```
This doesn't include file time modification between files as in Makefile.Thank you for feature suggestion.
It's possible to create makefile targets which say "Don't run this other target on my behalf, but if you're going to run it anyway then run it before me"; for example, don't try to create the build output directory every time you run this target, but if it does need to be created then create it first.
Every time I've tried to look for a clean, effective Makefile replacement there have either been obvious (to me) missing features that make anything but the most basic use cases tricky, or the system is so clearly designed to solve one specific problem (e.g. "compile a bunch of .c files into a binary") and as a result is unsuitable for most use cases that Makefiles would be good for.
Make does:
- topological sorting based ordering of the dependency tree
- skipping of already up to date targets
- supports parallel execution of independent dependency subtrees
The webpage is totally unclear on this, and to me it looks like it only allows for a named entrypoint to some script snippets.
I'm a literal programming fan though, and this is a nice start, but i recommend clarifying the docs on this.