Skip to content

Commit

Permalink
add grunt and split opentok.coffee into multiple files for easier man…
Browse files Browse the repository at this point in the history
…agement
  • Loading branch information
Song Zheng committed May 23, 2014
1 parent 3384b7f commit 4f2a456
Show file tree
Hide file tree
Showing 15 changed files with 1,539 additions and 1,458 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
*.DS_Store
*.swp
*/node_modules
node_modules
43 changes: 43 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
watch:{
scripts: {
files:['**/*.coffee'],
tasks:["coffee", "uglify"],
options:{
spawn: true,
}
},
},
coffee: {
compileBare:{
options:{
bare: true
},
files: {
"./www/opentok.js" : "./src/js/*.coffee"
}
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
build: {
src: 'www/opentok.js',
dest: 'www/opentok.min.js'
}
}
});

// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-watch');

// Default task(s).
grunt.registerTask('default', ["coffee"]);
};
12 changes: 12 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "Cordova-Plugin-OpenTok",
"version": "2.2.0",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-coffee": "^0.10.1",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-nodeunit": "~0.3.3",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "^0.6.1"
}
}
Binary file removed scripts/.DS_Store
Binary file not shown.
Loading

0 comments on commit 4f2a456

Please sign in to comment.