Skip to content

Instantly share code, notes, and snippets.

@jmwhittaker
Created February 11, 2014 10:44
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jmwhittaker/8932690 to your computer and use it in GitHub Desktop.
Save jmwhittaker/8932690 to your computer and use it in GitHub Desktop.
Simple grunt script for working with Framer.js locally.
module.exports = function (grunt) {
"use strict";
// Config...
grunt.initConfig({
watch: {
options: {
livereload: true
},
html: {
files: ['index.html', 'images/**', 'framer/**', 'app.js']
}
},
// Run a connect server with livereload on http://0.0.0.0:4000
connect: {
server: {
options: {
livereload: true,
port: 4000,
hostname: '*'
}
}
},
});
// Load tasks
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
// Register tasks
grunt.registerTask('server', ['connect:server', 'watch']);
// Default task when run from terminal $ grunt
grunt.registerTask('default', ['server']);
};
{
"engines": {
"node": ">= 0.10.0"
},
"name": "Prototyping",
"description": "Grunt script for Framer.js",
"version": "1.0.0",
"devDependencies": {
"grunt": "~0.4.2",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-connect": "~0.6.0"
}
}
@abhoopathy
Copy link

Terrific, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment