Skip to content

Instantly share code, notes, and snippets.

@astronaughts
Created March 10, 2013 04:35
Show Gist options
  • Save astronaughts/5127134 to your computer and use it in GitHub Desktop.
Save astronaughts/5127134 to your computer and use it in GitHub Desktop.
Titanium mobile で grunt watch で CoffeeScript をコンパイルする CoffeeScript >> TI_PROJECT/src/**/*.coffee JavaScript >> TI_PROJECT/Resources/**/*.coffee
module.exports = function(grunt) {
grunt.config.init({
pkg: grunt.file.readJSON('package.json'),
watch: {
scripts: {
files: ['src/**/*.coffee'],
tasks: ['coffee'],
options: {
interrupt: true
}
}
},
coffee: {
compile: {
expand: true,
cwd: 'src/',
src: ['**/*.coffee'],
dest: 'Resources/',
ext: '.js'
}
},
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.registerTask('default', ['coffee']);
};
{
"name": "titanium_project",
"version": "0.0.0",
"description": "aaa",
"main": "index.js",
"devDependencies": {
"grunt": "0.4.0",
"grunt-contrib-watch": "*",
"grunt-contrib-coffee": "*"
},
"author": "astronaughts",
"license": "BSD",
"readmeFilename": "README.md"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment