Skip to content

Commit

Permalink
Add a styleguide build sub-command.
Browse files Browse the repository at this point in the history
  • Loading branch information
thusc committed Nov 27, 2021
1 parent 4fd880b commit 8314b56
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/cli/bedrock
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ program
program
.command('content', 'Commands related to the main site content');

program
.command('styleguide', 'Commands related to the styleguide content');

program
.parse(process.argv);
33 changes: 33 additions & 0 deletions core/cli/bedrock-styleguide
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#! /usr/bin/env node

'use strict';

const program = require('commander');
const glob = require('glob');
const gulp = require('gulp');
const path = require('path');

const templates = require('../tasks/templates');
const paths = require('../paths');

program
.command('build')
.description('Build the style guide, using the styleguide and docs Pug templates')
.action(function () {
gulp.task('templates:compile:docs', templates.compile.docs);
gulp.task('templates:compile:styleguide', templates.compile.styleguide);
gulp.parallel('templates:compile:docs', 'templates:compile:styleguide')();
});

program
.action(() => {
program.help()
});

if (process.argv.length === 2) {
program.help();
process.exit();
}

program
.parse(process.argv);

0 comments on commit 8314b56

Please sign in to comment.