diff --git a/Gruntfile.coffee b/Gruntfile.coffee new file mode 100644 index 0000000..c939de9 --- /dev/null +++ b/Gruntfile.coffee @@ -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' ] diff --git a/Makefile b/Makefile index cecc5e6..4819b72 100644 --- a/Makefile +++ b/Makefile @@ -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/ diff --git a/package.json b/package.json index 2fd2a82..8a9df9e 100644 --- a/package.json +++ b/package.json @@ -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" },