Universal Starter Kit to build any javascript ES6 project/library runnable in nodejs and on any browser
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.
'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
};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 -gIf 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$ grunt test$ grunt build$ grunt saucelabs