analytica-frontend-lib 1.0.0 → 1.0.1
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/README.md +35 -2
- package/package.json +24 -4
package/README.md
CHANGED
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
1
|
+
# README
|
|
2
|
+
|
|
3
|
+
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/analytica-frontend-lib)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Como usar?
|
|
10
|
+
|
|
11
|
+
Instale a biblioteca em seu projeto com o comando:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yarn add analytica-frontend-lib
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Etapas para criar um novo componente
|
|
20
|
+
|
|
21
|
+
1. Crie uma nova branch a partir da `main`.
|
|
22
|
+
2. Crie o componente na pasta `/src/components`.
|
|
23
|
+
3. Adicione testes unitários, com cobertura mínima de 80%.
|
|
24
|
+
4. Adicione o componente no Storybook, contemplando todas as variações.
|
|
25
|
+
5. Atualize a versão no campo `version` do arquivo `package.json`.
|
|
26
|
+
6. Abra um Pull Request (PR) da sua branch para a `main`.
|
|
27
|
+
7. O GitHub Actions cuidará da publicação automática após o merge.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Regras
|
|
32
|
+
|
|
33
|
+
- Os componentes devem ser totalmente compatíveis com Next.js versão 15+.
|
|
34
|
+
- Testes unitários são obrigatórios, com coverage mínimo de 80%.
|
|
35
|
+
- Siga o princípio da responsabilidade única (`single responsibility`): construa componentes compostos por componentes menores.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "analytica-frontend-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Repositório público dos componentes utilizados nas plataformas da Analytica Ensino",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -9,6 +9,9 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
+
"lint": "npx eslint \"{src,app}/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
13
|
+
"typecheck": "npx tsc --noEmit",
|
|
14
|
+
"prepare": "husky install",
|
|
12
15
|
"build": "tsup src/index.ts --dts --format esm,cjs --out-dir dist --clean"
|
|
13
16
|
},
|
|
14
17
|
"engines": {
|
|
@@ -16,16 +19,24 @@
|
|
|
16
19
|
},
|
|
17
20
|
"packageManager": "yarn@4.9.0",
|
|
18
21
|
"keywords": [
|
|
19
|
-
"analytica",
|
|
20
|
-
"ensino",
|
|
22
|
+
"analytica ensino",
|
|
21
23
|
"frontend",
|
|
22
|
-
"components"
|
|
24
|
+
"components",
|
|
25
|
+
"nextjs"
|
|
23
26
|
],
|
|
24
27
|
"publishConfig": {
|
|
25
28
|
"access": "public"
|
|
26
29
|
},
|
|
27
30
|
"author": "Analytica Ensino LTDA",
|
|
28
31
|
"license": "MIT",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/analytica-ensino/analytica-frontend-lib.git"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/analytica-ensino/analytica-frontend-lib#readme",
|
|
37
|
+
"bugs": {
|
|
38
|
+
"url": "https://github.com/analytica-ensino/analytica-frontend-lib/issues"
|
|
39
|
+
},
|
|
29
40
|
"dependencies": {
|
|
30
41
|
"react": "^19.1.0",
|
|
31
42
|
"react-dom": "^19.1.0"
|
|
@@ -34,8 +45,17 @@
|
|
|
34
45
|
"@tailwindcss/postcss": "^4.1.8",
|
|
35
46
|
"@types/react": "^19.1.6",
|
|
36
47
|
"@types/react-dom": "^19.1.6",
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^8.34.0",
|
|
49
|
+
"@typescript-eslint/parser": "^8.34.0",
|
|
37
50
|
"autoprefixer": "^10.4.21",
|
|
51
|
+
"eslint": "^9.28.0",
|
|
52
|
+
"eslint-config-prettier": "^10.1.5",
|
|
53
|
+
"eslint-plugin-jsdoc": "^50.7.1",
|
|
54
|
+
"eslint-plugin-prettier": "^5.4.1",
|
|
55
|
+
"husky": "^9.1.7",
|
|
38
56
|
"postcss": "^8.5.4",
|
|
57
|
+
"prettier": "^3.5.3",
|
|
58
|
+
"sonarqube-scanner": "^4.3.0",
|
|
39
59
|
"tailwindcss": "^4.1.8",
|
|
40
60
|
"tsup": "^8.5.0",
|
|
41
61
|
"typescript": "^5.8.3"
|