Skip to content
Build tool for the HTML/CSS/JavaScript.
JavaScript Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.editorconfig
.gitattributes
.gitignore
LICENSE
README.md
circle.yml
cli.js
package.json
tasco.json

README.md


tasco
Build tool for the HTML/CSS/JavaScript.

NPM version NPM downloads Build Status

tl;dr

task support
js rollup, babel or buble, es2015, stage-1
css postcss with precss and autoprefixer, you can also enable sugarss
html pug (formerly jade)

Install

$ npm install -g tasco

Usage

First thing first, everything tasco cares started from a tasco.json:

{
  "js": {
    "entry": "./src/index.js",
    "dest": "./dist"
  }
}

That's it, run tasco js to start task:

Currently only three types of task you can run: js css html, you can run tasco build to run them all in once:

Bonus: Use --watch to enter watch mode. unlike gulp, tasco will not exit on error in watch mode.

API

Top level properties

For example, build is a top level property:

{
  "build": ["js", "css"]
}

build

Type: array
Default: ['js', 'css', 'html']

The tasks to run in tasco build.

Task Properties

entry

Type: string
Required: true

File entry, only supported single file.

dest

Type: string
Required: true

The dest directory.

watch

Type: string array glob patterns boolean
Required: false
Default: path.dirname(entry)

If you run tasco with --watch tasco will watch the files/dirs you specific in this property. By default it's the dirname of entry file.

Set to false to disable watch the this task.

rename

Type: string
Required: false

The new name of output file.

compress

Type: boolean
Default: false

Whether to compress the output file.

map

Type: boolean string
Default: false

Whether to generate source maps. Set map to inline to generate inline source map.

JavaScript Only

Default bundle format is IIFE with a random moduleName.

umd

Type: string
Required: false

Specific the moduleName which is used in UMD mode.

cjs

Type: boolean
Required: false

Whether to bundle in CommonJS format.

moduleName

Type: string
Required: false

Specific the moduleName which is used in iife mode.

buble

Type: boolean
Required: false

Use buble to compile ESnext code, we use babel by default.

CSS Only

sugarss

Type: boolean
Default: false

Use sugarss as PostCSS parser.

HTML Only

HTML is usimg pug (formerly) to render.

data

Type: object
Required: false
Default: {time: Date.now(), pkg)}

The local variables to render in your pug (formerly jade) template, pkg is tasco package.json

License

MIT © EGOIST

You can’t perform that action at this time.