Skip to content

Commit

Permalink
Update generator demo yml files to have Demo info above content. (#825)
Browse files Browse the repository at this point in the history
  • Loading branch information
madhaze authored Jun 8, 2020
1 parent e00f9f4 commit 23eb18a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tools/generators/new-component/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const { join, relative, extname } = require('path');
const { readdirSync } = require('fs');

const Generator = require('yeoman-generator');
const { camelCase, kebabCase, snakeCase } = require('lodash');
const { camelCase, kebabCase, snakeCase, startCase } = require('lodash');
const rename = require('gulp-rename');

const { PATH_APPS } = require('../../../../../particle.root.config');
Expand Down Expand Up @@ -132,6 +132,7 @@ module.exports = class extends Generator {
this.props = {
...props,
// 'name' already exists as kebab-case-name (dashes)
upperCaseName: startCase(props.name),
underscoreName: snakeCase(props.name),
camelCaseName: camelCase(props.name),
cleanPatternType: props.patternType.replace(/([0-9])\w+-/g, ''),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<%= underscoreName %>:
example_var: This is an example var

<%= underscoreName %>_demo_block:
title: <%= name %> Component
text:
title: <%= upperCaseName %> Component
content:
lead: Add a quick description here.
summary: Add code examples here using <code>html code syntax</code>

<%= underscoreName %>:
example_var: This is an example var

0 comments on commit 23eb18a

Please sign in to comment.