0.0.3 • Published 7 years ago

eric v0.0.3

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

Eric

NPM version NPM downloads

Eric Williams

A simple task runner for ambitious projects.

Installation

npm install eric -g

Usage

write task(s) -> convert to js -> run desired task(s)

Run eric init at the root of your project to create a new eric folder. In this folder you will find:

  • build - This folder stores tasks converted to js code.
  • tasks - The raw task source code in eric format.
  • templates - This folder stores files used by file generators.

Eric has its own declarative syntax for declaring tasks, the eric build command turns this syntax into javascript that you can run via eric run <task name>.

###Creating Tasks

A task file can contain one or more tasks. All tasks must extend the Task class from the package eric-types or a class that extends that.

Eric does not automatically import types so you must declare them at the top of your file as you would in regular ES2015+ code.

import <name> from <package>
import * as <name> from <package>

task <task name>:<task type> {

   <property-name> : <value>
   <method-name>(<method-arguments>)

}

example :

import * as types from 'eric-types';

task init:types.Generator {
 template: 'src/templates'
 file ('LICENSE', 'LICENSE')
}

task custom:types.Custom {

  customValud: 'custom'
  customMethod('x', 'y', 'z')

}

License

Apache-2.0