Skip to content

Commit

Permalink
sync with WoC repo
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Jul 31, 2018
1 parent a5f9f24 commit b54fde1
Show file tree
Hide file tree
Showing 118 changed files with 52,962 additions and 5,324 deletions.
94 changes: 94 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
'use strict';

module.exports = function(grunt) {

//Load NPM tasks
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-nodemon');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-env');
grunt.loadNpmTasks('grunt-markdown');

// Project Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch: {
readme: {
files: ['README.md'],
tasks: ['markdown']
},
js: {
files: ['Gruntfile.js', 'insight.js', 'app/**/*.js'],
options: {
livereload: true,
},
},
test: {
files: ['test/**/*.js', 'test/*.js','app/**/*.js'],
tasks: ['test'],
}
},
jshint: {
all: {
src: ['Gruntfile.js', 'insight.js', 'app/**/*.js', 'lib/*.js', 'config/*.js'],
options: {
jshintrc: true
}
}
},
mochaTest: {
options: {
reporter: 'spec',
},
src: ['test/**/*.js'],
},
nodemon: {
dev: {
script: 'insight.js',
options: {
args: [],
ignore: ['test/**/*', 'util/**/*', 'dev-util/**/*'],
// nodeArgs: ['--debug'],
delayTime: 1,
env: {
PORT: 3000
},
cwd: __dirname
}
}
},
concurrent: {
tasks: ['nodemon', 'watch'],
options: {
logConcurrentOutput: true
}
},
env: {
test: {
NODE_ENV: 'test'
}
},
markdown: {
all: {
files: [
{
expand: true,
src: 'README.md',
dest: '.',
ext: '.html'
}
]
}
}
});

//Making grunt default to force in order not to break the project.
grunt.option('force', true);

//Default task(s).
grunt.registerTask('default', ['concurrent']);

//Test task.
grunt.registerTask('test', ['env:test', 'mochaTest']);
};
Loading

0 comments on commit b54fde1

Please sign in to comment.