Skip to content

Commit 003902c

Browse files
committed
Merge branch 'fix-publish-ci' into typedoc
2 parents e82a3a9 + b758b3e commit 003902c

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,40 @@ jobs:
3131

3232
- name: Build
3333
run: npm run build
34+
35+
- name: Pack
36+
run: npm pack
37+
38+
- name: Upload package artifact
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: package
42+
path: cldn-components-0.0.0-dev.tgz
3443
publish:
3544
name: Publish
3645
needs: build
3746
if: github.event_name == 'release'
3847
runs-on: ubuntu-latest
3948
steps:
49+
- name: Setup Node.js
50+
uses: actions/setup-node@v4
51+
with:
52+
node-version: 20
53+
registry-url: https://registry.npmjs.org/
54+
cache: npm
55+
56+
- name: Install latest NPM
57+
run: npm i -g npm@latest
58+
59+
- name: Download artifacts
60+
uses: actions/download-artifact@v4
61+
4062
- name: Set version from release tag
63+
working-directory: ./package/package
4164
run: npm version ${{ github.event.release.tag_name }} --git-tag-version=false
4265

4366
- name: Publish to NPM
67+
working-directory: ./package/package
4468
run: npm publish --provenance --access public
4569
env:
4670
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

src/BaseComponent.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,22 @@ export abstract class BaseComponent<T extends Element> {
137137
return this;
138138
}
139139

140+
/**
141+
* Set text content
142+
*/
143+
public text(text: string) {
144+
this.element.textContent = text;
145+
return this;
146+
}
147+
148+
/**
149+
* Set inner HTML
150+
*/
151+
public html(html: string) {
152+
this.element.innerHTML = html;
153+
return this;
154+
}
155+
140156
/**
141157
* Set element property
142158
* @param name property name

0 commit comments

Comments
 (0)