generator-jekyllrb
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -148,3 +148,3 @@ 'use strict'; | ||
description: 'Use Autoprefixer?', | ||
default: 'y/N', | ||
default: 'Y/n', | ||
pattern: promptHelp.boolValid, | ||
@@ -169,3 +169,3 @@ message: promptHelp.message.bool | ||
this.jsPre = (/n/i).test(props.jsPre) ? false : jsPreOptions[props.jsPre]; | ||
this.autoPre = !(/n/i).test(props.autoPre); | ||
this.autoPre = (/y/i).test(props.autoPre); | ||
@@ -375,4 +375,3 @@ cb(); | ||
description: 'Enable pagination?', | ||
default: 'Number of posts, or 0 for all', | ||
pattern: new RegExp('^[0-9]+$'), | ||
default: 'Number of posts, or \'all\'', | ||
message: 'Enter a number' | ||
@@ -390,3 +389,3 @@ }]; | ||
this.jekDescript = props.jekDescript; | ||
this.jekPage = props.jekPage > 0 ? props.jekPage : false; | ||
this.jekPage = typeof props.jekPage === 'number' ? props.jekPage : false; | ||
@@ -393,0 +392,0 @@ cb(); |
@@ -78,6 +78,7 @@ // Generated on <%= (new Date).toISOString().split('T')[0] %> using <%= pkg.name %> <%= pkg.version %>. Yo Jekyll! | ||
return [ | ||
lrSnippet, | ||
mountFolder(connect, '.tmp'), | ||
mountFolder(connect, '.jekyll'), | ||
mountFolder(connect, yeomanConfig.app)]; | ||
lrSnippet, | ||
mountFolder(connect, '.tmp'), | ||
mountFolder(connect, '.jekyll'), | ||
mountFolder(connect, yeomanConfig.app) | ||
]; | ||
} | ||
@@ -90,4 +91,5 @@ } | ||
return [ | ||
mountFolder(connect, '.tmp'), | ||
mountFolder(connect, 'test')]; | ||
mountFolder(connect, '.tmp'), | ||
mountFolder(connect, 'test') | ||
]; | ||
} | ||
@@ -100,3 +102,4 @@ } | ||
return [ | ||
mountFolder(connect, yeomanConfig.dist)]; | ||
mountFolder(connect, yeomanConfig.dist) | ||
]; | ||
} | ||
@@ -111,4 +114,3 @@ } | ||
}, | ||
// Running Jekyll also cleans all non-git files from its destination unless | ||
// they are specifically declared in _config.yml's `keep_files` | ||
// Running Jekyll also cleans all non-git files from the target directory | ||
clean: { | ||
@@ -121,3 +123,4 @@ dist: { | ||
'<%%= yeoman.dist %>/*', | ||
'!<%%= yeoman.dist %>/.git*'] | ||
'!<%%= yeoman.dist %>/.git*' | ||
] | ||
}] | ||
@@ -127,3 +130,3 @@ }, | ||
},<% if (cssPre === 'sass') { %> | ||
// Add the sass files you want to compile in this task. | ||
// Add Sass files you want to compile here | ||
// TODO: Revise to watch default directories when | ||
@@ -134,12 +137,7 @@ // https://github.com/gruntjs/grunt-contrib-sass/issues/40 is resolved. | ||
bundleExec: true, | ||
style: 'expanded', | ||
debugInfo: true, | ||
lineNumbers: true, | ||
debugInfo: false, | ||
lineNumbers: false, | ||
loadPath: 'app/bower_components' | ||
}, | ||
dist: { | ||
options: { | ||
debugInfo: false, | ||
lineNumbers: false | ||
}, | ||
files: { | ||
@@ -151,2 +149,6 @@ '.tmp/<%%= yeoman.css %>/main.css': '<%%= yeoman.app %>/<%%= yeoman.cssPre %>/main.scss', | ||
server: { | ||
options: { | ||
debugInfo: true, | ||
lineNumbers: true, | ||
}, | ||
files: { | ||
@@ -160,2 +162,3 @@ '.tmp/<%%= yeoman.css %>/main.css': '<%%= yeoman.app %>/<%%= yeoman.cssPre %>/main.scss', | ||
options: { | ||
// If you're using global Sass gems, require them here, e.g.: | ||
// require: ['singularity', 'jacket'], | ||
@@ -202,3 +205,3 @@ bundleExec: true, | ||
cwd: '.tmp/<%%= yeoman.css %>', | ||
src: ['**/*.css'], | ||
src: '**/*.css', | ||
dest: '.tmp/<%%= yeoman.css %>' | ||
@@ -264,4 +267,5 @@ }] | ||
'{.tmp,<%%= yeoman.app %>}/<%%= yeoman.js %>/**/*.js', | ||
'test/spec/**/*.js', | ||
'!<%%= yeoman.app %>/<%%= yeoman.js %>/vendor/**/*', | ||
'test/spec/**/*.js' | ||
'!<%%= yeoman.app %>/bower_components/**/*' | ||
], | ||
@@ -284,3 +288,3 @@ report: [ | ||
}, | ||
// Add files to be checked here | ||
// Add files to be tested here | ||
report: {<% if (!cssPre) { %> | ||
@@ -316,6 +320,2 @@ src: ['<%%= yeoman.app %>/<%%= yeoman.css %>/main.css']<% } %><% if (cssPre === 'compass' || cssPre === 'sass') { %> | ||
}, | ||
// Usemin runs concat, but this is left here if you need it | ||
/* concat: { | ||
dist: {} | ||
},*/ | ||
htmlmin: { | ||
@@ -338,16 +338,14 @@ dist: { | ||
}, | ||
// Usemin adds files to concat | ||
concat: {}, | ||
// Usemin adds files to uglify | ||
uglify: {}, | ||
// Usemin adds files to cssmin | ||
cssmin: { | ||
dist: { | ||
options: { | ||
// banner: '/* See more of my projects at github.com/<%= github %> */', | ||
report: 'gzip' | ||
} | ||
// Usemin adds files to cssmin | ||
// files: {} | ||
} | ||
}, | ||
uglify: { | ||
// Usemin adds files to uglify | ||
// files: {} | ||
}, | ||
imagemin: { | ||
@@ -361,3 +359,3 @@ dist: { | ||
cwd: '<%%= yeoman.dist %>', | ||
src: ['<%%= yeoman.img %>/**/*.{jpg,jpeg,png}', '*.png'], | ||
src: '**/*.{jpg,jpeg,png}', | ||
dest: '<%%= yeoman.dist %>' | ||
@@ -372,3 +370,3 @@ }] | ||
cwd: '<%%= yeoman.dist %>', | ||
src: '<%%= yeoman.img %>/**/*.svg', | ||
src: '**/*.svg', | ||
dest: '<%%= yeoman.dist %>' | ||
@@ -378,3 +376,2 @@ }] | ||
}, | ||
// TODO: Create more elegant bower_components workflow | ||
copy: { | ||
@@ -390,11 +387,11 @@ dist: { | ||
// If your site requires it, add other file type patterns here | ||
// e.g., Bower components that aren't in a usemin block: | ||
<% if (!h5bpJs) { %>// <% } %>'bower_components/jquery.min.js', | ||
// Copy moves asset files and directories | ||
'*.{ico,png}', | ||
'<%%= yeoman.fonts %>/**/*', | ||
'<%%= yeoman.js %>/**/*', | ||
'<%%= yeoman.css %>/**/*', | ||
'<%%= yeoman.img %>/**/*', | ||
// Move Bower assets to dist | ||
'bower_components/**/*.{css,js,gif,jpg,jpeg,png,svg,webp,eot*,ttf,woff}', | ||
// Reduce cruft by excluding tests | ||
'!bower_components/**/test/**/*', | ||
'!{.,_}*' | ||
], | ||
'<%%= yeoman.fonts %>/**/*' | ||
], | ||
dest: '<%%= yeoman.dist %>' | ||
@@ -421,3 +418,3 @@ }] | ||
}, | ||
// Copy bower_component assets in case we need them for concatination | ||
// Copy bower_components assets in case we need them for concatination | ||
stageComponents: { | ||
@@ -443,3 +440,4 @@ files: [{ | ||
'<%%= yeoman.dist %>/<%%= yeoman.img %>/**/*.{gif,jpg,jpeg,png,svg,webp}', | ||
'<%%= yeoman.dist %>/<%%= yeoman.fonts %>/**/*.{eot*,svg,ttf,woff}'] | ||
'<%%= yeoman.dist %>/<%%= yeoman.fonts %>/**/*.{eot*,svg,ttf,woff}' | ||
] | ||
} | ||
@@ -454,3 +452,4 @@ } | ||
'copy:stageCss', | ||
'jekyll:server'], | ||
'jekyll:server' | ||
], | ||
dist: [<% if (cssPre === 'sass') { %> | ||
@@ -460,6 +459,7 @@ 'sass:dist',<% } %><% if (cssPre === 'compass') { %> | ||
'coffee:dist',<% } %> | ||
'copy:dist', | ||
'copy:stageCss', | ||
'copy:stageJs', | ||
'copy:stageComponents', | ||
'copy:dist'] | ||
'copy:stageComponents' | ||
] | ||
} | ||
@@ -483,3 +483,4 @@ }); | ||
'open', | ||
'watch']); | ||
'watch' | ||
]); | ||
}); | ||
@@ -491,3 +492,4 @@ | ||
// 'concurrent:test', | ||
// 'connect:test']); | ||
// 'connect:test' | ||
// ]); | ||
@@ -506,3 +508,3 @@ grunt.registerTask('report', [ | ||
'clean:dist', | ||
// Jekyll cleans its destination before it compiles, so must run first | ||
// Jekyll cleans all non-git files from the target directory, so must run first | ||
'jekyll:dist', | ||
@@ -524,3 +526,4 @@ 'concurrent:dist',<% if (autoPre) { %> | ||
'report', | ||
'build']); | ||
'build' | ||
]); | ||
}; |
{ | ||
"name": "generator-jekyllrb", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "A Yeoman generator, workflow, and build system for the Jekyll static site generator. Yo, Jekyllrb!", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -86,2 +86,4 @@ # Generator-jekyllrb | ||
0.2.2, May 30, 2013: Gruntfile and Bower workflow refinement. | ||
0.2.1, May 30, 2013: Bugfixes. | ||
0.2.0, May 29, 2013: Add Autoprefixer, rewrite Grunt workflow, bugfixes. | ||
@@ -88,0 +90,0 @@ 0.1.3, May 29, 2013: Bugfixes. |
1043
96
68312