generator-g4-module
> [Yeoman](http://yeoman.io) generator that scaffolds out the module structure
Last updated 4 years ago by intelisis .
ISC · Original npm · Tarball · package.json
$ cnpm install generator-g4-module 
SYNC missed versions from official npm registry.

Yeoman generator that scaffolds out the module structure

Automatically fetch latest version in modules repository and tests

How to setup this generator

  • Make sure you have svn installed

    Linux

  sudo apt-get install subversion

Mac OSX

  brew install subversion
  • Be sure to be in your modules repository

NPM frontend boilerplate

Global name

If you implement a plugin for Marionette, you will only need the Marionette plugin name and no module.exports will be needed.

If you implement a simple function, you will only need the standalone name.

Marionette plugin name

Defined in src/view.coffee

  Marionette.G4.BoilerPlate

Standalone name

Defined in grunt/browserify.coffee

  G4.boilerPlate

NPM scripts

To build & run all tests (unit and functional)

$ npm run travis

To open istanbul report in your default browser

$ npm run report

To open SpecRunner in your default browser

$ npm run spec

To open functional test in your default browser

$ npm run example

To publish your module with safety

$ npm run update_package

How to install web driver

  1. Download last version of the driver from google page Chromedriver
  2. Unzip it in the folder of your choice
  3. Add chromedriver path to environment variable path e.g.: '/Users/user/Documents/drivers/'

Example for MAC

  1. Go to your home
$ cd
  1. Edit .bash_profile
$ nano .bash_profile
  1. Add those lines
export chromeBinaryPath='/Users/user/Documents/drivers/'
export PATH="$chromeBinaryPath:$PATH"
  1. Restart your terminal and check it
$ echo $PATH

es6-module-boilerplate-browser

es6-module-boilerplate-browser

This Boilerplate helps to create bundled and tested, es6-transpiled front-end modules for the Browser.

Features

  • bundled using browserify
  • es6 with babelify transform (includes sourcemaps for development)
  • unit testing, using your browser, mocha & chai
  • in-browser coverage information powered by Blanket.JS
  • includes hbsfy transform to pre-compile Handlebars templates and allow just requiring them

How to get started

$ git clone https://github.com/elgubenis/es6-module-boilerplate-browser
$ cd es6-module-boilerplate-browser/
$ npm install
$ gulp

To start developing, modify the source in src/ or modify the tests in test/spec/ and your browser should reload automatically and run the tests and show coverage information. When the coverage is over 89% minified and original distribution files are getting created in the dist/ folder.

FAQ

How can I add more specs?

Create another .js file in the test/spec folder and require it on the
bottom of the server/index.html file.

How do distribution files getting created?

After every mocha run in your browser, the blanket.js coverage percentage is
being parsed and when the coverage is over 89%, only then the gulp build task
will get started. That task creates a minified and an original version
of the bundled src/index.js script and moves it to the the dist/ folder/.

Ready for publish!

What are the benefits from running unit tests in a Browser?

Doing unit tests with JSDom or PhantomJS overcomplicates things alot, you'd
also have to take care of more files and code to get up and running.

By opening tests in a real Browser though, you can just pretend you are
someone who wants to use the module and implement it just like documented.

And finally. you can use the same Browser to evaluate your front-end
modules visual aspects directly while developing, without having an extra step for that.

npm-backend-module-boilerplate

A raw base for writing back-end modules @Intelisis G4.

Install

> npm install %module_name% --save

Usage

Klass = require '%module_name%'

klassInstance = new Klass

API

%module_name% Parent 1

klassInstance.fn1(opt1, opt2)

Description of fn1

klassInstance.fn2(opt1)

Description of fn2

How to develop

> npm install
> grunt

Current Tags

  • 2.6.6                                ...           latest (4 years ago)

31 Versions

  • 2.6.6                                ...           4 years ago
  • 2.6.5                                ...           4 years ago
  • 2.6.4                                ...           4 years ago
  • 2.6.3                                ...           4 years ago
  • 2.6.2                                ...           4 years ago
  • 2.6.1                                ...           4 years ago
  • 2.6.0                                ...           4 years ago
  • 2.5.0                                ...           4 years ago
  • 2.4.0                                ...           5 years ago
  • 2.3.9                                ...           5 years ago
  • 2.3.8                                ...           5 years ago
  • 2.3.7                                ...           5 years ago
  • 2.3.6                                ...           5 years ago
  • 2.3.5                                ...           5 years ago
  • 2.3.4                                ...           5 years ago
  • 2.3.3                                ...           5 years ago
  • 2.3.2                                ...           5 years ago
  • 2.3.1                                ...           5 years ago
  • 2.3.0                                ...           5 years ago
  • 2.2.2                                ...           5 years ago
  • 2.2.1                                ...           5 years ago
  • 2.2.0                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 1.3.2                                ...           5 years ago
  • 1.3.1                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (11)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |