Browse Source

Introduce grunt

pull/2/head
Yoshiya Hinosawa 11 years ago
parent
commit
fc8ae69ab1
  1. 2
      .gitignore
  2. 4
      .travis.yml
  3. 23
      Gruntfile.coffee
  4. 27
      package.json
  5. 20
      spec/c3-spec.js

2
.gitignore vendored

@ -0,0 +1,2 @@
# npm modules
node_modules

4
.travis.yml

@ -0,0 +1,4 @@
language: node_js
before_script:
- npm install -g grunt-cli

23
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']

27
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"
}
}

20
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
});
Loading…
Cancel
Save