Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix indenting and add .editorconfig

  • Loading branch information...
commit 02643752df6bbcb363f67546ebd9f334d4eeb295 1 parent f724dd6
@nschonni nschonni authored
Showing with 88 additions and 74 deletions.
  1. +11 −0 .editorconfig
  2. +77 −74 Gruntfile.js
View
11 .editorconfig
@@ -0,0 +1,11 @@
+# This file is for unifying the coding style for different editors and IDEs
+# editorconfig.org
+
+root = true
+
+[*]
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+indent_style = space
+indent_size = 4
View
151 Gruntfile.js
@@ -1,82 +1,85 @@
/*global module:false*/
module.exports = function(grunt) {
- // Project configuration.
- grunt.initConfig({
- // Metadata.
- pkg: grunt.file.readJSON('package.json'),
- banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
- '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
- '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
- '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
- ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
- // Task configuration.
- concat: {
- options: {
- banner: '<%= banner %>',
- stripBanners: true
- },
- dist: {
- src: ['lib/<%= pkg.name %>.js'],
- dest: 'dist/<%= pkg.name %>.js'
- }
- },
- uglify: {
- options: {
- banner: '<%= banner %>'
- },
- dist: {
- src: '<%= concat.dist.dest %>',
- dest: 'dist/<%= pkg.name %>.min.js'
- }
- },
- jshint: {
- options: {
- curly: true,
- eqeqeq: true,
- immed: true,
- latedef: true,
- newcap: true,
- noarg: true,
- sub: true,
- undef: true,
- unused: true,
- boss: true,
- eqnull: true,
- globals: {
- jQuery: true
+ // Project configuration.
+ grunt.initConfig({
+ // Metadata.
+ pkg: grunt.file.readJSON('package.json'),
+ banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
+ '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
+ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
+ // Task configuration.
+ concat: {
+ options: {
+ banner: '<%= banner %>',
+ stripBanners: true
+ },
+ dist: {
+ src: ['lib/<%= pkg.name %>.js'],
+ dest: 'dist/<%= pkg.name %>.js'
+ }
+ },
+ uglify: {
+ options: {
+ banner: '<%= banner %>'
+ },
+ dist: {
+ src: '<%= concat.dist.dest %>',
+ dest: 'dist/<%= pkg.name %>.min.js'
+ }
+ },
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ unused: true,
+ boss: true,
+ eqnull: true,
+ globals: {
+ jQuery: true
+ }
+ },
+ gruntfile: {
+ src: 'Gruntfile.js'
+ },
+ all: {
+ src: ['src/**/*.js']
+ },
+ tests: {
+ src: ['lib/**/*.js', 'test/**/*.js']
+ }
+ },
+ watch: {
+ gruntfile: {
+ files: '<%= jshint.gruntfile.src %>',
+ tasks: ['jshint:gruntfile']
+ },
+ src: {
+ files: '<%= jshint.all.src %>',
+ tasks: ['jshint:all']
+ },
+ lib_test: {
+ files: '<%= jshint.tests.src %>',
+ tasks: ['jshint:tests']
+ }
}
- },
- gruntfile: {
- src: 'Gruntfile.js'
- },
- lib_test: {
- src: ['lib/**/*.js', 'test/**/*.js']
- }
- },
- nodeunit: {
- files: ['test/**/*_test.js']
- },
- watch: {
- gruntfile: {
- files: '<%= jshint.gruntfile.src %>',
- tasks: ['jshint:gruntfile']
- },
- lib_test: {
- files: '<%= jshint.lib_test.src %>',
- tasks: ['jshint:lib_test', 'nodeunit']
- }
- }
- });
+ });
- // These plugins provide necessary tasks.
- grunt.loadNpmTasks('grunt-contrib-concat');
- grunt.loadNpmTasks('grunt-contrib-uglify');
- grunt.loadNpmTasks('grunt-contrib-nodeunit');
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks('grunt-contrib-watch');
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-watch');
- // Default task.
- grunt.registerTask('default', ['jshint', 'nodeunit', 'concat', 'uglify']);
+ // Default task.
+ grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
};
Please sign in to comment.
Something went wrong with that request. Please try again.