diff --git a/.gitignore b/.gitignore index b512c09..0db216b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -node_modules \ No newline at end of file +npm-debug.log +node_modules diff --git a/.travis.yml b/.travis.yml index 9ec7112..244b7e8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,3 @@ language: node_js node_js: - '0.10' -before_script: - - npm install -g grunt-cli diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 5119e61..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,53 +0,0 @@ -'use strict'; - -module.exports = function (grunt) { - - grunt.initConfig({ - mochacli: { - options: { - ui: 'bdd', - reporter: 'spec', - require: [ 'espower_loader_helper.js' ] - }, - all: ['test/*Test.js'] - }, - jshint: { - options: { - jshintrc: '.jshintrc' - }, - gruntfile: { - src: 'Gruntfile.js' - }, - lib: { - src: ['lib/**/*.js'] - }, - test: { - src: ['test/**/*.js'] - } - }, - watch: { - gruntfile: { - files: '<%= jshint.gruntfile.src %>', - tasks: ['jshint:gruntfile'] - }, - lib: { - files: '<%= jshint.lib.src %>', - tasks: ['jshint:lib', 'test'] - }, - test: { - files: '<%= jshint.test.src %>', - tasks: ['test'] - } - } - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-mocha-cli'); - - grunt.registerTask('test', ['mochacli']); - - // Default task. - grunt.registerTask('default', ['test']); - -}; diff --git a/README.md b/README.md index 49c7a67..9e4566b 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,6 @@ $ git clone https://github.com/tddbc/javascript-mocha.git ``` -* 次に、[Grunt](http://gruntjs.com/)をインストールしてください。 - -```sh -$ npm install -g grunt-cli -``` - * 次に、依存関係をダウンロードしてください。 ```sh @@ -31,21 +25,27 @@ $ npm install * 最後に、下記の様に表示されるか、確認してください。 ```sh -$ grunt test -Running "mochacli:all" (mochacli) task +$ npm test + +> javascript-mocha@0.1.0 test /path/to/projects/javascript-mocha +> npm run lint && mocha --require intelli-espower-loader + + +> javascript-mocha@0.1.0 lint /path/to/projects/javascript-mocha +> jshint lib test + Sample .status - ✓ は、trueであるべき + ✓ は、trueであるべき #say() - ✓ は、'Hello TDDBC!'が返ってくるべき - + ✓ は、'Hello TDDBC!'が返ってくるべき - 2 passing (8ms) + 2 passing (5ms) -Done, without errors. +$ ``` ## License diff --git a/espower_loader_helper.js b/espower_loader_helper.js deleted file mode 100644 index 6ef416a..0000000 --- a/espower_loader_helper.js +++ /dev/null @@ -1,4 +0,0 @@ -require('espower-loader')({ - cwd: process.cwd(), - pattern: 'test/**/*Test.js' -}); \ No newline at end of file diff --git a/package.json b/package.json index b2d5e40..fc2b517 100644 --- a/package.json +++ b/package.json @@ -1,41 +1,42 @@ { - "name": "javascript-mocha", - "description": "skeleton for Node.js users.", - "version": "0.1.0", - "homepage": "https://github.com/tddbc/javascript-mocha", - "author": { - "name": "TDD BaseCamp and other contributors" - }, - "repository": { - "type": "git", - "url": "git://github.com/tddbc/javascript-mocha.git" - }, - "bugs": { - "url": "https://github.com/tddbc/javascript-mocha/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tddbc/javascript-mocha/blob/master/LICENSE-MIT" - } - ], - "main": "lib/sample.js", - "engines": { - "node": ">= 0.10.0" - }, - "scripts": { - "test": "grunt test" - }, - "devDependencies": { - "grunt": "~0.4.2", - "grunt-contrib-jshint": "~0.10.0", - "grunt-contrib-watch": "~0.6.1", - "grunt-contrib-clean": "~0.5.0", - "grunt-mocha-cli": "~1.8.0", - "power-assert": "~0.7.2", - "espower-loader": "~0.7.0" - }, - "keywords": [ - "TDDBC" - ] + "name": "javascript-mocha", + "description": "skeleton for Node.js users.", + "version": "0.1.0", + "author": { + "name": "TDD BaseCamp and other contributors" + }, + "bugs": { + "url": "https://github.com/tddbc/javascript-mocha/issues" + }, + "devDependencies": { + "espower-loader": "^0.10.0", + "intelli-espower-loader": "^0.5.0", + "jshint": "^2.5.10", + "mocha": "^2.0.1", + "power-assert": "^0.10.0" + }, + "directories": { + "test": "test" + }, + "engines": { + "node": ">= 0.10.0" + }, + "homepage": "https://github.com/tddbc/javascript-mocha", + "keywords": [ + "TDDBC" + ], + "license": { + "type": "MIT", + "url": "https://github.com/tddbc/javascript-mocha/blob/master/LICENSE-MIT" + }, + "main": "lib/sample.js", + "repository": { + "type": "git", + "url": "git://github.com/tddbc/javascript-mocha.git" + }, + "scripts": { + "lint": "jshint lib test", + "test": "npm run lint && mocha --require intelli-espower-loader", + "watch": "mocha --require intelli-espower-loader --watch" + } }