Commit cde87d9a by Torkel Ödegaard

build: added precommit

parent 34edea4a
......@@ -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');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment