
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
pragmatist
Advanced tools
A collection of tasks to standardize builds.
Tasks that are not documented (including dependencies of the documented tasks that are not documented) are considered private and can be changed/renamed or removed without a warning.
lint
*.css
, *.scss
and *.js
files in ./src
and ./tests
directories.fix
build
./src
directory to ./dist
../src
directory.
./dist
directory../dist
directory`.babel-plugin-lodash
.test
./tests
directory../tests
directory.Istanbul assumes that tests are using ./src
files (as opposed to ./dist
).
Istanbul coverage report is written to the ./coverage
directory. A coverage summary is included in the CLI output.
watch
Runs lint
, test
and build
tasks every time ./src/**/*.js
or ./tests/**/*.js
changes.
watch-lint
Runs lint
task every time ./src/**/*.js
or ./tests/**/*.js
changes.
watch-test
Runs test
task every time ./src/**/*.js
or ./tests/**/*.js
changes.
watch-build
Runs build
task every time ./src/**/*.js
or ./tests/**/*.js
changes.
pragmatist
can be used to extend your existing gulp tasks.
import gulp from 'gulp';
import pragmatist from 'pragmatist';
/**
* @param {Object} gulp
* @param {string} prefix Used to prefix all pragmatist tasks.
* @returns {undefined}
*/
pragmatist(gulp);
This will make all pragmatist
tasks available under pragmatist:
namespace, e.g.
gulp pragmatist:test
pragmatist
can be used as a CLI program to run all the tasks.
npm install pragmatist -g
Tasks can be executed by running:
pragmatist <task>
Just running pragmatist
will execute the test
task.
Multiple tasks can be executed one after the other, e.g.
pragmatist <task #1> <task #2> <task #3>
The default behavior for build
task is to compile code for node
. Specifically, for the latest version of node
.
To compile code down to ES5, you must add --es5
flag to the command line, e.g.
pragmatist build --es5
Use --notifications
flag to enable OS level notifications about errors that occur during the build.
pragmatist build --notifications
Use --type-assertions
flag to enable runtime type assertions.
pragmatist build --type-assertions
A typical project using pragmatist
will define the following NPM scripts:
"scripts": {
"pragmatist": "pragmatist",
"lint": "npm run pragmatist lint",
"test": "npm run pragmatist test",
"build": "npm run pragmatist build",
"watch": "npm run pragmatist watch",
"watch-lint": "npm run pragmatist watch-lint",
"watch-test": "npm run pragmatist watch-test",
"watch-build": "npm run pragmatist watch-build"
},
This is just a reminder. Pragmatist will produce several files that you do not want to commit to the repository or include in the npm bundle.
Add to .gitignore
:
node_modules
coverage
dist
*.log
.*
!.gitignore
!.npmignore
!.babelrc
!.travis.yml
Add to .npmignore
src
tests
coverage
.*
*.log
FAQs
A collection of tasks to standardize builds.
The npm package pragmatist receives a total of 63 weekly downloads. As such, pragmatist popularity was classified as not popular.
We found that pragmatist demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.