1
0
mirror of synced 2024-11-25 14:26:03 +03:00

Lint the Gruntfile

This commit is contained in:
Kevin Brown 2014-10-31 19:10:38 -04:00
parent f4f09c9d7e
commit 8e70642b87
3 changed files with 65 additions and 67 deletions

View File

@ -35,146 +35,146 @@ module.exports = function (grunt) {
jshintrc: true jshintrc: true
}, },
code: { code: {
src: ["src/js/**/*.js"] src: ['src/js/**/*.js']
}, },
tests: { tests: {
src: ["tests/**/*.js"] src: ['tests/**/*.js']
} }
}, },
sass: { sass: {
dist: { dist: {
options: { options: {
outputStyle: "compressed" outputStyle: 'compressed'
}, },
files: { files: {
"dist/css/select2.min.css": [ 'dist/css/select2.min.css': [
"src/scss/core.scss", 'src/scss/core.scss',
"src/scss/theme/default/layout.css" 'src/scss/theme/default/layout.css'
] ]
} }
}, },
dev: { dev: {
options: { options: {
outputStyle: "nested" outputStyle: 'nested'
}, },
files: { files: {
"dist/css/select2.css": [ 'dist/css/select2.css': [
"src/scss/core.scss", 'src/scss/core.scss',
"src/scss/theme/default/layout.css" 'src/scss/theme/default/layout.css'
] ]
} }
} }
}, },
requirejs: { requirejs: {
"dist": { 'dist': {
options: { options: {
baseUrl: "src/js", baseUrl: 'src/js',
optimize: "none", optimize: 'none',
name: "select2/core", name: 'select2/core',
out: "dist/js/select2.js", out: 'dist/js/select2.js',
include: amdIncludes.concat(includes), include: amdIncludes.concat(includes),
paths: { paths: {
almond: "../../vendor/almond-0.2.9", almond: '../../vendor/almond-0.2.9',
jquery: "jquery.shim" jquery: 'jquery.shim'
} }
} }
}, },
"dist.full": { 'dist.full': {
options: { options: {
baseUrl: "src/js", baseUrl: 'src/js',
optimize: "none", optimize: 'none',
name: "select2/core", name: 'select2/core',
out: "dist/js/select2.full.js", out: 'dist/js/select2.full.js',
include: amdIncludes.concat(fullIncludes), include: amdIncludes.concat(fullIncludes),
paths: { paths: {
almond: "../../vendor/almond-0.2.9", almond: '../../vendor/almond-0.2.9',
jquery: "../../vendor/jquery-2.1.0" jquery: '../../vendor/jquery-2.1.0'
} }
} }
}, },
"amd": { 'amd': {
options: { options: {
baseUrl: "src/js", baseUrl: 'src/js',
optimize: "none", optimize: 'none',
name: "select2/core", name: 'select2/core',
out: "dist/js/select2.amd.js", out: 'dist/js/select2.amd.js',
include: includes, include: includes,
paths: { paths: {
jquery: "empty:" jquery: 'empty:'
} }
} }
}, },
"amd.full": { 'amd.full': {
options: { options: {
baseUrl: "src/js", baseUrl: 'src/js',
optimize: "none", optimize: 'none',
name: "select2/core", name: 'select2/core',
out: "dist/js/select2.amd.full.js", out: 'dist/js/select2.amd.full.js',
include: fullIncludes, include: fullIncludes,
paths: { paths: {
jquery: "empty:" jquery: 'empty:'
} }
} }
} }
}, },
concat: { concat: {
"dist": { 'dist': {
src: [ src: [
"src/js/start.js", 'src/js/start.js',
"dist/js/select2.js", 'dist/js/select2.js',
"src/js/end.js" 'src/js/end.js'
], ],
dest: "dist/js/select2.js" dest: 'dist/js/select2.js'
}, },
"dist.full": { 'dist.full': {
src: [ src: [
"src/js/start.js", 'src/js/start.js',
"dist/js/select2.full.js", 'dist/js/select2.full.js',
"src/js/end.js" 'src/js/end.js'
], ],
dest: "dist/js/select2.full.js" dest: 'dist/js/select2.full.js'
} }
}, },
watch: { watch: {
js: { js: {
files: [ files: [
"src/js/select2/**/*.js", 'src/js/select2/**/*.js',
"tests/**/*.js", 'tests/**/*.js'
], ],
tasks: [ tasks: [
"compile", 'compile',
"test", 'test',
'minify' 'minify'
] ]
}, },
css: { css: {
files: [ files: [
"src/scss/**/*.scss" 'src/scss/**/*.scss'
], ],
tasks: [ tasks: [
"compile", 'compile',
'minify' 'minify'
] ]
} }
} }
}); });
grunt.loadNpmTasks("grunt-contrib-concat") grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks("grunt-contrib-jshint") grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks("grunt-contrib-qunit") grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks("grunt-contrib-requirejs") grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks("grunt-contrib-uglify") grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks("grunt-contrib-watch") grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks("grunt-sass") grunt.loadNpmTasks('grunt-sass');
grunt.registerTask("default", ["compile", "test", "minify"]) grunt.registerTask('default', ['compile', 'test', 'minify']);
grunt.registerTask("compile", ["requirejs", "sass:dev", "concat"]) grunt.registerTask('compile', ['requirejs', 'sass:dev', 'concat']);
grunt.registerTask("minify", ["uglify", "sass:dist"]) grunt.registerTask('minify', ['uglify', 'sass:dist']);
grunt.registerTask("test", ["qunit", "jshint"]) grunt.registerTask('test', ['qunit', 'jshint']);
} };

View File

@ -9534,8 +9534,6 @@ define("almond", function(){});
return jQuery; return jQuery;
})); }));
define("jquery", function(){});
define('select2/utils',[], function () { define('select2/utils',[], function () {
var Utils = {}; var Utils = {};

File diff suppressed because one or more lines are too long