Assemble only rebuilds new files now.

If you edit a single file and run, only this single file will be assembled
This commit is contained in:
rogeralsing 2015-04-08 20:20:06 +02:00
Родитель 8727a2fe22
Коммит 788b0b3274
3 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -20,7 +20,7 @@ module.exports = function(grunt) {
'watch': {
css: {
files: 'src/**/*.*',
tasks: ['sync','assemble'],
tasks: ['sync','newer:assemble'],
options: {
livereload: true,
},
@ -91,11 +91,12 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-livereload');
grunt.loadNpmTasks('grunt-git');
grunt.loadNpmTasks('assemble');
grunt.loadNpmTasks('grunt-newer');
grunt.registerTask('default', [
'clean', // clean out any deleted files
'sync', // copy documentation to src, copy resources from src to output
'assemble', // build pages
'newer:assemble', // build pages
'open',
'http-server', // start server
'watch'

Просмотреть файл

@ -4,7 +4,7 @@ module.exports.register = function (Handlebars, x) {
Handlebars.registerHelper('gfm', function (options) {
var marked = require('./marked-config');
return new Handlebars.SafeString(
'<div class="mybold">'
'<div>'
+ marked(options.fn(this))
+ '</div>');
});

Просмотреть файл

@ -11,10 +11,11 @@
"grunt-contrib-copy": "^0.7.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-git": "^0.3.4",
"grunt-open": "^0.2.3",
"grunt-text-replace": "^0.4.0",
"grunt-http-server": "^1.2.0",
"grunt-livereload": "^0.1.3",
"grunt-newer": "^1.1.0",
"grunt-open": "^0.2.3",
"grunt-text-replace": "^0.4.0",
"http-server": "^0.8.0"
}
}