Skip to content

Commit

Permalink
updated dev env
Browse files Browse the repository at this point in the history
closes #2
  • Loading branch information
M. Peter committed Jul 15, 2016
1 parent b93bffb commit 539764d
Show file tree
Hide file tree
Showing 30 changed files with 135 additions and 5,570 deletions.
52 changes: 12 additions & 40 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,12 @@ module.exports = (grunt) ->
# Project configuration.
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
regarde:
watch:
module:
files: ["_src/**/*.coffee"]
tasks: [ "coffee:changed" ]
tasks: [ "coffee:base" ]

coffee:
changed:
expand: true
cwd: '_src'
src: [ '<% print( _.first( ((typeof grunt !== "undefined" && grunt !== null ? (_ref = grunt.regarde) != null ? _ref.changed : void 0 : void 0) || ["_src/nothing"]) ).slice( "_src/".length ) ) %>' ]
# template to cut off `_src/` and throw on error on non-regrade call
# CF: `_.first( grunt?.regarde?.changed or [ "_src/nothing" ] ).slice( "_src/".length )
dest: ''
ext: '.js'

base:
expand: true
cwd: '_src',
Expand Down Expand Up @@ -63,7 +54,8 @@ module.exports = (grunt) ->
options:
require: [ "should" ]
reporter: "spec"
bail: false
bail: process.env.BAIL or false
grep: process.env.GREP
timeout: 3000
slow: 3

Expand All @@ -72,45 +64,25 @@ module.exports = (grunt) ->
options:
env:
#NSQERR: true
severity_nsq_logger: "error"


docker:
serverdocs:
expand: true
src: ["_src/**/*.coffee", "README.md"]
dest: "_docs/"
options:
onlyUpdated: false
colourScheme: "autumn"
ignoreHidden: false
sidebarState: true
exclude: false
lineNums: true
js: []
css: []
extras: []

severity_nsq_logger: process.env.SEVERITY or "error"

# Load npm modules
grunt.loadNpmTasks "grunt-regarde"
grunt.loadNpmTasks "grunt-contrib-watch"
grunt.loadNpmTasks "grunt-contrib-coffee"
grunt.loadNpmTasks "grunt-contrib-clean"
grunt.loadNpmTasks "grunt-mocha-cli"
grunt.loadNpmTasks "grunt-include-replace"
grunt.loadNpmTasks "grunt-docker"
grunt.loadNpmTasks "grunt-banner"

# just a hack until this issue has been fixed: https://github.com/yeoman/grunt-regarde/issues/3
grunt.option('force', not grunt.option('force'))

# ALIAS TASKS
grunt.registerTask "watch", "regarde"
grunt.registerTask "default", "build"
grunt.registerTask "docs", "docker"
grunt.registerTask "clear", [ "clean:base" ]
grunt.registerTask "clear", [ "clean:base", "clean:nsq" ]
grunt.registerTask "test", [ "mochacli:main", "clean:nsq" ]

grunt.registerTask "w", "watch"
grunt.registerTask "b", "build"
grunt.registerTask "t", "test"

# build the project
grunt.registerTask "build", [ "clear", "coffee:base", "includereplace", "usebanner:js" ]
grunt.registerTask "build-dev", [ "clear", "coffee:base", "docs", "test" ]
grunt.registerTask "build-dev", [ "clear", "coffee:base", "test" ]
Loading

0 comments on commit 539764d

Please sign in to comment.