Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfr committed Jan 15, 2019
2 parents 976bf26 + bb137df commit b894ad4
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/discovery/content-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const path = require('path');
const glob = require('glob');
const gutil = require('gulp-util');
const _camelCase = require('lodash/string/camelCase');
const _ = require('lodash');

const DATA_DIRECTORY = 'content/data/';

Expand All @@ -23,7 +23,7 @@ function discover() {

for (const filepath of dataFilePaths) {
const fileName = path.parse(filepath).name;
const camelCasedName = _camelCase(fileName);
const camelCasedName = _.camelCase(fileName);

try {
data[camelCasedName] = require(path.join(process.cwd(), filepath));
Expand Down
4 changes: 2 additions & 2 deletions core/discovery/icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const path = require('path');
const glob = require('glob');
const groupBy = require('lodash/collection/groupBy');
const _ = require('lodash');

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

Expand All @@ -27,7 +27,7 @@ function discover() {
.map(filename => path.parse(filename).name);

return {
svg: groupBy(svgIcons, 'category'),
svg: _.groupBy(svgIcons, 'category'),
iconFont: iconFontIcons,
}
}
Expand Down
17 changes: 17 additions & 0 deletions core/styleguide/component-group.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends index

block append pageVariables
- var pageTitle = componentGroup.docs && componentGroup.docs.attributes.title || componentGroup.group.id
- var moduleTitle = pageTitle + ' - Styleguide'

block content

if !componentGroup.docs
h1.br-componentgroup-header(class=styleguideComponentGroupHeaderClass)= componentGroup.group.id
else
h1.br-componentgroup-header(class=styleguideComponentGroupHeaderClass)= componentGroup.docs.attributes.title || componentGroup.group.id
.br-content(class=styleguideRichContentClass)
!= componentGroup.docs.body

each component in componentGroup.components
+sample(component)
7 changes: 7 additions & 0 deletions core/styleguide/doc.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends index

block append pageVariables
- var moduleTitle = doc.attributes.title + ' - Styleguide'

block content
!= doc.body
24 changes: 24 additions & 0 deletions core/styleguide/index.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
extends /templates/_layouts/master

block append pageVariables
- var htmlClass = 'br-styleguide br-styleguide-default-styles-active'

block body

.br-styleguide-container
.br-styleguide-container-inner
.br-styleguide-navigation-holder
unless styleguideHideBrand
h1.br-styleguide-brand-heading(class=styleguideBrandClass)
a.br-reset-link-styling(href="/styleguide" class=styleguideResetLinkStylingClass) #{projectTitle}

block nav
include ../includes/styleguide-nav

.br-styleguide-content
.br-styleguide-content-inner
block content
block homeContent
// Place style guide introduction here. By default redirects to first docs page.
script.
window.location = "/styleguide/docs/introduction.html"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"gulp-watch": "^4.3.5",
"jquery": "^3.1.1",
"js-beautify": "^1.5.10",
"lodash": "^3.10.1",
"lodash": "~4.17.5",
"marked": "^0.3.9",
"mkdirp": "^0.5.1",
"moment": "^2.20.1",
Expand Down

0 comments on commit b894ad4

Please sign in to comment.