~fancycade/nrg

80486d0f3417ba3ab3a517b3874b59597a43d9c5 — fancycade 1 year, 6 months ago f604730 master
Changed scripts to commands

scripts turns out was already taken by shards for things
* commands is more semantic anyway

Readme updates
3 files changed, 7 insertions(+), 7 deletions(-)

M Makefile
M README.md
M main.cr
M Makefile => Makefile +1 -1
@@ 2,7 2,7 @@ dev:
	crystal build main.cr -o nrg

prod:
	crystal build --release main.cr -o nrg
	crystal build --release --no-debug main.cr -o nrg

install:
	cp nrg /usr/local/bin

M README.md => README.md +5 -5
@@ 2,11 2,11 @@

Juice up your Crystal dev flow with a shot of `nrg`!!!

Simple script runner tool (like Make) for Crystal projects.
Simple system command runner (like Make) for Crystal projects.

Make commands as keys in your shard.yml file.
Write commands as keys in your shard.yml file.

Then execute them as commands with the `nrg` tool and feel that Crystal energy vibrating through you!
Then execute them with the `nrg` tool and feel that Crystal energy vibrating through you!

# Build



@@ 33,7 33,7 @@ sudo make install
Add keys in the script field in your project's shard.yml file.

```yaml
script:
commands:
 dev:
   crystal build app.cr
```


@@ 47,7 47,7 @@ It simply executes system commands listed in the key.
Multiline commands work too. Make sure to add `|` at the end of the key name.

```yaml
scripts:
commands:
 prod: |
   crystal build --release app.cr
   echo "Built prod"

M main.cr => main.cr +1 -1
@@ 20,7 20,7 @@ else
    data = YAML.parse(File.read("shard.yml"))
    command = ARGV[0]
    if command != "format"
      s = data["scripts"][command].to_s
      s = data["commands"][command].to_s
      s.lines.each do |l|
        if l.includes? "?"
          system(apply_args(l))