Seeds

Introduction

Seeds is a full-stack JavaScript framework utilizing Ember/Ember-Data, Sails, and Semantic-UI. It currently requires io.js 2+ It has been tested on node v0.12.0+ and io.js 2+. It was built with the Soil Cli framework, a tool for building CLI tools with the ES6 syntax. Seeds uses babel to transpile into ES5.

If you've already got io.js or node installed all you need to do to download Seeds is to install it globally via NPM.

If you don't have io.js or node installed we recommend using NVM to handle your io.js/node installations.

Chat with us on Chat with us on http://gitter.im/terminalvelocity/seeds.js
@terminalvelo.city discord in the #seeds channel

# If you already have io.js installed on your system, all you need
# to do to get started using Seeds is install it globally via npm.

$ npm install -g seeds

New Command

Generates and bootstraps a new seeds application. The new command requires an appName to be passed as an argument.

Aliases for New Command: n

Default Seeds Application Structure

frontend
Ember Application
api
Sails API Server
.seedsrc
Seeds configuration file
package.json
NPM package file for dependency management
node_modules
Dependencies from NPM. Includes helpers for generating and managing your seeds application
# App name should be passed in camelCased.
# The new command currently takes a little while.

$ seeds new appName

Generating a new Seed named appName...
                                                       .
                                            .         ;
               .              .              ;%     ;;
                 ,           ,                :;%  %;
                  :         ;                   :;%;'     .,
          .       %;     %;            ;        %;'    ,;
           ;       ;%;  %%;        ,     %;    ;%;    ,%'
            %;       %;%;      ,  ;       %;  ;%;   ,%;'
             ;%;      %;        ;%;        % ;%;  ,%;'
              `%;.     ;%;     %;'         `;%%;.%;'
               `:;%.    ;%%. %@;        %; ;@%;%'
                  `:%;.  :;bd%;          %;@%;'
                    `@%:.  :;%.         ;@@%;'
                      `@%.  `;@%.      ;@@%;
                        `@%%. `@%%    ;@@%;
                          ;@%. :@%%  %@@%;
                            %@bd%%%bd%%:;
                              #@%%%%%:;;
                              %@@%%%::;
                              %@@@%(o);  . '
                              %@@@o%;:(.,'
                          `.. %@@@o%::;
                             `)@@@o%::;
                              %@@(o)::;
                             .%@@@@%::;
                             ;%@@@@%::;.
                            ;%@@@@%%:;;;.
                       ....;%@@@@@%%:;;;;,..

Serve Command

Starts the Ember Frontend server at http://localhost:4200 and the Sails API server at http://localhost:1776

Aliases for Serve command:
s, up, lift, server


$ seeds s
API Server started on port 1776
Frontend Server started on port 4200

Generate Command

Generates files based on type of generator passed as a parameter. Some generators accept additional arguments. Controllers will accept actions to be generated on the controller and Model/Scaffold generators accept attributes for the model in the form of paramName:paramType.

Alias for Generate Command:
g

Currently implemented generators: Scaffold, Model

Scaffold

Files Generated By Model

Controllers
api/api/controllers/UserController.js
Models
api/api/models/User.js
frontend/app/models/user.js
Tests
frontend/tests/unit/models/user-test.js

Files Generated By Scaffold

Adapters
frontend/app/adapters/user.js
Controllers
api/api/controllers/UserController.js
Models
api/api/models/User.js
frontend/app/models/user.js
Routes
frontend/app/routes/users.js
frontend/app/routes/users/index.js
frontend/app/routes/users/new.js
frontend/app/routes/users/edit.js
Templates
frontend/app/templates/users.hbs
frontend/app/templates/users/-form.hbs
frontend/app/templates/users/edit.hbs
frontend/app/templates/users/index.hbs
frontend/app/templates/users/new.hbs
frontend/app/templates/users/show.hbs
Tests
frontend/tests/acceptance/users-test.js
# Converts ember model attributes to sails model attributes and vice versa
Sails: string, text, integer, float, date, datetime, boolean, binary, array, json
Ember: string, number, boolean, date


# Model name should be passed in its singular form.
# Multi-Word Attributes should be passed in camelCased.

# Also wires up the appropriate routes in the Ember Router




$ seeds g model user firstName:string lastName:string 

# frontend/app/router.js
this.route('user');






$ seeds g scaffold user firstName:string lastName:string email:string apiKey:string age:number subscribed:boolean verified:boolean

# frontend/app/router.js
  this.route("users", function() {
    this.route("new");
    this.route("edit", {
      path: ":user_id/edit"
    });
    this.route("show", {
      path: ":user_id"
    });
  });

# User Object From API Server
# http://localhost:1776/api/v1/users

{
  "firstName": "John-Henry",
  "lastName": "Liberty",
  "email": "jhliberty@terminalvelo.city",
  "apiKey": "k23_JKAHA8AU73JG2KLASD",
  "age": 28,
  "subscribed": true,
  "verified": true
}

Install Command

Installs a package into your Ember frontend or your Sails backend.

Alias for Install command:
i

$ seeds install ember ember-moment
Installing ember-moment into frontend...
Installation complete!
$ seeds i sails sails-mandrill
Installing sails-mandrill into api...
Installation complete!

Init Command

Installs npm and bower dependencies for the Ember frontend and the Sails backend.
This is useful, for instance, when cloning a seeds project from a remote repository.

$ seeds init

runs `npm install` in the top level app folder

runs `npm install` in the API folder

runs `npm install` in Frontend folder
runs `bower install` in Frontend folder

Version Command

Prints the version number of the currently installed Seeds CLI tool.

Aliases for Version command:
-v

$ seeds version
┌─────────────┬─────────┐
│ Package     │ Version │
├─────────────┼─────────┤
│ Seeds       │ v2.1.1  │
├─────────────┼─────────┤
│ Ember       │ v2.0.2  │
├─────────────┼─────────┤
│ Ember-Cli   │ v1.13.8 │
├─────────────┼─────────┤
│ Sails       │ v0.11.0 │
├─────────────┼─────────┤
│ Semantic UI │ v2.1.4  │
└─────────────┴─────────┘

Notes

If you run across a bug please file an issue.
If you want to contribute, check out the Github Repo
Chat with us on Chat with us on http://gitter.im/terminalvelocity/seeds.js
@terminalvelo.city discord in the #seeds channel

Built with Soil Cli.
Created by @jhliberty
(Twitter) (GitHub)