📜 ⬆️ ⬇️

ES6 Browser Development

Good day.



Support for the new standard EcmaScript 6 in browsers is getting closer and closer, and for those who can not wait to start developing with the use of new features of ES6, I suggest looking at the template project for this purpose.
')
I present to your attention github.com/DavidKlassen/es6-browser-boilerplate .

The basis of the template is github.com/babel/babel-library-boilerplate , but gulpfile.js has been thoroughly cleaned and simplified. I removed many dependencies and left the possibilities that are necessary for developing applications for browsers.

The main goals that I pursued:




Work environment


Requirements for the working environment are fairly standard and most likely, if you are developing in JavaScript, you have already installed everything. You will need NodeJS or io.js , NPM , Gulp , Bower and Java 7+ (java is needed, because Google Closure Compiler is used for minification), see UPD2.

Template features




How to use



Download and prepare the project to work is very simple:
$ git clone git@github.com:DavidKlassen/es6-browser-boilerplate.git $ cd es6-browser-boilerplate $ npm run setup 

After that, you can delete .git and start coding.

List of available gulp tasks:


Things I would like to improve


In addition to all sorts of trivialities such as connecting the test-frameworks globally for all test files and minor improvements in the gulpfile, I would like to enable the ability to use Google Closure Compiler in ADVANCED_OPTIMIZATIONS mode and static type analysis based on gcc annotations.

And of course, I am waiting for feedback, suggestions and pull requests. Thanks for attention! :)

UPD: In comments, there was a dispute about the prevalence of Java on the developers' machines, so I add votes. If you are not sure whether java is on your machine or not, run: java -version
UPD2: At the request of workers replaced google closure compliler with uglifyjs.

Source: https://habr.com/ru/post/261389/


All Articles