Skip to content

Commit 9eb2454

Browse files
committed
Merge pull request slackapi#6 from slackhq/coffee-js
Compile coffeescript to javascript for npm
2 parents 605768b + 6dbc77a commit 9eb2454

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
*.js

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.coffee

Gruntfile.coffee

Lines changed: 17 additions & 1 deletion
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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "slack-client",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
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)