ironer / este-cli

The Este.js community utility

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

este-cli Dependency Status Inline docs Build Status Code Climate Test Coverage

A command line interface tool that seeks to automate some tasks when working on a Este.js project.

NPM

What is Este.js?

The most complete React/Flux dev stack and starter kit for isomorphic functional web apps. Forget about evil frameworks, learn laser focused libraries and patterns instead.

Go, try it out here

Getting started

The latest version of this package is available via NPM with the below command:

$ npm install -g este-cli

Available commands

Create application

este-cli new <name> [location] --keep-git|-k --verbose|-v

This command creates completely fresh Este project by cloning it from Github repository to a location provided (defaults to name passed). When flag -k is passed, Este.js git repository is kept, a new instance is generated otherwise. Pass -v flag to see detailed output of subcommands this generator uses including npm install

Available generators

Feature

$ este-cli feature <name>

Wrapper running store, action, page and translate generators concurrently. Useful for quick feature scaffolding.

Page

$ este-cli page <name>

Creates a new page component in src/client/pages/<name>.react.js. Updates src/client/routes.js accordingly.

Store

$ este-cli store <name>

Creates a new store in src/client/<name>/store.js. Runs state and cursor generators to ensure they are correctly imported in store.

Action

$ este-cli action <name> [actionName]`

Creates simple [actionName] action in src/client/<name>/actions.js and exports it. If [actionName] is nested, it will be converted to camelCase. If actions.js file is missing, it will be created. If [actionName] is not provided, only actions.js file is created.

Action switch will be added to a store automatically. If store file does not exist, it will be created. If store file does not import actions, it will be imported. Generator understands both * as actions and {action1, action2} imports and is able to handle them all properly.

Component

$ este-cli component <name> -p

Creates top-level reusable component in src/client/components/<name>.react.js that exports a function which wraps BaseComponent passed.

If you want to create a pure component that does not wrap any other one, pass -p flag.

Element

$ este-cli element <featureName> <name>

Creates feature component in src/client/<featureName>/<name>.react.js and exports it.

Cursor

$ este-cli cursor <name>

Creates a <name> cursor pointing to <name> state. IF file is missing, it will be created.

State

$ este-cli state <name>

Creates a <name> state in src/server/initialstate.js. If the file is missing, it will be created.

Translate

$ este-cli translate <name> [translations..]

Creates a <name> property with empty object in src/client/messages.js. If the file is missing, it will be created.

When comma separated sub-elements are provided as [translations...] (este-cli translate todos name,description,title), nested properties will be created.

If <name> is already a string, generator will warn you that adding properties to a string is forbidden. In such a case, you should change your translations file before continuing.

License

The MIT License (MIT)

Copyright (c) 2015 Mike Grabowski

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

The Este.js community utility

License:MIT License


Languages

Language:JavaScript 95.1%Language:Smarty 4.9%