@consumidor-positivo/aurora 0.0.0 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/deploy-lib.yml +58 -0
- package/lib/main.ts +2 -2
- package/package.json +3 -2
- package/src/stories/Header.tsx +0 -1
- package/tsconfig-build.json +24 -24
- package/tsconfig.json +4 -5
- package/tsconfig.node.json +1 -1
- package/vite.config.ts +5 -5
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Publish package
|
|
2
|
+
on:
|
|
3
|
+
# When Release Pull Request is merged
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
pull_request:
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
paths:
|
|
9
|
+
- 'lib/**'
|
|
10
|
+
- 'package.json'
|
|
11
|
+
types: [closed]
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
15
|
+
cancel-in-progress: true
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write
|
|
19
|
+
id-token: write
|
|
20
|
+
|
|
21
|
+
jobs:
|
|
22
|
+
publish:
|
|
23
|
+
name: Publish
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- name: Checkout
|
|
27
|
+
uses: actions/checkout@v2
|
|
28
|
+
with:
|
|
29
|
+
ref: ${{ github.ref }}
|
|
30
|
+
|
|
31
|
+
- name: Setup Node.js
|
|
32
|
+
uses: actions/setup-node@v2
|
|
33
|
+
with:
|
|
34
|
+
node-version: 18.18.0
|
|
35
|
+
|
|
36
|
+
- name: Git Identity
|
|
37
|
+
run: |
|
|
38
|
+
git config --global user.name 'github-actions[bot]'
|
|
39
|
+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
40
|
+
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/$GITHUB_REPOSITORY
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: |
|
|
44
|
+
rm -rf node_modules
|
|
45
|
+
npm ci
|
|
46
|
+
|
|
47
|
+
- name: Bump version
|
|
48
|
+
run: npm version patch
|
|
49
|
+
|
|
50
|
+
- name: Build lib
|
|
51
|
+
run: npm run build
|
|
52
|
+
|
|
53
|
+
- name: Push Changes
|
|
54
|
+
run: git push --follow-tags
|
|
55
|
+
|
|
56
|
+
- uses: JS-DevTools/npm-publish@v3
|
|
57
|
+
with:
|
|
58
|
+
token: ${{ secrets.NPM_TOKEN }}
|
package/lib/main.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {Button} from '../src/stories/Button'
|
|
1
|
+
import { Button } from '../src/stories/Button'
|
|
2
2
|
|
|
3
|
-
export {Button}
|
|
3
|
+
export { Button }
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consumidor-positivo/aurora",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.3",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "dist",
|
|
6
|
+
"main": "dist/aurora.js",
|
|
7
|
+
"types": "dist/main.d.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"dev": "vite",
|
|
9
10
|
"build": "tsc --p ./tsconfig-build.json && vite build",
|
package/src/stories/Header.tsx
CHANGED
package/tsconfig-build.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"noFallthroughCasesInSwitch": true
|
|
22
|
+
},
|
|
23
|
+
"include": ["lib"],
|
|
24
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
+
}
|
package/tsconfig.json
CHANGED
package/tsconfig.node.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { defineConfig } from 'vite'
|
|
2
2
|
import react from '@vitejs/plugin-react'
|
|
3
3
|
import dts from 'vite-plugin-dts'
|
|
4
|
-
import dotenv from 'dotenv'
|
|
5
|
-
import pkg from
|
|
4
|
+
import dotenv from 'dotenv'
|
|
5
|
+
import pkg from './package.json'
|
|
6
6
|
import { resolve } from 'path'
|
|
7
7
|
|
|
8
|
-
dotenv.config()
|
|
8
|
+
dotenv.config()
|
|
9
9
|
|
|
10
|
-
process.env[
|
|
10
|
+
process.env['VITE_LIB_VERSION'] = pkg.version
|
|
11
11
|
|
|
12
12
|
// https://vitejs.dev/config/
|
|
13
13
|
export default defineConfig({
|
|
14
14
|
plugins: [react(), dts({ include: ['lib'] })],
|
|
15
15
|
build: {
|
|
16
16
|
copyPublicDir: false,
|
|
17
|
-
target:
|
|
17
|
+
target: 'es2015',
|
|
18
18
|
lib: {
|
|
19
19
|
entry: resolve(__dirname, './lib/main.ts'),
|
|
20
20
|
name: 'aurora',
|