1 | {execSync} = require 'child_process'
|
2 |
|
3 | module.exports = (grunt) ->
|
4 |
|
5 | grunt.initConfig
|
6 | coffee:
|
7 | compile:
|
8 | expand: true
|
9 | cwd: './src/'
|
10 | src: ['**/*.coffee']
|
11 | dest: './lib/'
|
12 | ext: '.js'
|
13 | clean:
|
14 | compiled:
|
15 | src: ["lib/**/*"]
|
16 | options:
|
17 | "no-write": false
|
18 |
|
19 | grunt.loadNpmTasks 'grunt-contrib-coffee'
|
20 | grunt.loadNpmTasks 'grunt-contrib-clean'
|
21 | grunt.registerTask 'default', ['clean:compiled', 'coffee']
|
22 | grunt.registerTask 'copyLibs', -> execSync "cp -r src/libs lib/"
|
23 | grunt.registerTask 'createExec', -> execSync "echo '#!/usr/bin/env node' | cat - lib/pry.js > lib/pry.bin.js && chmod +x lib/pry.bin.js"
|