Remove zen-grid and styleguide.
This commit is contained in:
parent
a21a3765ac
commit
ccb8a2637a
1 changed files with 8 additions and 28546 deletions
77
gulpfile.js
77
gulpfile.js
|
|
@ -16,7 +16,6 @@ var options = {};
|
|||
// accordingly.
|
||||
options.rootPath = {
|
||||
project : __dirname + '/',
|
||||
styleGuide : __dirname + '/styleguide/',
|
||||
theme : __dirname + '/'
|
||||
};
|
||||
|
||||
|
|
@ -35,8 +34,7 @@ options.sass = {
|
|||
options.rootPath.project + 'node_modules/breakpoint-sass/stylesheets',
|
||||
options.rootPath.project + 'node_modules/chroma-sass/sass',
|
||||
options.rootPath.project + 'node_modules/support-for/sass',
|
||||
options.rootPath.project + 'node_modules/typey/stylesheets',
|
||||
options.rootPath.project + 'node_modules/zen-grids/sass'
|
||||
options.rootPath.project + 'node_modules/typey/stylesheets'
|
||||
],
|
||||
outputStyle: 'expanded'
|
||||
};
|
||||
|
|
@ -49,30 +47,6 @@ options.autoprefixer = {
|
|||
]
|
||||
};
|
||||
|
||||
// Define the style guide paths and options.
|
||||
options.styleGuide = {
|
||||
source: [
|
||||
options.theme.sass,
|
||||
options.theme.css + 'style-guide/'
|
||||
],
|
||||
destination: options.rootPath.styleGuide,
|
||||
|
||||
builder: 'builder/twig',
|
||||
|
||||
// The css and js paths are URLs, like '/misc/jquery.js'.
|
||||
// The following paths are relative to the generated style guide.
|
||||
css: [
|
||||
path.relative(options.rootPath.styleGuide, options.theme.css + 'styles.css'),
|
||||
path.relative(options.rootPath.styleGuide, options.theme.css + 'style-guide/chroma-kss-styles.css'),
|
||||
path.relative(options.rootPath.styleGuide, options.theme.css + 'style-guide/kss-only.css')
|
||||
],
|
||||
js: [
|
||||
],
|
||||
|
||||
homepage: 'homepage.md',
|
||||
title: 'Hugo Zen Style Guide'
|
||||
};
|
||||
|
||||
// Define the paths to the JS files to lint.
|
||||
options.eslint = {
|
||||
files : [
|
||||
|
|
@ -104,7 +78,7 @@ gulp.task('default', ['build']);
|
|||
// #################
|
||||
// Build everything.
|
||||
// #################
|
||||
gulp.task('build', ['styles:production', 'styleguide', 'lint']);
|
||||
gulp.task('build', ['styles:production', 'lint']);
|
||||
|
||||
// ##########
|
||||
// Build CSS.
|
||||
|
|
@ -112,9 +86,7 @@ gulp.task('build', ['styles:production', 'styleguide', 'lint']);
|
|||
var sassFiles = [
|
||||
options.theme.sass + '**/*.scss',
|
||||
// Do not open Sass partials as they will be included as needed.
|
||||
'!' + options.theme.sass + '**/_*.scss',
|
||||
// Chroma markup has its own gulp task.
|
||||
'!' + options.theme.sass + 'style-guide/kss-example-chroma.scss'
|
||||
'!' + options.theme.sass + '**/_*.scss'
|
||||
];
|
||||
|
||||
gulp.task('styles', ['clean:css'], function() {
|
||||
|
|
@ -136,28 +108,6 @@ gulp.task('styles:production', ['clean:css'], function() {
|
|||
.pipe(gulp.dest(options.theme.css));
|
||||
});
|
||||
|
||||
// ##################
|
||||
// Build style guide.
|
||||
// ##################
|
||||
gulp.task('styleguide', ['clean:styleguide', 'styleguide:kss-example-chroma'], function() {
|
||||
return kss(options.styleGuide);
|
||||
});
|
||||
|
||||
gulp.task('styleguide:kss-example-chroma', function() {
|
||||
return gulp.src(options.theme.sass + 'style-guide/kss-example-chroma.scss')
|
||||
.pipe(sass(options.sass).on('error', sass.logError))
|
||||
.pipe($.replace(/(\/\*|\*\/)\n/g, ''))
|
||||
.pipe($.rename('kss-example-chroma.twig'))
|
||||
.pipe($.size({showFiles: true}))
|
||||
.pipe(gulp.dest(options.theme.css + 'style-guide'));
|
||||
});
|
||||
|
||||
// Debug the generation of the style guide with the --verbose flag.
|
||||
gulp.task('styleguide:debug', ['clean:styleguide', 'styleguide:kss-example-chroma'], function() {
|
||||
options.styleGuide.verbose = true;
|
||||
return kss(options.styleGuide);
|
||||
});
|
||||
|
||||
// #########################
|
||||
// Lint Sass and JavaScript.
|
||||
// #########################
|
||||
|
|
@ -196,17 +146,14 @@ gulp.task('lint:sass-with-fail', function() {
|
|||
// ##############################
|
||||
// Watch for changes and rebuild.
|
||||
// ##############################
|
||||
gulp.task('watch', ['watch:lint-and-styleguide', 'watch:js']);
|
||||
gulp.task('watch', ['watch:lint', 'watch:js']);
|
||||
|
||||
gulp.task('watch:css', ['styles'], function() {
|
||||
return gulp.watch(options.theme.sass + '**/*.scss', options.gulpWatchOptions, ['styles']);
|
||||
});
|
||||
|
||||
gulp.task('watch:lint-and-styleguide', ['styleguide', 'lint:sass'], function() {
|
||||
return gulp.watch([
|
||||
options.theme.sass + '**/*.scss',
|
||||
options.theme.sass + '**/*.twig'
|
||||
], options.gulpWatchOptions, ['styleguide', 'lint:sass']);
|
||||
gulp.task('watch:lint', ['lint:sass'], function() {
|
||||
return gulp.watch(options.theme.sass + '**/*.scss', options.gulpWatchOptions, ['lint:sass']);
|
||||
});
|
||||
|
||||
gulp.task('watch:js', ['lint:js'], function() {
|
||||
|
|
@ -216,17 +163,7 @@ gulp.task('watch:js', ['lint:js'], function() {
|
|||
// ######################
|
||||
// Clean all directories.
|
||||
// ######################
|
||||
gulp.task('clean', ['clean:css', 'clean:styleguide']);
|
||||
|
||||
// Clean style guide files.
|
||||
gulp.task('clean:styleguide', function() {
|
||||
// You can use multiple globbing patterns as you would with `gulp.src`
|
||||
return del([
|
||||
options.styleGuide.destination + '*.html',
|
||||
options.styleGuide.destination + 'public',
|
||||
options.theme.css + '**/*.twig'
|
||||
], {force: true});
|
||||
});
|
||||
gulp.task('clean', ['clean:css']);
|
||||
|
||||
// Clean CSS files.
|
||||
gulp.task('clean:css', function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue