0.3.5 • Published 4 years ago

gnumake v0.3.5

Weekly downloads
62
License
MIT
Repository
github
Last release
4 years ago

gnumake

GitHub stars

cross platform gnu make for nodejs

Please ★ this repo if you found it useful ★ ★ ★

Features

  • supports windows
  • supports osx
  • supports linux

Installation

npm install --save-dev gnumake

Dependencies

Usage

  1. Create a Makefile

    You must include node_modules/gnumake/gnumake.mk.

    Makefile

    include node_modules/gnumake/gnumake.mk
    
    .PHONY: build
    build: lib
    lib:
    	-@$(RM) -rf lib || $(TRUE)
    	@babel src -d lib
  2. Reference Makefile from npm scripts

    package.json

      "scripts": {
        "build": "make -s build"
      }

Cross Platform Commands

The following commands should be referenced from make variables instead of the raw unix commands for cross platform suport on linux, osx and windows.

unix commandmake variableexample
/dev/null$(NULL)echo hello >$(NULL)
cat$(CAT)$(CAT) hello.txt
chmod$(CHMOD)$(CHMOD) hello.txt
cd$(CD)$(CD) hello
cp$(CP)$(CP) -r hello world
false$(FALSE)echo fail && $(FALSE)
find$(FIND)$(FIND) *.txt
grep$(GREP)$(GREP) ".+\.txt$"
git$(GIT)$(GIT) ls-files
ln$(LN)$(LN) -s hello.txt world.txt
ls$(LS)$(LS) -a
make$(MAKE)$(MAKE) -s hello
mkdir -p$(MKDIRP)$(MKDIRP) hello/world
mv$(MV)$(MV) hello world
npm$(NPM)$(NPM) install
pwd$(PWD)$(PWD)
rm$(RM)$(RM) -rf hello
sed$(SED)$(SED) -i "s/hello/world/g" hello.txt
tail$(TAIL)$(TAIL) -f hello.log
touch$(TOUCH)$(TOUCH) hello.txt
true$(TRUE)echo success && $(TRUE)

Support

Submit an issue

Contributing

Review the guidelines for contributing

License

MIT License

Jam Risser © 2020

Changelog

Review the changelog

Credits

0.3.5

4 years ago

0.3.4

4 years ago

0.3.2

5 years ago

0.3.3

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.7

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.19

5 years ago

0.0.10

5 years ago

0.0.11

5 years ago

0.0.12

5 years ago

0.0.13

5 years ago

0.0.14

5 years ago

0.0.15

5 years ago

0.0.9

5 years ago

0.0.16

5 years ago

0.0.8

5 years ago

0.0.17

5 years ago

0.0.18

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago