mirror of
https://github.com/konvajs/konva.git
synced 2025-10-14 03:24:54 +08:00
test, gen-doc tasks
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,6 +3,7 @@ analysis
|
||||
node_modules
|
||||
bower_components
|
||||
phantomjs.exe
|
||||
documentation
|
||||
|
||||
# Numerous always-ignore extensions
|
||||
*.diff
|
||||
|
44
Gruntfile.js
44
Gruntfile.js
@@ -195,6 +195,19 @@ module.exports = function(grunt) {
|
||||
src: 'dist/kinetic-v<%= pkg.version %>.js',
|
||||
dest: 'kinetic.js',
|
||||
}
|
||||
},
|
||||
shell: {
|
||||
jsdoc: {
|
||||
options: {
|
||||
stdout: true,
|
||||
stderr : true,
|
||||
failOnError : true
|
||||
},
|
||||
command: './node_modules/.bin/jsdoc ./dist/kinetic-v<%= pkg.version %>.js -d ./documentation'
|
||||
}
|
||||
},
|
||||
mocha_phantomjs: {
|
||||
all: ['test/runner.html']
|
||||
}
|
||||
};
|
||||
|
||||
@@ -209,18 +222,11 @@ module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig(config);
|
||||
|
||||
// Load plugins
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-replace');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
|
||||
// Tasks
|
||||
grunt.registerTask('dev', ['clean', 'concat:dev', 'replace:dev']);
|
||||
grunt.registerTask('beta', ['clean', 'concat:beta', 'replace:beta']);
|
||||
grunt.registerTask('full', [
|
||||
grunt.registerTask('dev', 'Create dev version', ['clean', 'concat:dev', 'replace:dev']);
|
||||
grunt.registerTask('beta', 'Create beta version', ['clean', 'concat:beta', 'replace:beta']);
|
||||
grunt.registerTask('full', 'Build full version and create min files', [
|
||||
'clean',
|
||||
'concat:prod',
|
||||
'uglify',
|
||||
@@ -231,5 +237,21 @@ module.exports = function(grunt) {
|
||||
'copy:prod1',
|
||||
'copy:prod2'
|
||||
]);
|
||||
grunt.registerTask('hint', ['clean', 'concat:dev', 'replace:dev', 'jshint']);
|
||||
|
||||
grunt.registerTask('gen-doc', 'Generate documentation to documentation folder', [
|
||||
'full',
|
||||
'shell:jsdoc',
|
||||
]);
|
||||
|
||||
grunt.registerTask('hint', 'Check lint errors', ['clean', 'concat:dev', 'replace:dev', 'jshint']);
|
||||
grunt.registerTask('tests', 'Run tests', ['dev', 'mocha_phantomjs']);
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||
grunt.loadNpmTasks('grunt-replace');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||
grunt.loadNpmTasks('grunt-shell');
|
||||
grunt.loadNpmTasks('grunt-mocha-phantomjs');
|
||||
};
|
||||
|
@@ -15,7 +15,10 @@
|
||||
"grunt-cli": "0.1.13",
|
||||
"grunt": "0.4.2",
|
||||
"connect": "2.13.0",
|
||||
"grunt-contrib-copy": "~0.5.0"
|
||||
"grunt-contrib-copy": "~0.5.0",
|
||||
"grunt-shell": "^0.6.4",
|
||||
"jsdoc": "^3.3.0-alpha4",
|
||||
"grunt-mocha-phantomjs": "^0.4.2"
|
||||
},
|
||||
"readmeFilename": "README.md",
|
||||
"main": "Gruntfile.js",
|
||||
|
Reference in New Issue
Block a user