Skip to content

guilherme22/ether

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ether

Description

Ether is a simple tool to make scaffolding easy, and fun in a programmatic way.

Installation

[sudo] npm i ether

API

Instance

var app = ether({
  name: 'Example'
});

Instantiation of the scaffolding.

Get and Set

app.get('name');

and

app.set('version', '0.0.1');

Get and Set, modify the context of the instance.

Task

app.task('create-app-structure', function () {
  app.run('mkdir', ['app/'])
     .run('mkdir', ['app/models'])
     .run('mkdir', ['app/views'])
     .run('mkdir', ['app/controllers']);
});

using the task method you can create new methods to reuse in the instance, of the current scaffolding app.

Default tasks

Mkdir
app.run('mkdir', [destiny]);

On the destiny dir, this task create an new directory

Copy

app.run('copy', [source, destiny]);

That task make a copy of an file

Template

app.run('template', [source, destiny]);

This task make a copy and replace variables from context of the instance of the scaffolding, to another new file.

Prompt

app.run('prompt', [[{type:'input', name: 'name', message: 'Whats the name of that application?'}]]);

To put variables using the interactive mode in the context of the instance, use this method.

Download

app.run('download', [url, destiny, callback]);

To make download of an file and put in the project replacing, variables.

Run

app.run('create-app-structure');

This method run tasks previously defined.

Make

app.make('default', function () {
  app.run('create-app-structure');
});

The make method can register a bunch of tasks.

Make run

app.make('default');

And run a bunch of tasks.

Ether file

Install the cli

[sudo] npm i -g ether

Use the cli tool, to run scaffolding, to generate new applications.

Use the '--install' option

ether -i // this instruction read the etherfile.js

The install option use the etherfile.js or and module installed.

Global scaffolding

[sudo] npm i -g ether-gen

and

ether -i ether-gen

Or using this way to install one scaffolding from npm, and run this scaffolding app.

Trick

To make module runnable, use the bunch default in the make, method defining and running by the way.

[WIP]

Created by Kaique da Silva [email protected]

About

Application scaffolding tool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published