diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 00000000..1e98c389 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,6 @@ +{ + "evil": true, + "asi": true, + "smarttabs": true, + "eqnull": true +} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 7f2ef5de..ca894eb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,13 @@ -language: node_js -node_js: - - 0.6 \ No newline at end of file +language: node_js +node_js: + - 0.8 +before_install: + - npm install -g grunt-cli + - git clone git://github.com/n1k0/casperjs.git ~/casperjs + - cd ~/casperjs + - git checkout tags/1.0.2 + - export PATH=$PATH:`pwd`/bin + - cd - +before_script: + - phantomjs --version + - casperjs --version diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..b3fe6c29 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,46 @@ +module.exports = function(grunt) { + grunt.initConfig({ + jshint: { + options: { + jshintrc: '.jshintrc' + }, + files: [ + 'Gruntfile.js', + 'package.json', + // TODO(grosbouddha): change to js/**/*.js and fix the 10K jshint + // error messages or fine-tune .jshintrc file. + 'js/*.js' + ] + }, + connect: { + www: { + options: { + base: '.', + port: 4545 + } + } + }, + ghost: { + dist: { + filesSrc: ['tests/integration/casperjs/*_test.js'], + options: { + args: { + baseUrl: 'http://localhost:' + + '<%= connect.www.options.port %>/' + }, + direct: false, + logLevel: 'error', + printCommand: false, + printFilePaths: true + } + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-connect'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-ghost'); + + grunt.registerTask('test', ['jshint', 'connect', 'ghost']); + +}; diff --git a/Makefile b/Makefile deleted file mode 100644 index fd40ada0..00000000 --- a/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -test: - jshint js/*.js \ No newline at end of file diff --git a/mongoose-3.7.exe b/mongoose-3.7.exe new file mode 100644 index 00000000..6d945d6a Binary files /dev/null and b/mongoose-3.7.exe differ diff --git a/package.json b/package.json index 3de5a1df..423bd727 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,20 @@ -{ - "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" + }, + "devDependencies": { + "grunt": "0.4.1", + "grunt-contrib-connect": "0.3.0", + "grunt-contrib-jshint": "0.5.4", + "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..671def22 --- /dev/null +++ b/tests/integration/casperjs/smoke_test.js @@ -0,0 +1,8 @@ +casper +.start(casper.cli.get('baseUrl')) +.then(function () { + this.test.assertExists('#drawing-canvas-container canvas', 'Check if drawing canvas element is created'); +}) +.run(function () { + this.test.done(); +}); \ No newline at end of file