项目作者: iondrimba

项目描述 :
ES6 startup project
高级语言: JavaScript
项目地址: git://github.com/iondrimba/es6starterproject.git
创建时间: 2016-07-28T22:30:00Z
项目社区:https://github.com/iondrimba/es6starterproject

开源协议:MIT License

下载


ES6 Starter Project

Ready to go ES6 project starter with Tests and Coverage.

Travis build status Build status Coverage Status Maintainability

Requires:

  • NodeJs
  • Gulp

Installation

  1. git clone https://github.com/iondrimba/es6starterproject.git
  2. cd es6starterproject
  3. npm install
  4. gulp

[Live demo]

GOAL:

Reduce time spent by developers looking to work today with all the new ES6 features, it also includes Tests and Coverage. I chose to leave it simple as possible (no MV* Framework dependency).

Features:

  • ES6 ready
  • SemVer (Automated package and files versioning)
  • Router system with pushstate (page.js)
  • Templating engine (handlebars.js)
  • Tests (Jasmine + karma)
  • Coverage (Coveralls)
  • CI (Travis)
  • Module system CommonJs (browserify)

In order to test if Pushstate is working
you have to host it on apache so it can reads the .htaccess file

Testing:

  • $ npm test

Includes:

  • ES6 transpile via Babel
  • BrowserSync
  • Browserify
  • Karma
  • SemVer
  • Jasmine
  • Code Coverage
  • Sass
  • ESLint
  • Scss Lint (Requires Ruby and scss-lint)
  • Imagemin (images optimization)
  • Uglify
  • Watch
  • Html-Min
  • Post-Css (autoprefixer)

Gulp Tasks:

  • gulp (default)
  • gulp deploy (run tasks without browser-sync and watch)
  • gulp optimize (run optimization tasks)
  • gulp bump-patch / minor / major (update files with version number)

Semantic Versioning:

The bump-versions tasks should be executed after your deploy and optimize task.
The task will:

  1. Rename the file app.js to app.version.js
  2. Rename the file app.css to app.version.css
  3. Will update the index.html with the new file references.

Structure:

  1. ├── public/
  2. ├─── css/
  3. ├─── js/
  4. ├─── images/
  5. ├─── .htaccess
  6. └─── index.html
  7. │── spec/(jasmine spec files)
  8. │── src/
  9. ├── images/
  10. ├── scripts/
  11. ├─── core/
  12. ├─── models/
  13. ├─── partials/
  14. ├─── views
  15. └─── app.js
  16. ├── scss/
  17. ├─── components/
  18. ├─── partials/
  19. ├─── views/
  20. └─── app.scss
  21. └── templates/
  22. │── tasks/
  23. │── .gitignore
  24. │── .travis.yml
  25. │── gulpfile.js
  26. │── karma.conf.js
  27. │── LICENSE
  28. │── lint.yml
  29. │── package.json
  30. └── README.md

[Live demo]:http://iondrimba.github.io/es6starterproject