Coder Social home page Coder Social logo

6to5-nw's Introduction

6to5-nw

A module to develop node-webkit applications with ES6 easily.

Installation

As any dependencies of your node-webkit app, just run :

npm install 6to5-nw --save

Usage

In your index.html file, you can add a script which call the module

require('6to5-nw')(entryScript, options);

entryScript is the entry point of your application.

options is en object composed by up to 3 items:

  • browserify : browserify options object.
  • to5 : 6to5 options object.
  • watch : true or false depending if you want the application to reload when you save a (client) script or not.

Example

<script>
  require('6to5-nw')('./index', {
  	browserify: {
  		debug: true
  	},
  	to5: {
  		sourceMap: 'inline'
  	},
  	watch: true
  });
</script>

Polyfill

6to5 provide ES6 polyfills from external projects (core.js and regenerator), you can apply them simply by adding the import "6to5/polyfill" statement. Note that because the core.js polyfill replace the console module, you may loose source-maps information in devtools's console.

Production

When you are ready to ship the program, you can simply run ugifyjs on the bundle, and replace the old script tag with the minified bundle.

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.