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
| <h6>Built to branch [`${{ env.PREVIEW_BRANCH }}`](${{ github.server_url }}/${{ github.repository }}/tree/${{ env.PREVIEW_BRANCH }}) at ${{ steps.preview-step.outputs.action-start-time }}. <br> Preview will be ready when the [GitHub Pages deployment](${{ github.server_url }}/${{ github.repository }}/deployments) is complete. <br><br> </h6>
Copy file name to clipboardExpand all lines: README.md
+22-22
Original file line number
Diff line number
Diff line change
@@ -20,20 +20,20 @@ This is a base template for creating Typescript WebComponents. It is based off o
20
20
21
21
## Local Demo with `web-dev-server`
22
22
```bash
23
-
yarn start
23
+
npm run start
24
24
```
25
25
To run a local development server that serves the basic demo located in `demo/index.html`
26
26
27
27
## Testing with Web Test Runner
28
28
To run the suite of Web Test Runner tests, run
29
29
```bash
30
-
yarn run test
30
+
npm run test
31
31
```
32
32
33
33
To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
34
34
35
35
```bash
36
-
yarn run test:watch
36
+
npm run test:watch
37
37
```
38
38
39
39
## Releasing alpha and production tagged packages to NPM
@@ -42,12 +42,12 @@ yarn run test:watch
42
42
- run: **`npm version prerelease --preid=wedev-1234`**
43
43
- this command will help auto-increment your alpha package tags inside your jira ticket namespace. refer to [npm versioning docs](https://docs.npmjs.com/cli/v11/commands/npm-version) & [guides for more info on command options](- this command will help auto-increment your alpha package tags inside your jira ticket namespace)
44
44
- run: **`npm publish --tag alpha`** our most used development tags are: alpha, canary
45
-
45
+
46
46
### Releasing production level package
47
47
We like to create a pull request specifically after the expected changes are merged into the main branch.
48
48
Steps:
49
49
- create PR with version number as branch name. Ex, if the next version is 3.2.1, your git command will be: `git checkout -b v3.2.1`
50
-
- in the new branch, run the following:
50
+
- in the new branch, run the following:
51
51
1.**`git pull --tags`** to fetch all git tags
52
52
2.**`npm version X.X.X`** to set the new tag WITH the commit git tagged
53
53
3.**`git push --tags`**
@@ -57,28 +57,28 @@ Steps:
57
57
## Linting with ESLint, Prettier, and Types
58
58
To scan the project for linting errors, run
59
59
```bash
60
-
yarn run lint
60
+
npm run lint
61
61
```
62
62
63
63
You can lint with ESLint and Prettier individually as well
64
64
```bash
65
-
yarn run lint:eslint
65
+
npm run lint:eslint
66
66
```
67
67
```bash
68
-
yarn run lint:prettier
68
+
npm run lint:prettier
69
69
```
70
70
71
71
To automatically fix many linting errors, run
72
72
```bash
73
-
yarn run format
73
+
npm run format
74
74
```
75
75
76
76
You can format using ESLint and Prettier individually as well
- In the `Source` drop-down, choose the branch where you want to host your Github Pages and the `directory` where it was hosted
126
126
- We'll use `gh-pages` branch for this but you can use other branch name for this
127
127
- Just make sure that's the branch where the `index.html` that you want to host lives in
@@ -134,17 +134,17 @@ git push origin gh-pages
134
134
135
135
You can update the current Github Page without pushing a commit by running:
136
136
```
137
-
yarn run ghpages:publish
137
+
npm run ghpages:publish
138
138
```
139
139
140
140
This build script does the following, see `package.json`:
141
-
-`ghpages:publish`
141
+
-`ghpages:publish`
142
142
- This executes `ghpages:prepare` in the current branch you are currently working on
143
-
- Note: The branch name is required so that it will not override the whole Github Pages directory
143
+
- Note: The branch name is required so that it will not override the whole Github Pages directory
144
144
- You can check it by navigating through the branch name files directory you set from the [step to setup `gh-pages` branch](#steps-to-setup-gh-pages)
145
145
- You can checkout how it looks like in one of our projects here: [https://github.com/internetarchive/iaux-collection-browser/tree/gh-pages](https://github.com/internetarchive/iaux-collection-browser/tree/gh-pages)
146
-
147
-
-`ghpages:prepare`
146
+
147
+
-`ghpages:prepare`
148
148
- This executes `ghpages:build` that builds the project dependencies and generates `vite` build from it
149
149
- We use [vite](https://vitejs.dev/) to bundle and generate the static assets that we host in Github Pages
150
150
- See `vite.config.ts` related to this
@@ -155,7 +155,7 @@ This build script does the following, see `package.json`:
155
155
- This generates a commit message formatted from the most recent commit message of the branch
156
156
- Push the commit to `gh-pages` branch that we setup earlier
157
157
158
-
The live demo app URL from current branch will look something like this:
158
+
The live demo app URL from current branch will look something like this:
0 commit comments