Skip to content

Commit 7e88e65

Browse files
committed
Compile coffeescript to javascript for npm
1 parent 605768b commit 7e88e65

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
*.js

.npmignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.coffee

Gruntfile.coffee

+17-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ module.exports = (grunt) ->
22
grunt.loadNpmTasks 'grunt-release'
33
grunt.loadNpmTasks 'grunt-contrib-watch'
44
grunt.loadNpmTasks 'grunt-shell'
5+
grunt.loadNpmTasks 'grunt-contrib-coffee'
56

67
grunt.initConfig
78
watch:
@@ -17,4 +18,19 @@ module.exports = (grunt) ->
1718
command: 'npm test'
1819
options:
1920
stdout: true
20-
stderr: true
21+
stderr: true
22+
23+
coffee:
24+
options:
25+
bare: true
26+
index:
27+
files:
28+
'index.js': 'index.coffee'
29+
classes:
30+
expand: true
31+
cwd: 'src'
32+
src: ['*.coffee']
33+
dest: 'src'
34+
ext: '.js'
35+
36+
grunt.registerTask 'prepublish', ['coffee']

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "A library for creating a full Slack client",
55
"main": "./index",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"prepublish": "grunt prepublish"
89
},
910
"keywords": [
1011
"slack"
@@ -29,9 +30,10 @@
2930
"log": "1.4.0"
3031
},
3132
"devDependencies": {
32-
"grunt": "~0.4.1",
33-
"grunt-release": "~0.6.0",
33+
"grunt": "^0.4.5",
34+
"grunt-contrib-coffee": "^0.12.0",
3435
"grunt-contrib-watch": "~0.5.3",
36+
"grunt-release": "~0.6.0",
3537
"grunt-shell": "~0.5.0"
3638
},
3739
"engines": {

0 commit comments

Comments
 (0)