Coder Social home page Coder Social logo

andreamsofcake / eskimo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ladjs/lad

0.0 1.0 0.0 2.9 MB

Eskimo helps you to rapidly build Node powered API's, online stores, and apps in general (known as "igloos").

Home Page: http://eskimo.io

License: MIT License

JavaScript 68.61% HTML 10.46% CSS 20.26% Shell 0.66%

eskimo's Introduction

Eskimo

NPM version Build Status NPM downloads Test Coverage Static Analysis MIT License Gitter

Eskimo

Eskimo helps you to rapidly build Node powered API's, online stores, and apps in general (known as "igloos"). Requires Node >= 0.10.x, Redis for sessions, and your choice of either Knex/Bookshelf (SQL) or Mongoose (MongoDB) for data.

Index

Sponsor

Clevertech

Install

npm install -g eskimo

Documentation

The wiki is the main source for additional documentation.

Screencast

TODO: Basic screencast here

Commands

Bundled with the CLI are simple commands and options.

eskimo --help
Usage: eskimo [options] [command]

Commands:

  create <dirname>       create a new igloo
  model <name>           create a new model
  view <name>            create a new view
  controller <name>      create a new controller
  mvc <name>             create a new model, view, and controller

Options:

  -h, --help                output usage information
  -V, --version             output the version number
  -N, --no-update-notifier  disable update notifier
  -T, --no-tracking         disable anonymous tracking

Once you've created an igloo, see the generated Readme.md file.

Usage samples:

# To create a new igloo in `./awesome`:
eskimo create awesome

# To create a new model, views, and controller (with routes and tests) for "tags", in `./app/views/tags/*.jade`, `./app/models/tag.js`, `./app/controllers/tags.js`, `./app/routes/tags.js`, and `./test/99-tags.test.js`:
eskimo mvc tag
# Note: You could write "tags" as well (no quotes necessary if there are no spaces)

# To create a new controller (with routes and tests) in `./app/controllers/user-settings.js`, `./app/routes/user-settings.js`, and `./test/99-user-settings.test.js`
eskimo controller 'user settings'
# Note: You could write "user-settings" as well (no quotes necessary if there are no spaces)

Please read Igloo's documentation for more information. or your created igloo's Readme.md.

Examples

Free Stickers

Want a free Eskimo snow shoes sticker? Just submit this form.

Tests

To run tests you'll need to have configuration set up. Config lives under /boot/config.js (as stated before). To quickly and dirty set your configuration you can run something like:

var _ = require('underscore');
var _str = require('underscore.string');
_.mixin(_str.exports());
var path = require('path');
var fs = require('fs');
var templates = path.join(__dirname, 'templates');
var Chance = require('chance');

var dirname = './';

var configPath = path.resolve(path.join(dirname, 'boot', 'config.js'));


fs.readFile(path.join(templates, 'boot', 'config.js'), 'utf8', function(err, data) {

  if (err) {
    console.error(err);
  }

  data = _.template(data)({
    name: path.basename(dirname),
    chance: new Chance()
  });

  fs.writeFile(configPath, data);

});

Running that in the root of the project will generate a base config.js which you can then tune.

npm install -d
npm test

Assets

Assets refer to static files (scripts, stylesheets and other assets) placed in assets/public. To build a production version of your app:

gulp build

Note: This will minify all assets and create a /dist folder optimized and ready for deployment.

List of tasks executed during gulp build:

  • Automatic LESS processing
  • Automatic install of Bower packages
  • Automatic images minification
  • Automatic usemin implementation (concat, rev, ...)

Below is an example of a JADE file using usemin blocks:

//- #layout
...
//- build:js /js/app.js
block scripts
    script(src='/bower/jquery/dist/jquery.js')
    script(src='/bower/bootstrap/dist/js/bootstrap.js')
    script(src='/bower/bootbox/bootbox.js')
    script(src='/js/plugins.js')
    script(src='/js/main.js')
    if settings.facebook.enabled
        script(src='/js/fb-appended-hash-bug-fix.js')
//- endbuild

After, running gulp build the file will be optimized:

//- #layout
...
script(src='/js/app-316568f4.js')

Conventions

See nifty-conventions for code guidelines, general project requirements, and git workflow.

Contributors

Credits

License

MIT

eskimo's People

Contributors

niftylettuce avatar anotheri avatar yanicklandry avatar gimenete avatar santiagobasulto avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.