Skip to content

Instantly share code, notes, and snippets.

@mouseroot
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mouseroot/af70cbc81dc2f0c0e6a0 to your computer and use it in GitHub Desktop.
Save mouseroot/af70cbc81dc2f0c0e6a0 to your computer and use it in GitHub Desktop.
Coffeescript grunt file + index test page
var sourceFiles = [
];
module.exports = function(grunt) {
grunt.initConfig({
coffee: {
compileJoined: {
options: { join: true},
files: {"build/build.js" : sourceFiles}
}
},
uglify: {
my_target: {
files: { "build/build.min.js" : "build/build.js" }
}
}
});
grunt.loadNpmTasks("grunt-contrib-coffee");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.registerTask("compile","Just compiles and joins the coffee files",["coffee"]);
grunt.registerTask("build","Compiles and minifies the coffee files",["coffee","uglify"]);
};
<!DOCTYPE html>
<head>
<title>Coffeescript Application Testpage</title>
</head>
<body>
<script src="build/build.js"></script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment