From fc8ae69ab14e6aabd3fb238051e0b858c1a5a70f Mon Sep 17 00:00:00 2001 From: Yoshiya Hinosawa Date: Thu, 14 Nov 2013 22:10:03 +0900 Subject: [PATCH] Introduce grunt --- .gitignore | 2 ++ .travis.yml | 4 ++++ Gruntfile.coffee | 23 +++++++++++++++++++++++ package.json | 27 +++++++++++++++++++++++++++ spec/c3-spec.js | 20 ++++++++++++++++++++ 5 files changed, 76 insertions(+) create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 Gruntfile.coffee create mode 100644 package.json create mode 100644 spec/c3-spec.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1b2ff06 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# npm modules +node_modules diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..376a857 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +language: node_js + +before_script: +- npm install -g grunt-cli diff --git a/Gruntfile.coffee b/Gruntfile.coffee new file mode 100644 index 0000000..23058cd --- /dev/null +++ b/Gruntfile.coffee @@ -0,0 +1,23 @@ + +module.exports = (grunt) -> + + grunt.initConfig + + jshint: + + c3: 'c3.js' + spec: 'spec/*.js' + options: + jshintrc: '.jshintrc' + + jasmine: + + c3: + src: 'c3.js' + options: + specs: 'spec/*.js' + + grunt.loadNpmTasks 'grunt-contrib-jshint' + grunt.loadNpmTasks 'grunt-contrib-jasmine' + + grunt.registerTask 'default', ['jshint', 'jasmine'] diff --git a/package.json b/package.json new file mode 100644 index 0000000..61899d5 --- /dev/null +++ b/package.json @@ -0,0 +1,27 @@ +{ + "name": "c3", + "version": "0.1.0", + "description": "D3-based reusable chart library", + "main": "c3.js", + "scripts": { + "test": "grunt" + }, + "repository": { + "type": "git", + "url": "git://github.com/masayuki0812/c3.git" + }, + "keywords": [ + "d3", + "chart", + "graph" + ], + "author": "Masayuki Tanaka", + "license": "MIT", + "gitHead": "84e03109d9a590f9c8ef687c03d751f666080c6f", + "readmeFilename": "README.md", + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-jshint": "~0.7.1", + "grunt-contrib-jasmine": "~0.5.2" + } +} diff --git a/spec/c3-spec.js b/spec/c3-spec.js new file mode 100644 index 0000000..49735c2 --- /dev/null +++ b/spec/c3-spec.js @@ -0,0 +1,20 @@ + +var describe = window.describe; +var expect = window.expect; +var it = window.it; + +var c3 = window.c3; + +describe('c3', function () { + 'use strict'; + + it('exists', function () { + + expect(c3).not.toBe(null); + expect(typeof c3).toBe('object'); + + }); + + // ...write other tests here + +});