Use Grunt instead of Docpad

This commit is contained in:
Vit Brunner
2014-10-23 09:07:09 +02:00
parent b71eb4efb7
commit fbcf25d4d9
3 changed files with 76 additions and 10 deletions
+65
View File
@@ -0,0 +1,65 @@
module.exports = (grunt) ->
grunt.initConfig {
pkg: grunt.file.readJSON 'package.json'
var: {
source: 'source/documents'
destination: 'build'
}
connect: {
server: {
options: {
base: '<%= var.destination %>'
keepalive: true
}
}
}
copy: {
main: {
expand: true
cwd: '<%= var.source %>'
src: 'tests/the_raven/*'
dest: '<%= var.destination %>'
}
}
coffee: {
main: {
expand: true
cwd: '<%= var.source %>'
src: '**/*.coffee'
dest: '<%= var.destination %>'
ext: '.js'
}
}
stylus: {
main: {
expand: true
cwd: '<%= var.source %>'
src: '**/*.styl'
dest: '<%= var.destination %>'
ext: '.css'
}
}
jade: {
main: {
expand: true
cwd: '<%= var.source %>'
src: '**/*.jade'
dest: '<%= var.destination %>'
ext: '.html'
}
}
}
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.registerTask 'default', [ 'copy', 'coffee', 'stylus', 'jade' ]
+3 -3
View File
@@ -1,12 +1,12 @@
default:
npm install
node_modules/.bin/docpad generate
node_modules/.bin/grunt
run:
node_modules/.bin/docpad run
node_modules/.bin/grunt connect
test:
node_modules/.bin/phantomjs node_modules/qunitjs/addons/phantomjs/runner.js http://0.0.0.0:9778/tests.html
node_modules/.bin/phantomjs node_modules/qunitjs/addons/phantomjs/runner.js http://0.0.0.0:8000/tests.html
clean:
rm -rf node_modules/ build/
+8 -7
View File
@@ -3,14 +3,15 @@
"version": "0.0.1",
"author": "Vit Brunner",
"description": "Visual comparison of different translations of itemized texts; e.g. poems, bibles, etc.",
"dependencies": {
"bower": "1.3.x"
},
"devDependencies": {
"docpad": "6.69.x",
"docpad-plugin-coffeescript": "2.4.x",
"docpad-plugin-stylus": "2.7.x",
"docpad-plugin-jade": "2.7.x",
"bower": "1.3.x",
"grunt": "0.4.x",
"grunt-cli": "0.1.x",
"grunt-contrib-connect": "0.8.x",
"grunt-contrib-copy": "0.7.x",
"grunt-contrib-coffee": "0.12.x",
"grunt-contrib-stylus": "0.20.x",
"grunt-contrib-jade": "0.13.x",
"qunitjs": "1.13.x",
"phantomjs": "1.9.x"
},