From d794301301f20df071ccf06bfa4ba07405bdf0dc Mon Sep 17 00:00:00 2001 From: grosbouddha Date: Sun, 26 May 2013 23:58:59 +0200 Subject: [PATCH] Initial Grunt architecture --- Gruntfile.js | 48 ++++++++++++++++++++++++ package.json | 38 ++++++++++++------- tests/integration/casperjs/smoke_test.js | 1 + 3 files changed, 73 insertions(+), 14 deletions(-) create mode 100644 Gruntfile.js create mode 100644 tests/integration/casperjs/smoke_test.js diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..0b216269 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,48 @@ +grunt.loadNpmTasks('grunt-contrib-connect'); +grunt.loadNpmTasks('grunt-contrib-jshint'); +//grunt.loadNpmTasks('grunt-contrib-nodeunit'); +grunt.loadNpmTasks('grunt-ghost'); + +grunt.registerTask('test', ['jshint', /*'nodeunit',*/ 'connect', 'ghost']); + +jshint: { + /*options: { + jshintrc: '.jshintrc' + },*/ + files: [ + 'Gruntfile.js', + 'package.json', + 'source/**/*.js'/*, + '<%= nodeunit.tests %>'*/ + ] +}, +/* +nodeunit: { + tests: ['tests/nodeunit/*_test.js'] +}, +*/ +connect: { + www: { + options: { + base: 'source', + port: 4545 + } + } +}, +ghost: { + test: { + files: [{ + src: ['tests/integration/casperjs/*_test.js'] + }] + }, + options: { + args: { + baseUrl: 'http://localhost:' + + '<%= connect.www.options.port %>/' + }, + direct: false, + logLevel: 'error', + printCommand: false, + printFilePaths: true + } +} \ No newline at end of file diff --git a/package.json b/package.json index 3de5a1df..bb64eed3 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,25 @@ -{ - "author": "People", - "name": "piskel", - "description": "Web based 2d animations editor", - "version": "0.0.1", - "homepage": "http://github.com/juliandescottes/piskel", - "repository": { - "type": "git", - "url": "http://github.com/juliandescottes/piskel.git" - }, - "scripts": { "test": "make test" }, - "devDependencies": { - "jshint": "0.6.1" - } +{ + "author": "People", + "name": "piskel", + "description": "Web based 2d animations editor", + "version": "0.0.1", + "homepage": "http://github.com/juliandescottes/piskel", + "repository": { + "type": "git", + "url": "http://github.com/juliandescottes/piskel.git" + }, + "scripts": { + "test": "grunt test" + //"test": "make test" + }, + "devDependencies": { + //"jshint": "0.6.1", + "grunt": "0.4.1", + // Grunt task to start a web server: + "grunt-contrib-connect": "0.3.0", + "grunt-contrib-jshint": "0.5.4", + //"grunt-contrib-nodeunit": "0.1.2", + // Grunt task to run CasperJS tests: + "grunt-ghost": "1.0.12" + } } \ No newline at end of file diff --git a/tests/integration/casperjs/smoke_test.js b/tests/integration/casperjs/smoke_test.js new file mode 100644 index 00000000..aab0e892 --- /dev/null +++ b/tests/integration/casperjs/smoke_test.js @@ -0,0 +1 @@ +// pouet \ No newline at end of file