aboutsummaryrefslogtreecommitdiff
path: root/guidelines/wikipedia/Gruntfile.js
diff options
context:
space:
mode:
Diffstat (limited to 'guidelines/wikipedia/Gruntfile.js')
-rw-r--r--guidelines/wikipedia/Gruntfile.js67
1 files changed, 67 insertions, 0 deletions
diff --git a/guidelines/wikipedia/Gruntfile.js b/guidelines/wikipedia/Gruntfile.js
new file mode 100644
index 0000000..69f1954
--- /dev/null
+++ b/guidelines/wikipedia/Gruntfile.js
@@ -0,0 +1,67 @@
+/*global module:false*/
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ // Metadata.
+ pkg: grunt.file.readJSON('package.json'),
+ jshint: {
+ gruntfile: {
+ jshintrc: true,
+ src: 'Gruntfile.js'
+ },
+ src_specs: {
+ jshintrc: true,
+ src: ['src/**/*.js', 'test/**/*.js']
+ }
+ },
+ jasmine: {
+ guidelines: {
+ src: 'src/**/*.js',
+ options: {
+ vendor: [
+ '../../src/js/lib/underscore.js',
+ '../../src/js/lib/jquery/jquery-1.8.3.js',
+ '../../src/js/lib/md5.js',
+ '../../src/js/fiveui/injected/prelude.js',
+ '../../src/js/lib/injected/jquery-plugins.js',
+ '../../src/js/lib/injected/compute.js'
+ ],
+ helpers: ['specs/exports.js', 'specs/*_helper.js'],
+ specs: 'specs/*_spec.js',
+ host: 'http://localhost:<%= connect.server.options.port %>/guidelines/wikipedia'
+ }
+ }
+ },
+ connect: {
+ server: {
+ options: {
+ port: 9867,
+ base: '../..'
+ }
+ }
+ },
+ watch: {
+ gruntfile: {
+ files: '<%= jshint.gruntfile.src %>',
+ tasks: ['jshint:gruntfile']
+ },
+ src_specs: {
+ files: '<%= jshint.src_specs.src %>',
+ tasks: ['jshint:src_specs', 'test']
+ }
+ }
+ });
+
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-connect');
+ grunt.loadNpmTasks('grunt-contrib-jasmine');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+
+ // Default task.
+ grunt.registerTask('default', ['jshint', 'test']);
+
+ grunt.registerTask('test', ['connect:server', 'jasmine:guidelines']);
+
+};