Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 471e14d

Browse files
docs: Update release notes and authoring new components for release (#264)
- Update CONTRIBUTING.md to revamp releasing section with more thorough and up-to-date information on how to properly release MDC-Web. - Update authoring components guide to outline exactly what a new component's package.json should look like for a successful release.
1 parent e0e817f commit 471e14d

File tree

2 files changed

+48
-11
lines changed

2 files changed

+48
-11
lines changed

CONTRIBUTING.md

+23-9
Original file line numberDiff line numberDiff line change
@@ -120,24 +120,38 @@ Finally, it helps to make sure that your branch/fork is up to date with what's c
120120
> NOTE: This section is for collaborators only. Contributors without repo write access can ignore
121121
> this section.
122122
123-
To release MDC-Web, you should perform the following steps.
123+
#### Pre-requisites
124+
125+
Before releasing MDC-Web, ensure that you have the following:
126+
127+
- Write access to the material-components-web repo
128+
- Correct credentials for npm
129+
- The [Google Cloud SDK](https://cloud.google.com/sdk/) installed. Please run `gcloud init` command
130+
to login to your Google Cloud account and choose `material-components-web` if this is your first
131+
time working with the SDK.
132+
- Access to the `material-components-web` Google Cloud project
133+
134+
You should ping a core team member regarding any/all of these items if you're unsure whether or not
135+
they are all set up.
136+
137+
#### Performing the release.
138+
139+
To release MDC-Web, you perform the following steps.
124140

125141
1. Run `./scripts/pre-release.sh`. This will run `npm test`, build MDC-Web, copy the built assets over
126142
to each module's `dist/` folder, and then print out a summary of all of the new versions that
127143
should be used for changed components. The summary is printed out to both the console, as well
128144
as a `.new-versions.log` file in the repo root. This information should be used within the
129145
following steps.
130-
2. Run `lerna publish`. When prompted for versions for each component, you should use the
146+
1. From the root directory of the repo, run `$(npm bin)/lerna publish -m "chore: Publish"`. When prompted for versions for each component, you should use the
131147
version info output above. In some cases, e.g. repo-wide refactors that cause all component
132148
versions to be updated, you can ignore this info. However, _it is strongly recommended to adhere
133149
to those specified versions in order to minimize human error_.
134-
3. Run `./scripts/post-release.sh`. This will update our `CHANGELOG.md` with information for the
135-
current release of the overarching `material-components-web` library, and commit those changes.
136-
4. Run `MDC_ENV=development npm run build && gcloud app deploy`. This will deploy demo pages to Google Cloud [App Engine](https://material-components-web.appspot.com). Please request access to the App Engine project `material-components-web` to deploy.
137-
138-
> NOTE: `gcloud` is cli tool provided by [Cloud SDK](https://cloud.google.com/sdk/). Please run `gcloud init` command to login to your Google Cloud account and choose `material-components-web` project before running deploy command as mentioned above.
139-
140-
5. Push the changelog changes to master, and call it a day!
150+
1. Run `./scripts/post-release.sh`. This will update our `CHANGELOG.md` with information for the
151+
current release of the overarching `material-components-web` library, and commit those changes. It will also generate a `vX.Y.Z` semver tag for the entire repo, and commit the tag as such.
152+
1. Run `git push && git push --tags` to push the changelog changes and semver tag to master.
153+
1. Run `MDC_ENV=development npm run build && gcloud app deploy`. This will deploy demo pages to our [App Engine demo site](https://material-components-web.appspot.com).
154+
1. Call it a day! :tada: :rocket: :package:
141155

142156
## "What's the core team up to?"
143157

docs/authoring-components.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -499,15 +499,38 @@ This is needed so that lerna will be able to automatically publish new scoped pa
499499
We also require a list of keywords for each package. This list should always include `material components` and `material design`, followed by the component name:
500500

501501
```
502-
"keywords": {
502+
"keywords": [
503503
"material components",
504504
"material design",
505505
<COMPONENT_NAME>
506-
}
506+
]
507507
```
508508

509509
For example, if you are building a checkbox component, `keywords` would include `material components`, `material design`, and `checkbox`
510510

511+
**Below is an example of what a full `package.json` should look like for a new component:**
512+
513+
```json
514+
{
515+
"name": "@material/example",
516+
"version": "0.0.0",
517+
"description": "The Material Components for the web example component",
518+
"license": "Apache-2.0",
519+
"repository": {
520+
"type": "git",
521+
"url": "https://github.com/material-components/material-components-web.git"
522+
},
523+
"keywords": [
524+
"material components",
525+
"material design",
526+
"example"
527+
],
528+
"publishConfig": {
529+
"access": "public"
530+
}
531+
}
532+
```
533+
511534
### License Stanzas
512535

513536
We are required to put the following at the _top_ of _every source code file_, including tests,

0 commit comments

Comments
 (0)