Skip to content

Commit

Permalink
Merge branch 'js'
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Mar 10, 2016
2 parents 2caf2f1 + 215b237 commit bfdb234
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 83 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ docs | Generate jsdoc documentation from sources.
#### Languages
- [TypeScript](http://www.typescriptlang.org), JavaScript
- [Sass](http://sass-lang.com/), CSS
- [Jade](http://jade-lang.com), HTML
- [Gettext](https://angular-gettext.rocketeer.be) (for translations)

#### Quality
Expand All @@ -103,13 +102,12 @@ docs | Generate jsdoc documentation from sources.
#### Development
- Automation with [gulp](http://gulpjs.com)
- Development server with API proxy and live reload ([BrowserSync](http://www.browsersync.io))
- [JSDoc](http://usejsdoc.org) generation with angular support

#### Build
- JS+CSS+HTML bundling and minification ([useref](https://github.com/jonkemp/gulp-useref),
[uglify](https://github.com/terinjokes/gulp-uglify),
[minify-html](https://github.com/murphydanger/gulp-minify-html),
[clean-css](https://github.com/ben-eb/gulp-minify-css))
[htmlmin](https://github.com/jonschlinkert/gulp-htmlmin),
[clean-css](https://www.npmjs.com/package/gulp-clean-css)
- CSS browser support ([autoprefixer](https://github.com/sindresorhus/gulp-autoprefixer))
- Images optimization ([imagemin](https://github.com/sindresorhus/gulp-imagemin))
- Automatic angular module annotation ([ngAnnotate](https://github.com/Kagami/gulp-ng-annotate))
Expand Down
5 changes: 0 additions & 5 deletions docs/coding-guides/html.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,3 @@
* The only tags that allows self-closing are the one that does not require a closing tag in first place:
these are the void elements that do not not accept content `<br>`, `<hr>`, `<img>`, `<input>`, `<meta>`, `<link>`
(and others).

## Jade

If you're ready for the switch, this starter kit supports [Jade](http://jade-lang.com/) partials in place of HTML.
Jade has a cleaner, lighter and less error-prone syntax than HTML, you should try it to see if it fits your team.
15 changes: 1 addition & 14 deletions docs/tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ $ gulp
Build and optimize the current project, ready for deployment.
This includes linting as well as image, script, stylesheet and HTML optimization and minification.


## Main commands

Task | Description
Expand Down Expand Up @@ -46,25 +45,13 @@ tsd | Download and update all TypeScript definitions for Bower dependenc
tsd:restore | Download TypeScript definitions according to tsd.json
tsd:clean | Delete downloaded TypeScript definitions.

## HTML / Jade

Task | Description
---------|------------------------------------------------------------------------------------------------------------
partials | Put all .html found in project folder + in temporary folder in a template cache file.
jade | Convert all .jade found in project to HTML in the temporary folder.

## Build and assets

Task | Description
-------------|--------------------------------------------------------------------------------------------------------
build:source | Build and optimize all source files, excluding assets.
partials | Put all .html found in project folder + in temporary folder in a template cache file.
styles | Generate main CSS file using project main style file.
fonts | Copy fonts from bower dependencies in dist folder.
images | Compress images (using imagemin) then copy them in dist folder.
other | Copy project fonts and other misc files in dist folder.

## Documentation

Task | Description
--------|-------------------------------------------------------------------------------------------------------------
docs | Generate jsdoc documentation from sources.
10 changes: 4 additions & 6 deletions gulp/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,15 @@ gulp.task('build:sources', ['inject'], function() {
.pipe($.uglify({preserveComments: $.uglifySaveLicense})).on('error', conf.errorHandler('Uglify'))
.pipe(jsFilter.restore)
.pipe(cssFilter)
.pipe($.minifyCss({ processImport: false }))
.pipe($.cleanCss({processImport: false}))
.pipe(cssFilter.restore)
.pipe(assets.restore())
.pipe($.useref())
.pipe($.revReplace())
.pipe(htmlFilter)
.pipe($.minifyHtml({
empty: true,
spare: true,
quotes: true,
conditionals: true
.pipe($.htmlmin({
removeComments: true,
collapseWhitespace: true
}))
.pipe(htmlFilter.restore)
.pipe(gulp.dest(path.join(conf.paths.dist, '/')))
Expand Down
26 changes: 0 additions & 26 deletions gulp/jade.js

This file was deleted.

13 changes: 0 additions & 13 deletions gulp/jsdoc.js

This file was deleted.

11 changes: 5 additions & 6 deletions gulp/partials.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ var conf = require('../gulpfile.config');

var $ = require('gulp-load-plugins')();

gulp.task('partials', ['jade'], function() {
gulp.task('partials', function() {
return gulp.src([
path.join(conf.paths.src, '**/*.html'),
path.join('!' + conf.paths.bower, '**/*.html'),
path.join(conf.paths.tmp, '**/*.html'),
path.join('!' + conf.paths.src, 'index.html'),
path.join('!' + conf.paths.tmp, 'index.html')
])
.pipe($.minifyHtml({
empty: true,
spare: true,
quotes: true,
loose: true
.pipe($.htmlmin({
removeComments: true,
collapseWhitespace: true
}))
.pipe($.angularTemplatecache('templateCache.js', {
module: 'app.additions',
Expand Down
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "starter-kit",
"version": "1.0.1",
"version": "1.0.2",
"description": "Web project starter kit including tooling, best practices and project seed",
"keywords": "angular, bootstrap, gulp, ui-router, ui-bootstrap, sass, typescript, jade",
"keywords": "angular, bootstrap, gulp, ui-router, ui-bootstrap, sass, typescript",
"license": "MIT",
"author": "Yohan Lasorsa",
"repository": {
Expand All @@ -13,7 +13,6 @@
"test": "gulp test"
},
"devDependencies": {
"angular-jsdoc": "~1.3.3",
"browser-sync": "^2.11.1",
"browser-sync-spa": "~1.0.3",
"chalk": "~1.1.1",
Expand All @@ -25,20 +24,18 @@
"gulp-angular-templatecache": "~1.8.0",
"gulp-autoprefixer": "~3.1.0",
"gulp-cache": "~0.4.2",
"gulp-clean-css": "^2.0.3",
"gulp-concat": "~2.6.0",
"gulp-consolidate": "~0.1.2",
"gulp-filter": "~3.0.1",
"gulp-flatten": "~0.2.0",
"gulp-htmlmin": "^1.3.0",
"gulp-if": "^2.0.0",
"gulp-imagemin": "~2.4.0",
"gulp-inject": "~3.0.0",
"gulp-jade": "~1.1.0",
"gulp-jscs": "~3.0.2",
"gulp-jscs-stylish": "~1.3.0",
"gulp-jshint": "^2.0.0",
"gulp-load-plugins": "~1.2.0",
"gulp-minify-css": "^1.2.3",
"gulp-minify-html": "~1.0.5",
"gulp-ng-annotate": "~1.1.0",
"gulp-protractor": "~2.1.0",
"gulp-rename": "~1.2.2",
Expand All @@ -57,9 +54,7 @@
"gulp-util": "~3.0.7",
"http-proxy-middleware": "^0.10.0",
"https-proxy-agent": "^1.0.0",
"jade": "~1.11.0",
"jasmine-spec-reporter": "^2.4.0",
"jsdoc": "~3.4.0",
"jshint": "^2.9.1",
"jshint-stylish": "~2.1.0",
"karma": "~0.13.21",
Expand Down

0 comments on commit bfdb234

Please sign in to comment.