0.30.40 • Published 5 years ago

gulp-shared-tasks v0.30.40

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
5 years ago

Codecov Travis Node Gitter Twitter Medium

Automated tasks (linting, testing, building) for a Node.js development workflow using Babel, ESLint, Prettier, Jscpd, Ava, Travis, nyc and codecov.

The task runner is Gulp, but you don't need to know Gulp to use these tasks.

Workflow

Code is compiled from the src to the build directory using Babel, so you can use the latest JavaScript features.

Linting and formatting are performed with ESLint, Prettier and Jscpd. We recommend using plugins with your IDE (code editor) for both Prettier and ESLint so that linting/formatting is performed as you code.

We use Ava to run tests. Each line of code must be tested.

Usage

Any task can be run using gulp for example:

gulp build

If you're on cmd.exe (Windows) use npx gulp ... instead.

Overview

The main commands are:

  • gulp check: lint/format the JavaScript files.
  • gulp build: build source files and test files. Must be run before running any code or unit tests.
  • gulp unit: run unit tests.
  • gulp test: perform the three tasks above.

Use gulp checkw, gulp buildw and gulp unitw to run them in watch mode.

Travis CI ensures that:

  • tests pass on all supported environments.
  • all source files are covered by tests and follow the same coding style.

Available tasks

gulp check

Lint and check source files:

This is automatically triggered before any git push.

gulp build

Build source files and test files:

  • JavaScript files are transpiled with Babel.
  • Other files are copied as is.

Source files are built from the src directory to the build/src directory. Test files are built from the test directory to the build/test directory.

This must be done before running any code or unit tests.

gulp unit

Run unit tests with Ava.

To specify Ava options, please call ava directly instead. For example: ava --update-snapshots.

To target a single test file, use ava build/test/file.js not ava test/file.js.

Test coverage is performed in CI (Travis) and uploaded to codecov. It can also be performed locally using nyc ava.

gulp test

Runs gulp check then gulp build then gulp unit.

This is performed on CI (Travis) for each OS (Windows, Mac, Linux) and supported Node.js version.

gulp checkw, gulp buildw, gulp unitw, gulp warnw

Like gulp check, gulp build, gulp unit and gulp warn but in watch mode. The watch mode works even when installing/updating/uninstalling dependencies or changing the Gulp tasks themselves.

They can be performed together, e.g. gulp buildw in one terminal tab and gulp unitw in another.

Other tasks

gulp warn

Check for security vulnerabilities (using npm audit) and outdated dependencies (using npm outdated).

gulp releasePatch, gulp releaseMinor, gulp releaseMajor

Release a new patch/minor/major version on npm and GitHub using release-it.

The new version will only be published to npm after CI tests have passed.

Only the repository owner can perform these tasks.

gulp coverage

Ensures that files are fully covered by tests using nyc. This is meant to be performed on CI (Travis).

Custom tasks

Repositories with a gulp top-level directory have additional tasks. Please check those files to see which custom tasks are available.

Support

If you found a bug or would like a new feature, don't hesitate to submit an issue on GitHub.

For other questions, feel free to chat with us on Gitter.

Everyone is welcome regardless of personal background. We enforce a Code of conduct in order to promote a positive and inclusive environment.

Contributing

This project was made with ❤️. The simplest way to give back is by starring and sharing it online.

If the documentation is unclear or has a typo, please click on the page's Edit button (pencil icon) and suggest a correction.

If you would like to help us fix a bug or add a new feature, please check our guidelines. Pull requests are welcome!

0.30.40

5 years ago

0.30.39

5 years ago

0.30.38

5 years ago

0.30.37

5 years ago

0.30.36

5 years ago

0.30.35

5 years ago

0.30.34

5 years ago

0.30.33

5 years ago

0.30.32

5 years ago

0.30.31

5 years ago

0.30.30

5 years ago

0.30.29

5 years ago

0.30.28

5 years ago

0.30.27

5 years ago

0.30.26

5 years ago

0.30.25

5 years ago

0.30.24

5 years ago

0.30.23

5 years ago

0.30.22

5 years ago

0.30.21

5 years ago

0.30.20

5 years ago

0.30.19

5 years ago

0.30.18

5 years ago

0.30.17

5 years ago

0.30.16

5 years ago

0.30.15

5 years ago

0.30.14

5 years ago

0.30.13

5 years ago

0.30.12

5 years ago

0.30.11

5 years ago

0.30.10

5 years ago

0.30.9

5 years ago

0.30.8

5 years ago

0.30.7

5 years ago

0.30.6

5 years ago

0.30.5

5 years ago

0.30.4

5 years ago

0.30.3

5 years ago

0.30.2

5 years ago

0.30.1

5 years ago

0.30.0

5 years ago

0.29.21

5 years ago

0.29.20

5 years ago

0.29.19

5 years ago

0.29.18

5 years ago

0.29.17

5 years ago

0.29.16

5 years ago

0.29.15

5 years ago

0.29.14

5 years ago

0.29.13

5 years ago

0.29.12

5 years ago

0.29.11

5 years ago

0.29.10

5 years ago

0.29.9

5 years ago

0.29.8

5 years ago

0.29.7

5 years ago

0.29.6

5 years ago

0.29.5

5 years ago

0.29.4

5 years ago

0.29.3

5 years ago

0.29.2

5 years ago

0.29.1

5 years ago

0.29.0

5 years ago

0.28.9

5 years ago

0.28.8

5 years ago

0.28.7

5 years ago

0.28.6

5 years ago

0.28.5

5 years ago

