GithubHelp home page GithubHelp logo

clayrisser / node-gnumake Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 692 KB

cross platform gnu make for nodejs

Home Page: https://codejam.ninja

License: MIT License

JavaScript 9.47% TypeScript 70.18% Makefile 20.35%
make gnumake makefile build build-tool

node-gnumake's Introduction

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 command make variable example
/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

node-gnumake's People

Contributors

clayrisser avatar gb-pavan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.