0.8.1 • Published 6 years ago

@speedy/build-tools v0.8.1

Weekly downloads
14
License
ISC
Repository
github
Last release
6 years ago

@speedy/build-tools

CircleCI npm version Dependency Status devDependency Status

Node CLI/API for build tools and utilities such as linting (html, sass, ts), clean, compile, etc... in order to simplify building libraries and applications.

Currently under development.

Getting Started

Installation

npm install @speedy/build-tools --save-dev

NPM Scripts

Instead of depending on external task runners, speedy-build-tools can be configured to run from npm scripts in package.json.

"scripts": {
    "lint-sass": "speedy-build-tools lint-sass",
    "lint-ts": "speedy-build-tools lint-ts"
},

Run NPM script as following

npm run lint-sass

CLI

CLI can also be used directly without being added to NPM scripts.

speedy-build-tools clean --paths **/.tmp

// or shorthand
speedy clean --paths **/.tmp

Tasks

Available tasks within speedy-build-tools which can be used via CLI.

TaskDescription
clean [paths...]Delete files and directories
copyCopy files and directories
lint-htmlLint Html files
lint-sassLint Sass files
lint-tsLint TypeScript files

Clean

speedy-build-tools clean --paths .tmp/**
speedy-build-tools clean .tmp/** .test/**
OptionDescriptionType
--paths, -pPaths to be deleted - Supports glob patternsArray

Copy

speedy-build-tools copy --paths .tmp/** --dest www
OptionDescriptionType
--paths, -pPaths to be copied - Supports glob patternsArray
--dest, -dDestination of the copied filesstring

Lint Html

speedy-build-tools lint-html
OptionDescriptionDefault ValueType
--config, -cLint rules file path.htmlhintrcstring
--files, -fFiles to be linted - Supports glob patternssrc/**/*.*(html\|htm)Array
--continueOnErrorDetermines whether to exit with a non-zero status code on lint errorsfalseboolean

Rules

By default, it will try to locate the .htmlhintrc file in the root of your project folder.

If the file is not found it will fallback to an internal .htmlhintrc found in config folder.


Lint Sass

speedy-build-tools lint-sass
OptionDescriptionDefault ValueType
--config, -cLint rules file path.stylelintrcstring
--files, -fFiles to be linted - Supports glob patternssrc/**/*.*(scss\|sass)Array
--formatterFormatter to use to format the linter resultsverbosejson \| verbose \| string
--fixDetermines whether to auto fix lint issues (which support fixing)falseboolean
--continueOnErrorDetermines whether to exit with a non-zero status code on lint errorsfalseboolean

Rules

By default, it will try to locate the .stylelintrc file in the root of your project folder.

If the file is not found it will fallback to an internal .stylelintrc found in config folder. This file can also be used as a base for your rules.


Lint TypeScript

speedy-build-tools lint-ts
OptionDescriptionDefault ValueType
--config, -cLint rules file pathtslint.jsonstring
--program, -pPath for tsconfigtsconfig.jsonstring
--files, -fFiles to be linted - Supports glob patternssrc/**/*.tsArray
--formatterFormatter to use to format the linter resultsstylishvso \| verbose \| prose \| stylish \| pmd \| json \| msbuild \| fileList \| codeFrame \| checkstyle
--fixDetermines whether to auto fix lint issues (which support fixing)falseboolean
--continueOnErrorDetermines whether to exit with a non-zero status code on lint errorsfalseboolean

Rules

By default, it will try to locate the tslint.json file in the root of your project folder.

If the file is not found it will fallback to an internal tslint.json found in config folder. This file can also be used as a base for your rules.


Global Options

OptionDescription
--debugShow debug information
--help, -hShow help
--version, -vShow version number

Display general help

speedy-build-tools --help

Display help specific to a task:

speedy-build-tools lint-sass --help

To display help when running the task from a mapped npm script you should omit the --;

npm run lint-sass help

Stack

0.8.1

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

7 years ago

0.4.2

7 years ago

0.4.1

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago