mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 08:56:15 +08:00
grunt server tasks added
This commit is contained in:
27
Gruntfile.js
27
Gruntfile.js
@@ -208,7 +208,16 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
mocha_phantomjs: {
|
mocha_phantomjs: {
|
||||||
all: ['test/runner.html']
|
all: ['test/runner.html']
|
||||||
}
|
},
|
||||||
|
watch: {
|
||||||
|
dev: {
|
||||||
|
files: ['src/**/*.js'],
|
||||||
|
tasks: ['dev'],
|
||||||
|
options: {
|
||||||
|
spawn: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -243,8 +252,19 @@ module.exports = function(grunt) {
|
|||||||
'shell:jsdoc',
|
'shell:jsdoc',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
grunt.registerTask('hint', 'Check lint errors', ['clean', 'concat:dev', 'replace:dev', 'jshint']);
|
grunt.registerTask('lint', 'Check lint errors', ['jshint']);
|
||||||
grunt.registerTask('tests', 'Run tests', ['dev', 'mocha_phantomjs']);
|
grunt.registerTask('test', 'Run tests', ['dev', 'mocha_phantomjs']);
|
||||||
|
|
||||||
|
grunt.registerTask('server', 'run local server and create dev version', function() {
|
||||||
|
|
||||||
|
grunt.task.run('dev');
|
||||||
|
grunt.log.writeln('Tests server starts on http://localhost:8080/test/runner.html');
|
||||||
|
var connect = require('connect');
|
||||||
|
connect.createServer(
|
||||||
|
connect.static(__dirname)
|
||||||
|
).listen(8080);
|
||||||
|
grunt.task.run('watch:dev');
|
||||||
|
});
|
||||||
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-concat');
|
grunt.loadNpmTasks('grunt-contrib-concat');
|
||||||
grunt.loadNpmTasks('grunt-replace');
|
grunt.loadNpmTasks('grunt-replace');
|
||||||
@@ -254,4 +274,5 @@ module.exports = function(grunt) {
|
|||||||
grunt.loadNpmTasks('grunt-contrib-copy');
|
grunt.loadNpmTasks('grunt-contrib-copy');
|
||||||
grunt.loadNpmTasks('grunt-shell');
|
grunt.loadNpmTasks('grunt-shell');
|
||||||
grunt.loadNpmTasks('grunt-mocha-phantomjs');
|
grunt.loadNpmTasks('grunt-mocha-phantomjs');
|
||||||
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
};
|
};
|
||||||
|
|||||||
0
jsdoc-master/jsdoc
Normal file → Executable file
0
jsdoc-master/jsdoc
Normal file → Executable file
@@ -18,7 +18,8 @@
|
|||||||
"grunt-contrib-copy": "~0.5.0",
|
"grunt-contrib-copy": "~0.5.0",
|
||||||
"grunt-shell": "^0.6.4",
|
"grunt-shell": "^0.6.4",
|
||||||
"jsdoc": "^3.3.0-alpha4",
|
"jsdoc": "^3.3.0-alpha4",
|
||||||
"grunt-mocha-phantomjs": "^0.4.2"
|
"grunt-mocha-phantomjs": "^0.4.2",
|
||||||
|
"grunt-contrib-watch": "^0.5.3"
|
||||||
},
|
},
|
||||||
"readmeFilename": "README.md",
|
"readmeFilename": "README.md",
|
||||||
"main": "Gruntfile.js",
|
"main": "Gruntfile.js",
|
||||||
|
|||||||
Reference in New Issue
Block a user