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
{{ message }}
This repository was archived by the owner on Jan 13, 2025. It is now read-only.
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.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+23-9
Original file line number
Diff line number
Diff line change
@@ -120,24 +120,38 @@ Finally, it helps to make sure that your branch/fork is up to date with what's c
120
120
> NOTE: This section is for collaborators only. Contributors without repo write access can ignore
121
121
> this section.
122
122
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.
124
140
125
141
1. Run `./scripts/pre-release.sh`. This will run `npm test`, build MDC-Web, copy the built assets over
126
142
to each module's `dist/` folder, and then print out a summary of all of the new versions that
127
143
should be used for changed components. The summary is printed out to both the console, as well
128
144
as a `.new-versions.log` file in the repo root. This information should be used within the
129
145
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
131
147
version info output above. In some cases, e.g. repo-wide refactors that cause all component
132
148
versions to be updated, you can ignore this info. However, _it is strongly recommended to adhere
133
149
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).
Copy file name to clipboardExpand all lines: docs/authoring-components.md
+25-2
Original file line number
Diff line number
Diff line change
@@ -499,15 +499,38 @@ This is needed so that lerna will be able to automatically publish new scoped pa
499
499
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:
500
500
501
501
```
502
-
"keywords": {
502
+
"keywords": [
503
503
"material components",
504
504
"material design",
505
505
<COMPONENT_NAME>
506
-
}
506
+
]
507
507
```
508
508
509
509
For example, if you are building a checkbox component, `keywords` would include `material components`, `material design`, and `checkbox`
510
510
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",
0 commit comments