@the-goat/cli
v2.0.15
Published
    globaly on your system and add it to the configuration. After this, the module can be used on your system.
Usage
Initialize
To start using goat in your project, just run goat init.
Check available Tasks
Run goat to display the help which lists all the available tasks.
Watch project
Run all watch enabled tasks simultaneously typing goat watch in your terminal.
Building a module
Each goat module must include two things.
- A
goatproperty inside the package.json "goat": { "name": "Module name", "description": "Brief description of the functionality" } - a entry file which exports a function, this function receives the Goat class, which can be used to build your module.
module.exports = function my_module(Goat) {
return new Goat({
name: 'My Module',
command: 'my-module',
description: 'a example module',
schema: require('./src/schema'), // localtion of a schema describing the module config
method: (config) => {
// method to be executed
},
watch: (config) => {
// Optional method which is executed when the -w flag is added or by running goat watch
// config includes a event watch property
const { events } = config;
events.watch({
name: 'Watch event',
pattern: '**/*.s+(a|c)ss',
events: /file:/,
method: () => {
//method to be executed
},
});
},
init: {
configuration: require('./init/configuration.json'), // default configuration for your module
},
});
};License
All code released under MIT
