mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
build: added precommit
This commit is contained in:
parent
34edea4ac7
commit
cde87d9adc
@ -99,10 +99,11 @@
|
||||
"watch": "./node_modules/.bin/webpack --progress --colors --watch --config scripts/webpack/webpack.dev.js",
|
||||
"build": "./node_modules/.bin/grunt build",
|
||||
"test": "./node_modules/.bin/grunt test",
|
||||
"test-ci": "./node_modules/.bin/grunt test --coverage=true",
|
||||
"test:coverage": "./node_modules/.bin/grunt test --coverage=true",
|
||||
"lint": "./node_modules/.bin/tslint -c tslint.json --project tsconfig.json --type-check",
|
||||
"karma": "./node_modules/grunt-cli/bin/grunt karma:dev",
|
||||
"jest": "./node_modules/jest-cli/bin/jest.js --notify --watch"
|
||||
"jest": "./node_modules/jest-cli/bin/jest.js --notify --watch",
|
||||
"precommit": "grunt precommit"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
@ -87,7 +87,7 @@ export class ColorPickerPopover extends React.Component<IProps, any> {
|
||||
);
|
||||
const spectrumTab = (
|
||||
<div id="spectrum">
|
||||
<SpectrumPicker color={this.state.color} onColorSelect={this.spectrumColorSelected.bind(this)} options={{}} />
|
||||
<fSpectrumPicker color={this.state.color} onColorSelect={this.spectrumColorSelected.bind(this)} options={{}} />
|
||||
</div>
|
||||
);
|
||||
const currentTab = this.state.tab === 'palette' ? paletteTab : spectrumTab;
|
||||
|
@ -16,7 +16,7 @@ rm -rf node_modules
|
||||
npm install -g yarn --quiet
|
||||
yarn install --pure-lockfile --no-progress
|
||||
|
||||
exit_if_fail npm run test-ci
|
||||
exit_if_fail npm run test:coverage
|
||||
exit_if_fail npm run build
|
||||
|
||||
# publish code coverage
|
||||
|
@ -19,6 +19,13 @@ module.exports = function(grunt) {
|
||||
'no-only-tests'
|
||||
]);
|
||||
|
||||
grunt.registerTask('precommit', [
|
||||
'sasslint',
|
||||
'exec:tslint',
|
||||
"exec:jest",
|
||||
'no-only-tests'
|
||||
]);
|
||||
|
||||
grunt.registerTask('no-only-tests', function() {
|
||||
var files = grunt.file.expand('public/**/*_specs\.ts', 'public/**/*_specs\.js');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user