Skip to content

Commit

Permalink
chore: update build
Browse files Browse the repository at this point in the history
  • Loading branch information
DoneDeal0 committed Sep 12, 2024
1 parent d5b62f1 commit c99ff06
Show file tree
Hide file tree
Showing 20 changed files with 1,491 additions and 7,532 deletions.
1 change: 1 addition & 0 deletions .eslintcache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"/Users/antoine/Desktop/Talkr/eslint.config.mjs":"1","/Users/antoine/Desktop/Talkr/tsup.config.ts":"2","/Users/antoine/Desktop/Talkr/src/index.tsx":"3","/Users/antoine/Desktop/Talkr/src/initLocale.ts":"4","/Users/antoine/Desktop/Talkr/src/models.ts":"5","/Users/antoine/Desktop/Talkr/src/tr.tsx":"6","/Users/antoine/Desktop/Talkr/test/dummy-app.tsx":"7","/Users/antoine/Desktop/Talkr/test/index.test.tsx":"8"},{"size":556,"mtime":1726079480165,"results":"9","hashOfConfig":"10"},{"size":281,"mtime":1726083590995,"results":"11","hashOfConfig":"12"},{"size":1046,"mtime":1726079480166,"results":"13","hashOfConfig":"12"},{"size":385,"mtime":1726079480166,"results":"14","hashOfConfig":"12"},{"size":1143,"mtime":1726082284564,"results":"15","hashOfConfig":"12"},{"size":1343,"mtime":1726082284564,"results":"16","hashOfConfig":"12"},{"size":1590,"mtime":1726082284564,"results":"17","hashOfConfig":"12"},{"size":4194,"mtime":1726083590994,"results":"18","hashOfConfig":"12"},{"filePath":"19","messages":"20","suppressedMessages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"b931uu",{"filePath":"22","messages":"23","suppressedMessages":"24","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1h213jq",{"filePath":"25","messages":"26","suppressedMessages":"27","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","suppressedMessages":"30","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"31","messages":"32","suppressedMessages":"33","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","suppressedMessages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","suppressedMessages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","suppressedMessages":"42","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/antoine/Desktop/Talkr/eslint.config.mjs",[],[],"/Users/antoine/Desktop/Talkr/tsup.config.ts",[],[],"/Users/antoine/Desktop/Talkr/src/index.tsx",[],[],"/Users/antoine/Desktop/Talkr/src/initLocale.ts",[],[],"/Users/antoine/Desktop/Talkr/src/models.ts",[],["43","44","45"],"/Users/antoine/Desktop/Talkr/src/tr.tsx",[],[],"/Users/antoine/Desktop/Talkr/test/dummy-app.tsx",[],[],"/Users/antoine/Desktop/Talkr/test/index.test.tsx",[],[],{"ruleId":"46","severity":2,"message":"47","line":4,"column":29,"nodeType":"48","messageId":"49","endLine":4,"endColumn":32,"suggestions":"50","suppressions":"51"},{"ruleId":"46","severity":2,"message":"47","line":12,"column":29,"nodeType":"48","messageId":"49","endLine":12,"endColumn":32,"suggestions":"52","suppressions":"53"},{"ruleId":"46","severity":2,"message":"47","line":35,"column":56,"nodeType":"48","messageId":"49","endLine":35,"endColumn":59,"suggestions":"54","suppressions":"55"},"@typescript-eslint/no-explicit-any","Unexpected any. Specify a different type.","TSAnyKeyword","unexpectedAny",["56","57"],["58"],["59","60"],["61"],["62","63"],["64"],{"messageId":"65","fix":"66","desc":"67"},{"messageId":"68","fix":"69","desc":"70"},{"kind":"71","justification":"72"},{"messageId":"65","fix":"73","desc":"67"},{"messageId":"68","fix":"74","desc":"70"},{"kind":"71","justification":"72"},{"messageId":"65","fix":"75","desc":"67"},{"messageId":"68","fix":"76","desc":"70"},{"kind":"71","justification":"72"},"suggestUnknown",{"range":"77","text":"78"},"Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.","suggestNever",{"range":"79","text":"80"},"Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.","directive","",{"range":"81","text":"78"},{"range":"82","text":"80"},{"range":"83","text":"78"},{"range":"84","text":"80"},[139,142],"unknown",[139,142],"never",[325,328],[325,328],[938,941],[938,941]]
47 changes: 47 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CD Pipeline

on:
workflow_run:
workflows: ["CI Pipeline"]
types:
- completed
branches:
- main

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
registry-url: https://registry.npmjs.org
cache-dependency-path: package-lock.json
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install dependencies
run: npm install

- name: Build the project
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
95 changes: 0 additions & 95 deletions .github/workflows/ci-cd.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI Pipeline

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
registry-url: https://registry.npmjs.org
cache-dependency-path: package-lock.json

- name: Install dependencies
run: npm install

- name: Run typescript
run: npm run tsc

- name: Run linter
run: npm run lint

- name: Run tests
run: npm run test

- name: Build the project
run: npm run build


3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/node_modules
/node_modules
dist
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npm run test && npm run lint
npm run test && npm run tsc && npm run lint
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

**Talkr** is the lightest i18n provider for React applications. It supports **Typescript**, provides **autocompletion**, has **0 dependencies**, and is very easy to use.

[![Talkr CI](https://github.com/DoneDeal0/Talkr/actions/workflows/ci-cd.yml/badge.svg)](https://github.com/DoneDeal0/Talkr/actions/workflows/ci-cd.yml)
[![CI](https://github.com/DoneDeal0/Talkr/actions/workflows/ci.yml/badge.svg)](https://github.com/DoneDeal0/Talkr/actions/workflows/ci.yml)
[![CD](https://github.com/DoneDeal0/Talkr/actions/workflows/cd.yml/badge.svg)](https://github.com/DoneDeal0/Talkr/actions/workflows/cd.yml)
![NPM Downloads](https://img.shields.io/npm/dy/talkr?logo=npm)

<hr/>
Expand Down
7 changes: 0 additions & 7 deletions dist/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.es.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/index.js

This file was deleted.

1 change: 0 additions & 1 deletion dist/initLocale.d.ts

This file was deleted.

28 changes: 0 additions & 28 deletions dist/models.d.ts

This file was deleted.

2 changes: 0 additions & 2 deletions dist/tr.d.ts

This file was deleted.

Loading

0 comments on commit c99ff06

Please sign in to comment.