mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Merge pull request #6909 from kevinansfield/grunt-split
Move client linting into Ghost-Admin
This commit is contained in:
commit
a483bc4fba
2 changed files with 16 additions and 46 deletions
61
Gruntfile.js
61
Gruntfile.js
|
@ -98,15 +98,6 @@ var _ = require('lodash'),
|
||||||
jshintrc: true
|
jshintrc: true
|
||||||
},
|
},
|
||||||
|
|
||||||
client: [
|
|
||||||
'core/client/**/*.js',
|
|
||||||
'!core/client/node_modules/**/*.js',
|
|
||||||
'!core/client/bower_components/**/*.js',
|
|
||||||
'!core/client/tmp/**/*.js',
|
|
||||||
'!core/client/dist/**/*.js',
|
|
||||||
'!core/client/vendor/**/*.js'
|
|
||||||
],
|
|
||||||
|
|
||||||
server: [
|
server: [
|
||||||
'*.js',
|
'*.js',
|
||||||
'!config*.js', // note: i added this, do we want this linted?
|
'!config*.js', // note: i added this, do we want this linted?
|
||||||
|
@ -123,36 +114,6 @@ var _ = require('lodash'),
|
||||||
config: true
|
config: true
|
||||||
},
|
},
|
||||||
|
|
||||||
client: {
|
|
||||||
options: {
|
|
||||||
config: 'core/client/.jscsrc'
|
|
||||||
},
|
|
||||||
|
|
||||||
files: {
|
|
||||||
src: [
|
|
||||||
'core/client/**/*.js',
|
|
||||||
'!core/client/node_modules/**/*.js',
|
|
||||||
'!core/client/bower_components/**/*.js',
|
|
||||||
'!core/client/tests/**/*.js',
|
|
||||||
'!core/client/tmp/**/*.js',
|
|
||||||
'!core/client/dist/**/*.js',
|
|
||||||
'!core/client/vendor/**/*.js'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
client_tests: {
|
|
||||||
options: {
|
|
||||||
config: 'core/client/tests/.jscsrc'
|
|
||||||
},
|
|
||||||
|
|
||||||
files: {
|
|
||||||
src: [
|
|
||||||
'core/client/tests/**/*.js'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
server: {
|
server: {
|
||||||
files: {
|
files: {
|
||||||
src: [
|
src: [
|
||||||
|
@ -306,10 +267,6 @@ var _ = require('lodash'),
|
||||||
|
|
||||||
csscombfix: {
|
csscombfix: {
|
||||||
command: path.resolve(cwd + '/node_modules/.bin/csscomb -c core/client/app/styles/csscomb.json -v core/client/app/styles')
|
command: path.resolve(cwd + '/node_modules/.bin/csscomb -c core/client/app/styles/csscomb.json -v core/client/app/styles')
|
||||||
},
|
|
||||||
|
|
||||||
csscomblint: {
|
|
||||||
command: path.resolve(cwd + '/node_modules/.bin/csscomb -c core/client/app/styles/csscomb.json -lv core/client/app/styles')
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -385,6 +342,14 @@ var _ = require('lodash'),
|
||||||
'core/shared/ghost-url.min.js': 'core/shared/ghost-url.js'
|
'core/shared/ghost-url.min.js': 'core/shared/ghost-url.js'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// ### grunt-subgrunt
|
||||||
|
// Run grunt tasks in submodule Gruntfiles
|
||||||
|
subgrunt: {
|
||||||
|
lint: {
|
||||||
|
'core/client': 'lint'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -531,7 +496,7 @@ var _ = require('lodash'),
|
||||||
} else if (process.env.TEST_SUITE === 'client') {
|
} else if (process.env.TEST_SUITE === 'client') {
|
||||||
grunt.task.run(['init', 'test-client']);
|
grunt.task.run(['init', 'test-client']);
|
||||||
} else if (process.env.TEST_SUITE === 'lint') {
|
} else if (process.env.TEST_SUITE === 'lint') {
|
||||||
grunt.task.run(['shell:ember:init', 'lint']);
|
grunt.task.run(['lint']);
|
||||||
} else {
|
} else {
|
||||||
grunt.task.run(['validate-all']);
|
grunt.task.run(['validate-all']);
|
||||||
}
|
}
|
||||||
|
@ -560,8 +525,12 @@ var _ = require('lodash'),
|
||||||
// ### Lint
|
// ### Lint
|
||||||
//
|
//
|
||||||
// `grunt lint` will run the linter and the code style checker so you can make sure your code is pretty
|
// `grunt lint` will run the linter and the code style checker so you can make sure your code is pretty
|
||||||
grunt.registerTask('lint', 'Run the code style checks and linter',
|
grunt.registerTask('lint', 'Run the code style checks and linter for server',
|
||||||
['jshint', 'jscs', 'shell:csscomblint']
|
['jshint', 'jscs']
|
||||||
|
);
|
||||||
|
|
||||||
|
grunt.registerTask('lint-all', 'Run the code style checks and linter for server and client',
|
||||||
|
['lint', 'subgrunt:lint']
|
||||||
);
|
);
|
||||||
|
|
||||||
// ### test-setup *(utility)(
|
// ### test-setup *(utility)(
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
"grunt-mocha-cli": "2.1.0",
|
"grunt-mocha-cli": "2.1.0",
|
||||||
"grunt-mocha-istanbul": "5.0.1",
|
"grunt-mocha-istanbul": "5.0.1",
|
||||||
"grunt-shell": "1.3.0",
|
"grunt-shell": "1.3.0",
|
||||||
|
"grunt-subgrunt": "1.2.0",
|
||||||
"grunt-update-submodules": "0.4.1",
|
"grunt-update-submodules": "0.4.1",
|
||||||
"istanbul": "0.4.3",
|
"istanbul": "0.4.3",
|
||||||
"matchdep": "1.0.1",
|
"matchdep": "1.0.1",
|
||||||
|
|
Loading…
Add table
Reference in a new issue