diff --git a/.editorconfig b/.editorconfig index 9aac58c..1073fd1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,3 +11,8 @@ insert_final_newline = true [*.md] trim_trailing_whitespace = false + +# Matches the exact files package.json and .travis.yml +[{package.json,.travis.yml}] +indent_style = space +indent_size = 2 \ No newline at end of file diff --git a/app/templates/Gruntfile.js b/app/templates/Gruntfile.js index 8928eb6..d334cbb 100644 --- a/app/templates/Gruntfile.js +++ b/app/templates/Gruntfile.js @@ -82,34 +82,12 @@ module.exports = function (grunt) { clean: { dist: ['.tmp', '<%%= yeoman.dist %>/*'], server: '.tmp' - }, - less: { - main: { - options: { - paths: ['<%%= yeoman.app %>/styles'], - cleancss: true - }, - files: { - '<%%= yeoman.dist %>/styles/main.min.css': ['<%%= yeoman.app %>/styles/main.less'] - } - } - }, - // Make sure code styles are up to par and there are no obvious mistakes - jshint: { - options: { - jshintrc: '.jshintrc', - reporter: require('jshint-stylish') - }, - all: [ - 'Gruntfile.js', - '<%%= yeoman.app %>/scripts/{,*/}*.js' - ] }, // Copies remaining files to places other tasks can use copy: { html: { files: [ - { expand: true, flatten: true, src: ['<%%= yeoman.app %>/{,*/}*.html'], dest: '<%%= yeoman.dist %>', filter: 'isFile' } + { expand: true, cwd: '<%%= yeoman.app %>/', src: ['{,*/}*.html'], dest: '<%%= yeoman.dist %>', filter: 'isFile' } ] }, dist: { @@ -144,11 +122,27 @@ module.exports = function (grunt) { ] } }, - concat: { - options: { - banner: '<%%= banner %>', - stripBanners: true + less: { + main: { + options: { + paths: ['<%%= yeoman.app %>/styles'], + cleancss: true + }, + files: { + '<%%= yeoman.dist %>/styles/main.min.css': ['<%%= yeoman.app %>/styles/main.less'] + } } + }, + // Make sure code styles are up to par and there are no obvious mistakes + jshint: { + options: { + jshintrc: '.jshintrc', + reporter: require('jshint-stylish') + }, + all: [ + 'Gruntfile.js', + '<%%= yeoman.app %>/scripts/{,*/}*.js' + ] }, uglify: { options: { @@ -184,8 +178,9 @@ module.exports = function (grunt) { grunt.task.run([ 'clean', 'copy', - 'uglify', - 'less:main',<% if (includeModernizr) { %> + 'less' + 'jshint', + 'uglify',,<% if (includeModernizr) { %> 'modernizr',<% } %> 'connect:livereload', 'watch' @@ -194,14 +189,15 @@ module.exports = function (grunt) { grunt.registerTask('build', [ 'clean:dist', - 'uglify', - 'less:main', - 'copy'<% if (includeModernizr) { %>, + 'copy', + 'less', + 'jshint', + 'uglify'<% if (includeModernizr) { %>, 'modernizr'<% } %> ]); grunt.registerTask('default', [ - 'less:main', + 'less', 'jshint', 'uglify:main' ]); diff --git a/package.json b/package.json index 2677f6c..6020a7e 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,49 @@ { - "name": "generator-web", - "version": "0.2.0", - "description": "Scaffold a modern site with h5bp, bootstrap 3, jquery, modernizr and font awesome", - "keywords": [ - "yeoman-generator", - "web", - "front-end", - "h5bp", - "modernizr", - "bootstrap", - "underscore.js" - ], - "homepage": "https://github.com/gilbarbara/generator-web", - "bugs": "https://github.com/gilbarbara/generator-web/issues", - "author": { - "name": "Gil Barbara", - "email": "gilbarbara@gmail.com", - "url": "https://github.com/gilbarbara" - }, - "main": "app/index.js", - "repository": { - "type": "git", - "url": "git://github.com/gilbarbara/generator-web.git" - }, - "scripts": { - "test": "mocha --reporter spec" - }, - "dependencies": { - "yeoman-generator": "~0.16.0" - }, - "peerDependencies": { - "yo": ">=1.1.2" - }, - "devDependencies": { - "mocha": "*" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">=1.2.10" - }, - "licenses": [ - { - "type": "BSD" - } - ] + "name": "generator-web", + "version": "0.2.0", + "description": "Scaffold a modern site with jquery, modernizr, bootstrap 3 and font-awesome ", + "keywords": [ + "yeoman-generator", + "web", + "front-end", + "h5bp", + "jquery", + "modernizr", + "underscore.js", + "bootstrap", + "font-awesome" + ], + "homepage": "https://github.com/gilbarbara/generator-web", + "bugs": "https://github.com/gilbarbara/generator-web/issues", + "author": { + "name": "Gil Barbara", + "email": "gilbarbara@gmail.com", + "url": "https://github.com/gilbarbara" + }, + "main": "app/index.js", + "repository": { + "type": "git", + "url": "git://github.com/gilbarbara/generator-web.git" + }, + "scripts": { + "test": "mocha --reporter spec" + }, + "dependencies": { + "yeoman-generator": "~0.16.0" + }, + "peerDependencies": { + "yo": ">=1.1.2" + }, + "devDependencies": { + "mocha": "*" + }, + "engines": { + "node": ">=0.10.0", + "npm": ">=1.2.10" + }, + "licenses": [ + { + "type": "BSD" + } + ] }