Skip to content

Instantly share code, notes, and snippets.

@adamwdraper
Created August 19, 2014 18:24
Show Gist options
  • Save adamwdraper/4a0c7a28986aeba402a0 to your computer and use it in GitHub Desktop.
Save adamwdraper/4a0c7a28986aeba402a0 to your computer and use it in GitHub Desktop.
Framer Grunt Server
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
open : {
server : {
path: 'http://localhost:5000'
}
},
watch: {
appFiles: {
files: [
'app.js',
'index.html',
'imported/**/*.png',
'images/**/*.png'
],
options: {
livereload: true
}
}
},
connect: {
server: {
options: {
livereload: true,
port: 5000,
hostname: '*'
}
}
}
});
grunt.registerTask('default', [
'server'
]);
grunt.registerTask('server', 'Starts server.', [
'connect:server',
'open',
'watch'
]);
};
{
"name": "project",
"version": "0.0.1",
"homepage": "http://project.com",
"description": "project",
"main": "server.js",
"repository": {},
"dependencies": {},
"devDependencies": {
"grunt": "*",
"grunt-contrib-watch": "^0.6.1",
"grunt-contrib-connect": "~0.6.0",
"grunt-open": "*",
"load-grunt-tasks": "^0.6.0"
},
"scripts": {
"start": "node server.js"
},
"author": {},
"license": "BSD"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment