Skip to content

Commit d18c451

Browse files
committed
updates to qs/readme
1 parent 1d8c42b commit d18c451

File tree

2 files changed

+42
-11
lines changed

2 files changed

+42
-11
lines changed

README.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,31 @@ Finally, initiate the generator:
2424
yo pattern-library
2525
```
2626

27+
#### Generator Setup Steps
28+
1. **Pattern Library Project Name?**
29+
30+
This name will be used at the Title of the Readme as in "[Project Name] Pattern Library"
31+
32+
**NOTE:** If this not explicitly set, your current directory name will be added by default. If you decide to change this, you can update the README directly in your project
33+
34+
35+
2. **If this pattern library has been added to Github, please provide the repo name:**
36+
37+
Adding the repo name lets you share your project with others (yay!) and allows you to push to gh-pages (more to come on this)
38+
39+
**Example:** if your github repo url is "*github.com/organization/org-pattern-library*", then your repository name here would be added as "*org-pattern-library*"
40+
41+
**NOTE:** If you skip this question and decide you want/need to add this later, you will need to update the following files with "repo name" values:
42+
43+
**package.json**
44+
45+
`"name": "repo-name"`
46+
47+
**config.yml**
48+
49+
`githubrepo: 'repo-name'`
50+
51+
2752
### Build, install, and serve your new pattern library
2853

2954
Once the library has been scaffolded by Yeoman, you'll need to run these commands. NOTE: these instructions are in the README of your new pattern library
@@ -94,6 +119,12 @@ If you were going to import the [h1 atoms/text pattern](https://github.com/patte
94119

95120
`gulp clone --pattern node_modules/pattern-library/patterns/atoms/text/h1`
96121

122+
123+
## How to add your Github repo information to your project
124+
125+
See **Generator Setup Steps** #2 above
126+
127+
97128
## How to import a new pattern library from a GitHub repo into your pattern library
98129

99130
**NOTE:** turn off `gulp serve` before importing a new library
@@ -122,15 +153,15 @@ If you were going to import the [h1 atoms/text pattern](https://github.com/patte
122153
```
123154
3. Run the import task for all libraries
124155
125-
```
126-
gulp patterns-import-all
127-
```
128-
129-
* alternatively, you can import *just this one library* into Pattern Lab
156+
```
157+
gulp patterns-import-all
158+
```
159+
160+
* alternatively, you can import *just this one library* into Pattern Lab
130161
131-
```
132-
gulp patterns-import-npm-scottnath
133-
```
162+
```
163+
gulp patterns-import-npm-scottnath
164+
```
134165
4. Start the server
135166
136167

generators/app/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module.exports = yeoman.generators.Base.extend({
1818
var prompts = [{
1919
type: 'input',
2020
name: 'libraryname',
21-
message: 'What is the name of this Project?',
21+
message: 'Pattern Library Project Name?',
2222
default : this.appname
2323
}];
2424

@@ -37,8 +37,8 @@ module.exports = yeoman.generators.Base.extend({
3737
var prompts = [{
3838
type: 'input',
3939
name: 'reponame',
40-
message: 'What is the name of the GitHub repository?',
41-
default : this.props.librarynameCamel+'-pattern-library'
40+
message: 'If this pattern library has been added to Github, please provide the repo name:',
41+
default : 'repo-name'
4242
}];
4343

4444
this.prompt(prompts, function (repoprops) {

0 commit comments

Comments
 (0)