You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+20-12
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,6 @@
2
2
3
3
The Puppet Design System is a cross-functional team effort across Puppet with shared ownership where contributions are encouraged. Though designed for and maintained by Puppet, outside PRs are welcome. A good place to start is by visiting [#team-design-system](https://puppet.slack.com/messages/CFFECRQAY) in Puppet's internal Slack or contacting <[email protected]>.
4
4
5
-
- See the general [Consumption and Contribution](https://github.com/puppetlabs/design-system/wiki/Consumption-and-Contribution) principles on the wiki.
6
-
- See individual CONTRIBUTING.md files for specific packages:
Run `npm install` in the root of the design-system to install all package dependencies (which uses [Lerna](https://lerna.js.org/) to link local packages together and hoist duplicate dependencies up to the top directory to reduce install time):
13
+
We recommend the latest LTS version of Node.js. Run `npm install` in the root of the design-system to install all package dependencies (which uses [Lerna](https://lerna.js.org/) to link local packages together and hoist duplicate dependencies up to the top directory to reduce install time):
18
14
19
15
```sh
20
16
npm install
@@ -30,30 +26,42 @@ npm start
30
26
31
27
## Local development
32
28
33
-
To develop locally using a separate app that consumes a design-system package, you can run `npm link` in a particular package subfolder and `npm link @puppet/<package-name>` in the consuming app. See each individual package's own README.md; some have `npm run watch` commands to rebuild on change.
29
+
To develop locally using a separate app that consumes a design-system package:
30
+
31
+
1. Run `npx lerna run link` (which will run `npm link` in consumable packages).
32
+
2. Run `npm link @puppet/<package-name>` in the consuming app.
33
+
3. Run `npx lerna run --parallel watch` to rebuild packages on change ( or just `npm run watch` in the desired package).
34
34
35
35
## Testing
36
36
37
-
You can run `npm test` in a package subfolder or `npm test` in the top folder to test all packages.
37
+
Run `npm test` in the top folder to test all packages, or `npm test` in the desired package. You can also run `npm lint`to check for code formatting errors or `npm format` to attempt to automatically fix them.
38
38
39
39
## Pull requests
40
40
41
41
Put up a PR for the design-system repo that follows these guidelines:
42
42
43
-
- Granularity: Make commits of logical units (ideally with each commit passing tests).
44
-
- Tense: Use the imperative present tense (e.g. "Change", not "Changed" or "Changes") to describe what changed from the consumer's perspective in the commit summary (with any extra details or motivation in the commit body).
45
-
- Ticket: Associate with the Jira issue by adding the issue key to the commit body and, if it resolves the ticket, use the "PDS-123 #resolve" syntax to resolve the issue.
46
-
- Fork: For the Jira issue to be resolved on merging rather than opening the PR (with the above syntax), the PR can be opened from a branch on your fork of the design-system repo.
43
+
- Granularity: Make commits of logical units (ideally with each commit passing tests, and formatting and refactoring in separate commits).
44
+
- Commit summary: The first line should be no more than 72 characters (with any extra details or motivation in the commit body).
45
+
- Tense: Use the imperative present tense (e.g. "Add feature", not "Added feature") to describe what changed from the consumer's perspective in the commit summary.
46
+
- Changelog: Add a line about your change to the package's CHANGELOG.md file.
47
+
48
+
| <imgsrc="https://imgs.xkcd.com/comics/git_commit.png"alt="xkcd comic about commit messages"/> |
49
+
| ------------- |
50
+
| <palign="center">Don't do this</p> |
51
+
52
+
See more guidelines for contributors and maintainers in the [Principles, Patterns, and Guidelines](principles-patterns-guidelines.md) doc.
47
53
48
54
## Publishing
49
55
56
+
New versions are currently released by maintainers using `npm run publish`. Please collaborate with the team to release a new version. (Note: This process will likely be replaced with automated releases on push to master.)
57
+
50
58
This project currently uses Lerna's independent mode, so the following command will prompt you to select a new version for any packages that have changed since the last version tags. WARNING: this command results in a git push to your `origin` remote.
51
59
52
60
```sh
53
61
npm run publish
54
62
```
55
63
56
-
If `origin` was not puppetlabs/design-system, push the "Publish" commit that created, along with version tags, to the upstream repo:
64
+
If `origin` was not puppetlabs/design-system, push the "Publish" commit the above command created, along with version tags, to the upstream repo:
Copy file name to clipboardExpand all lines: packages/design-system-website/README.md
+2-8
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,15 @@ For background, see [Puppet Design System](https://confluence.puppetlabs.com/dis
8
8
9
9
### Getting started
10
10
11
-
**Designers** should download and install the [Sketch library](https://github.com/puppetlabs/design-system/blob/master/packages/design-assets/puppet-ui-library.sketch). Instructions for [installation and receiving updates](https://confluence.puppetlabs.com/display/UXT/Design+System+Sketch+library) are on Confluence.
12
-
13
-
**Developers** can get started by cloning the repo and following the [quickstart guide](https://github.com/puppetlabs/design-system).
14
-
15
-
**Writers** should start with the [foundation on content writing](#/Foundations/Content%20Writing) or the [writing guidelines on Confluence](https://confluence.puppetlabs.com/display/Writing/Puppet+content+style+guide). These are helpful for anyone creating content, from full pages to micro-copy.
11
+
Get started by cloning the repo and following the [quickstart guide](https://github.com/puppetlabs/design-system).
16
12
17
13
### Release notes
18
14
19
15
See the changelog for each package, like react-components' [CHANGELOG.md](https://github.com/puppetlabs/design-system/blob/master/packages/react-components/CHANGELOG.md).
20
16
21
17
### Contribute
22
18
23
-
The Puppet Design System is a cross-functional team effort with shared ownership. Contributions are both welcome and encouraged. We have written a [best-practices guide](https://github.com/puppetlabs/design-system/wiki) to help you get started.
24
-
25
-
Developers should start with the the [CONTRIBUTING.md](https://github.com/puppetlabs/design-system/blob/master/CONTRIBUTING.md) in the repo. Designers should reference the [design criteria for adding symbols and styles](https://github.com/puppetlabs/design-system/wiki/Design-criteria) to the Sketch library.
19
+
The Puppet Design System is a cross-functional team effort with shared ownership. Contributions are both welcome and encouraged. Please read our [CONTRIBUTING.md](https://github.com/puppetlabs/design-system/blob/master/CONTRIBUTING.md) guide (and [Designing](#/Foundations/Designing) guide if applicable).
React Components utilizes Calibre and Open Sans. In order for Calibre to load, you will need to process the react-components scss with Webpack. This has currently been tested with webpack 4 using css-loader, sass-loader, file-loader, resolve-url-loader, and mini-css-extract-plugin. The following is an example configuration for a consuming application:
26
26
@@ -66,7 +66,7 @@ const common = {
66
66
};
67
67
```
68
68
69
-
### Create React App
69
+
### With Create React App (CRA)
70
70
71
71
If you are using CRA with [react-app-rewired](https://github.com/timarney/react-app-rewired) (after following their [instructions](https://github.com/timarney/react-app-rewired/blob/master/README.md#how-to-rewire-your-create-react-app-project) for switching from react-scripts to react-app-rewired in package.json), you can use this included rewire instead (after adding `resolve-url-loader` to devDependencies):
0 commit comments