/es6-project-starter-kit

Universal Starter Kit to build any javascript ES6 project/library runnable in nodejs and on any browser

Primary LanguageJavaScriptMIT LicenseMIT

Universal Starter Kit to build any javascript ES6 project/library runnable in nodejs and on any browser

Build Status

Dependency Status NPM version NPM downloads

MIT License

Introduction

javascript next introduces a lot of new cool features unfortunately not yet available in the current modern browsers. This starter kit contains all the tools you need to let you run your ES6 code on any kind of platform.

javascript ES6

'use strict';

import helpers from './helpers/helpers';

/**
 * @class
 * An awesome script
 */
class Greeting {
  constructor(name = 'Dear Coder', text = 'hi there') {
    this.name = name;
    this.text = text;
  }
  get message() {
    return `${this.text} ${this.name}!`;
  }
  set message(text) {
    this.text = helpers.trim(text);
  }
}

export default {
  helpers,
  Greeting
};

Tools available

Usage

Once you've downloaded the files in this repo please run the following command in your terminal from the project folder (it may require sudo):

$ npm install && npm install grunt-cli -g

If you have installed correctly all the nodejs modules you can start writing your javascript modules into the src folder of course using the awesome javascript next syntax.

Browsing the Gruntfile.coffee file you will find all the available terminal commands to compile/test your script. This file contains also the script name used for the output

Grunt tasks

Build and test

$ grunt

Run all the tests

$ grunt test

Convert the ES6 code into valid ES5 and combine the modules into one single file

$ grunt build

Run the saucelabs tests

$ grunt saucelabs