0.28.4

5 years ago

0.28.3

5 years ago

0.28.2

5 years ago

0.28.1

5 years ago

0.28.0

5 years ago

0.27.81

5 years ago

0.27.80

5 years ago

0.27.79

5 years ago

0.27.78

5 years ago

0.27.77

5 years ago

0.27.76

5 years ago

0.27.75

5 years ago

0.27.74

5 years ago

0.27.73

5 years ago

0.27.72

5 years ago

0.27.71

5 years ago

0.27.70

5 years ago

0.27.69

5 years ago

0.27.68

5 years ago

0.27.67

5 years ago

0.27.66

5 years ago

0.27.65

5 years ago

0.27.64

5 years ago

0.27.63

5 years ago

0.27.62

5 years ago

0.27.61

5 years ago

0.27.60

5 years ago

0.27.59

5 years ago

0.27.58

5 years ago

0.27.57

5 years ago

0.27.56

5 years ago

0.27.55

5 years ago

0.27.54

5 years ago

0.27.53

5 years ago

0.27.52

5 years ago

0.27.51

5 years ago

0.27.50

5 years ago

0.27.49

5 years ago

0.27.48

5 years ago

0.27.47

5 years ago

0.27.46

5 years ago

0.27.45

5 years ago

0.27.44

5 years ago

0.27.43

5 years ago

0.27.42

5 years ago

0.27.41

5 years ago

0.27.40

5 years ago

0.27.39

5 years ago

0.27.38

5 years ago

0.27.37

5 years ago

0.27.36

5 years ago

0.27.35

5 years ago

0.27.34

5 years ago

0.27.33

5 years ago

0.27.32

5 years ago

0.27.31

5 years ago

0.27.30

5 years ago

0.27.29

5 years ago

0.27.28

5 years ago

0.27.27

5 years ago

0.27.26

5 years ago

0.27.25

5 years ago

0.27.24

5 years ago

0.27.23

5 years ago

0.27.22

5 years ago

0.27.21

5 years ago

0.27.20

5 years ago

0.27.19

5 years ago

0.27.18

5 years ago

0.27.17

5 years ago

0.27.16

5 years ago

0.27.15

5 years ago

0.27.13

5 years ago

0.27.12

5 years ago

0.27.11

5 years ago

0.27.10

5 years ago

0.27.9

5 years ago

0.27.8

5 years ago

0.27.7

5 years ago

0.27.6

5 years ago

0.27.5

5 years ago

0.27.4

5 years ago

0.27.3

5 years ago

0.27.2

5 years ago

0.27.1

5 years ago

0.27.0

5 years ago

0.26.0

5 years ago

0.25.1

5 years ago

0.25.0

5 years ago

0.24.11

5 years ago

0.24.10

5 years ago

0.24.9

5 years ago

0.24.8

5 years ago

0.24.7

5 years ago

0.24.6

5 years ago

0.24.5

5 years ago

0.24.4

5 years ago

0.24.3

5 years ago

0.24.2

5 years ago

0.24.1

5 years ago

0.24.0

5 years ago

0.23.4

5 years ago

0.23.3

5 years ago

0.23.2

5 years ago

0.23.1

5 years ago

0.23.0

5 years ago

0.22.13

5 years ago

0.22.12

5 years ago

0.22.11

5 years ago

0.22.10

5 years ago

0.22.9

5 years ago

0.22.8

5 years ago

0.22.7

5 years ago

0.22.6

5 years ago

0.22.5

5 years ago

0.22.4

5 years ago

0.22.3

5 years ago

0.22.2

5 years ago

0.22.1

5 years ago

0.22.0

5 years ago

0.21.2

5 years ago

0.21.1

5 years ago

0.21.0

5 years ago

0.20.0

5 years ago

0.19.8

5 years ago

0.19.7

5 years ago

0.19.6

5 years ago

0.19.5

5 years ago

0.19.4

5 years ago

0.19.3

5 years ago

0.19.2

5 years ago

0.19.1

5 years ago

0.19.0

5 years ago

0.18.6

5 years ago

0.18.5

5 years ago

0.18.4

5 years ago

0.18.3

5 years ago

0.18.2

5 years ago

0.18.1

5 years ago

0.18.0

5 years ago

0.17.8

5 years ago

0.17.7

5 years ago

0.17.6

5 years ago

0.17.5

5 years ago

0.17.4

5 years ago

0.17.3

5 years ago

0.17.2

5 years ago

0.17.1

5 years ago

0.17.0

5 years ago

0.16.5

5 years ago

0.16.4

5 years ago

0.16.3

5 years ago

0.16.2

5 years ago

0.16.1

5 years ago

0.16.0

5 years ago

0.15.1

5 years ago

0.15.0

5 years ago

0.14.2

5 years ago

0.14.1

5 years ago

0.14.0

5 years ago

0.13.1

5 years ago

0.13.0

5 years ago

0.12.7

5 years ago

0.12.6

5 years ago

0.12.5

5 years ago

0.12.4

5 years ago

0.12.3

5 years ago

0.12.2

5 years ago

0.12.1

5 years ago

0.12.0

5 years ago

0.11.0

5 years ago

0.10.0

5 years ago

0.9.1

5 years ago

0.9.0

5 years ago

0.8.0

5 years ago

0.7.7

5 years ago

0.7.6

5 years ago

0.7.5

5 years ago

0.7.4

5 years ago

0.7.3

5 years ago

0.7.2

5 years ago

0.7.1

5 years ago

0.7.0

5 years ago

0.6.0

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

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.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago