Git Product home page Git Product logo

es6start's Introduction

es6start

For newcomers that want to test ES6 features and Node, it's a bit cumbersome to create a full working setup (transpilers, testing framework, build). This project aims to give a pre-built start to play with ES6/Node without any hassle, with the added bonus of giving a working setup of npm as build system and testing with Mocha/Chai frameworks.

Features

  • Fully working ES6 environment for Node.js
  • Mocha/Chai.js powered test suite exemplifying ES6 features
  • Build done entirely with NPM (no Grunt, no Gulp)
  • ES6 transpiling done with Babel
  • Easy to start a real project on top of it

How to use

Setup

Clone this project and run npm install at the project root.

Tests

To run the tests you can use: npm test or npm run autotest. The first form run the test one time (NPM convention), the second one run the tests everytime that something is changed.

Build transpiled files (optional)

If you want to build your ES6 files to ES5, run npm run build or npm autobuild and check the results in the dist/ folder.

Running

Finally to run your your applications there are two forms: First using ./node_modules/.bin/node-babel src/<file.js> that will transpile the ES6 files on the fly and execute it. Secondly using node dist/<file.js> on the transpiled files of the npm run build task.

Just remember to add import polyfill from "babel/polyfill"; on the entry-point file only if using the second form of execution. This will the necessary polyfill to make an ES5 environment works as an ES6 one.

Credits / References

  • Mocha.js the solid testing framework
  • Chai.js the nice looking assertion Framework
  • Babel the incredible ES6 to ES5 transpiler
  • es6features the inspirational overview of ES6 features

es6start's People

Contributors

israelbgf avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.