This package has been deprecated

Author message:

This module is no longer maintained. If you're interested in taking over maintenance of this repo, please contact the author

@rowanmanning/make

2.3.0 • Public • Published

Make

Reusable Makefiles for my open source projects.

Usage

Install with:

npm install --save-dev @rowanmanning/make

Create a Makefile in the root of your project and add the boilerplate content:

# Reusable Makefile
# ------------------------------------------------------------------------
# This section of the Makefile should not be modified, it includes
# commands from my reusable Makefile: https://github.com/rowanmanning/make
include node_modules/@rowanmanning/make/<LANGUAGE>/index.mk
# [edit below this line]
# ------------------------------------------------------------------------

where <LANGUAGE> is one of the following:

  • javascript

Now you can use the following commands, based on which language you choose.

JavaScript

Commands

  • all: Run the install and ci tasks.

  • ci: Run the verify and test tasks.

  • clean: Cleans the working directory. Relies on git.

  • install: Runs npm install but only if package.json has changed more recently than the node_modules folder. This speeds up installing to be instant if nothing needs doing. This task also prunes extra dependencies.

  • env: Copies a sample.env file to .env if the sample file exists.

  • verify: Run the verify-javascript and verify-dust tasks.

  • verify-javascript: Run the verify-eslint, verify-jshint, and verify-jscs tasks.

  • verify-dust: If an .dustmiterc file is present in the project root, run Dustmite against the code.

  • verify-eslint: If an .eslintrc file is present in the project root, run ESLint against the code.

  • verify-jscs: If a .jscsrc file is present in the project root, run JSCS against the code.

  • verify-jshint: If a .jshintrc file is present in the project root, run JSHint against the code.

  • verify-coverage: If a coverage/lcov-report folder is present in the project root and the nyc module is installed, check that coverage is above 90%. This is configurable by specifying export EXPECTED_COVERAGE := <value> in your dependant Makefile.

  • test: Run the test-unit-coverage, verify-coverage, and test-integration tasks.

  • test-unit: If a test/unit folder is present in the project root, run Mocha recursively on any files that end in .test.js.

  • test-unit-coverage: If a test/unit folder is present in the project root and the nyc module is installed, run Mocha recursively on any files that end in .test.js with coverage reporting. If nyc is not present, fall back to running make test-unit

  • test-integration: If a test/integration folder is present in the project root, run Mocha recursively on any files that end in .test.js.

  • publish-npm: If an NPM_PUBLISH_TAG (or CIRCLE_TAG/TRAVIS_TAG), and an NPM_AUTH_TOKEN environment variable is present, publish the module to npm.

Helpers

  • The TASK_DONE output helper allows you to quickly output a check-marked notice after a task has completed successfully. Just add it to your own tasks like this:

    mytask:
    	@do something
    	@$(TASK_DONE)
  • The folder ./node_modules/.bin is added to the PATH environment variable so that you don't need to explicitly reference it in calls to further commands.

License

ESLint Config is licensed under the MIT license.
Copyright © 2017, Rowan Manning

Readme

Keywords

Package Sidebar

Install

npm i @rowanmanning/make

Weekly Downloads

1

Version

2.3.0

License

MIT

Unpacked Size

10.7 kB

Total Files

9

Last publish

Collaborators

  • rowanmanning