mirror of
https://github.com/morrisjs/morris.js.git
synced 2024-11-10 21:36:34 +01:00
Merge branch 'grunt_update' of https://github.com/sudodoki/morris.js into sudodoki-grunt_update
This commit is contained in:
commit
e19d676bc4
@ -2,5 +2,5 @@ language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
before_script:
|
||||
- "npm install -g grunt"
|
||||
- "npm install -g grunt-cli"
|
||||
- "npm install"
|
||||
|
64
Gruntfile.js
Normal file
64
Gruntfile.js
Normal file
@ -0,0 +1,64 @@
|
||||
module.exports = function (grunt) {
|
||||
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
|
||||
|
||||
grunt.initConfig({
|
||||
coffee: {
|
||||
lib: {
|
||||
options: { bare: false },
|
||||
files: {
|
||||
'morris.js': ['build/morris.coffee']
|
||||
}
|
||||
},
|
||||
spec: {
|
||||
options: { bare: true },
|
||||
files: {
|
||||
'build/spec.js': ['build/spec.coffee']
|
||||
}
|
||||
},
|
||||
},
|
||||
concat: {
|
||||
'build/morris.coffee': [
|
||||
'lib/morris.coffee',
|
||||
'lib/morris.grid.coffee',
|
||||
'lib/morris.hover.coffee',
|
||||
'lib/morris.line.coffee',
|
||||
'lib/morris.area.coffee',
|
||||
'lib/morris.bar.coffee',
|
||||
'lib/morris.donut.coffee'
|
||||
],
|
||||
'build/spec.coffee': ['spec/support/**/*.coffee', 'spec/lib/**/*.coffee']
|
||||
},
|
||||
less: {
|
||||
all: {
|
||||
src: 'less/*.less',
|
||||
dest: 'morris.css',
|
||||
options: {
|
||||
compress: true
|
||||
}
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
build: {
|
||||
files: {
|
||||
'morris.min.js': 'morris.js'
|
||||
}
|
||||
}
|
||||
},
|
||||
mocha: {
|
||||
index: ['spec/specs.html'],
|
||||
options: {run: true}
|
||||
},
|
||||
watch: {
|
||||
all: {
|
||||
files: ['lib/**/*.coffee', 'spec/lib/**/*.coffee', 'spec/support/**/*.coffee', 'less/**/*.less'],
|
||||
tasks: 'default'
|
||||
},
|
||||
dev: {
|
||||
files: 'lib/*.coffee' ,
|
||||
tasks: ['concat:build/morris.coffee', 'coffee:lib']
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
grunt.registerTask('default', ['concat', 'coffee', 'less', 'uglify', 'mocha']);
|
||||
};
|
56
grunt.js
56
grunt.js
@ -1,56 +0,0 @@
|
||||
module.exports = function (grunt) {
|
||||
grunt.initConfig({
|
||||
coffee: {
|
||||
lib: {
|
||||
src: ['build/morris.coffee'],
|
||||
dest: '.',
|
||||
options: { bare: false }
|
||||
},
|
||||
spec: {
|
||||
src: ['build/spec.coffee'],
|
||||
dest: 'build',
|
||||
options: { bare: true }
|
||||
}
|
||||
},
|
||||
concat: {
|
||||
'build/morris.coffee': [
|
||||
'lib/morris.coffee',
|
||||
'lib/morris.grid.coffee',
|
||||
'lib/morris.hover.coffee',
|
||||
'lib/morris.line.coffee',
|
||||
'lib/morris.area.coffee',
|
||||
'lib/morris.bar.coffee',
|
||||
'lib/morris.donut.coffee'
|
||||
],
|
||||
'build/spec.coffee': ['spec/support/**/*.coffee', 'spec/lib/**/*.coffee']
|
||||
},
|
||||
less: {
|
||||
all: {
|
||||
src: 'less/*.less',
|
||||
dest: 'morris.css',
|
||||
options: {
|
||||
compress: true
|
||||
}
|
||||
}
|
||||
},
|
||||
min: {
|
||||
'morris.min.js': 'morris.js'
|
||||
},
|
||||
mocha: {
|
||||
spec: {
|
||||
src: 'spec/specs.html',
|
||||
run: true
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
files: ['lib/**/*.coffee', 'spec/lib/**/*.coffee', 'spec/support/**/*.coffee', 'less/**/*.less'],
|
||||
tasks: 'default'
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-coffee');
|
||||
grunt.loadNpmTasks('grunt-mocha');
|
||||
grunt.loadNpmTasks('grunt-contrib-less');
|
||||
|
||||
grunt.registerTask('default', 'concat coffee less min mocha');
|
||||
};
|
17
package.json
17
package.json
@ -15,12 +15,19 @@
|
||||
"url": "https://github.com/oesmith/morris.js/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt-coffee": "~> 0.0.6",
|
||||
"grunt-mocha": "~> 0.1.7",
|
||||
"grunt-contrib-less": "~> 0.3.2",
|
||||
"grunt": "~> 0.3.17"
|
||||
"matchdep": "~0.1.2",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-mocha": "~0.4.1",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-coffee": "~0.7.0",
|
||||
"grunt-contrib-uglify": "~0.2.4",
|
||||
"grunt-contrib-less": "~0.7.0",
|
||||
"grunt-contrib-watch": "~0.5.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "./node_modules/.bin/grunt coffee mocha"
|
||||
"test": "grunt coffee mocha"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.8 <0.11"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user