GithubHelp home page GithubHelp logo

ninsy / gulp-es6-webpack-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from themindfuldev/gulp-es6-webpack-example

0.0 1.0 0.0 10 KB

Sample setup with Gulp, Babel, Mocha and Webpack, including lazy loading

License: Other

JavaScript 95.95% HTML 4.05%

gulp-es6-webpack-example's Introduction

gulp-es6-webpack-example

Sample setup with Gulp, Babel, Mocha and Webpack over ES6, transpiled to ES5 (source maps included).

All the code, Mocha tests and config files from Gulp and Webpack are ES6.

The is a preload bundle (to be loaded during page load time) and also a separate bundle (to be lazy loaded after the user presses a button).

The lazy-loadable bundles are automatically generated by webpack and the code is just requiring things internally using ES6/CommonJS, making it possible to avoid AMD/RequireJS for asynchronous loading.

Running gulp will:

  1. Transpile ES6 code with Babel
  2. Run Mocha unit tests
  3. Package bundles with Webpack (dedupe + uglify)

See it live: run gulp server and open http://localhost:8080/public/. Verify you have downloaded just the preload JS bundle file. Now hit the button, it will download an additional bundle file, related with that button.

gulp-es6-webpack-example's People

Contributors

themindfuldev avatar

Watchers

 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.