watch with live reload
This commit is contained in:
parent
e6a8f85803
commit
ec99547712
|
@ -65,11 +65,22 @@ module.exports = (grunt) ->
|
|||
'public/css/app.min.css': 'public/css/app.css'
|
||||
'public/css/app.bundle.min.css': 'public/css/app.bundle.css'
|
||||
|
||||
watch:
|
||||
scripts:
|
||||
files: "src/**/*.*"
|
||||
tasks: [ "default" ]
|
||||
options:
|
||||
interrupt: true # interrupt build when a file has changed?
|
||||
debounceDelay: 250 # delay a bit
|
||||
livereload: true
|
||||
|
||||
|
||||
grunt.loadNpmTasks('grunt-apps-c')
|
||||
grunt.loadNpmTasks('grunt-contrib-stylus')
|
||||
grunt.loadNpmTasks('grunt-contrib-concat')
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify')
|
||||
grunt.loadNpmTasks('grunt-contrib-cssmin')
|
||||
grunt.loadNpmTasks('grunt-contrib-watch')
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'apps_c'
|
||||
|
|
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ build:
|
|||
grunt
|
||||
|
||||
watch:
|
||||
watch --color -n 1 make build
|
||||
grunt watch
|
||||
|
||||
serve:
|
||||
cd public; python -m SimpleHTTPServer 8000
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
"grunt-contrib-stylus": "~0.9.0",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-contrib-uglify": "~0.2.5",
|
||||
"grunt-contrib-cssmin": "~0.6.2"
|
||||
"grunt-contrib-cssmin": "~0.6.2",
|
||||
"grunt-contrib-watch": "~0.6.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/radekstepan/burnchart.io.git"
|
||||
},
|
||||
"author": "Radek <dev@radekstepan.com>"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
<link rel="stylesheet" type="text/css" href="css/app.bundle.css">
|
||||
|
||||
<script src="js/app.bundle.js"></script>
|
||||
<script src="http://0.0.0.0:35729/livereload.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
|
|
@ -8,7 +8,7 @@ module.exports = new Model
|
|||
'items': []
|
||||
|
||||
init: ->
|
||||
# Initialize with items if stored locally.
|
||||
# Initialize with items stored locally.
|
||||
localforage.getItem 'projects', (items=[]) =>
|
||||
@set 'items', items
|
||||
|
||||
|
|
Loading…
Reference in New Issue