@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.
@@ -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.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",
@@ -1,4 +1,3 @@
1
-
2
1
  import { Button } from './Button'
3
2
  import './header.css'
4
3
 
@@ -1,25 +1,25 @@
1
1
  {
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
- }
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
@@ -8,9 +8,8 @@
8
8
  "path": "./tsconfig.node.json"
9
9
  }
10
10
  ],
11
- "include": [
12
- // ...other includes
13
- "package.json"
14
- ]
15
-
11
+ "include": [
12
+ // ...other includes
13
+ "package.json"
14
+ ]
16
15
  }
@@ -5,7 +5,7 @@
5
5
  "skipLibCheck": true,
6
6
  "module": "ESNext",
7
7
  "moduleResolution": "bundler",
8
- "allowSyntheticDefaultImports": true,
8
+ "allowSyntheticDefaultImports": true
9
9
  },
10
10
  "include": ["vite.config.ts"]
11
11
  }
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 "./package.json"
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["VITE_LIB_VERSION"] = pkg.version;
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: "es2015",
17
+ target: 'es2015',
18
18
  lib: {
19
19
  entry: resolve(__dirname, './lib/main.ts'),
20
20
  name: 'aurora',