mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
npx --no-install commitlint --edit "$1"
|
||||
npx --no -- commitlint --edit
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
. "$(dirname -- "$0")/_/husky.sh"
|
||||
|
||||
yarn run format:write && git add .
|
||||
yarn run fmt.staged
|
||||
|
||||
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"conventionalCommits.scopes": ["hook"]
|
||||
}
|
||||
@@ -1,3 +1,10 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
npmPublishRegistry: 'https://registry.npmjs.org'
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-postinstall.cjs
|
||||
spec: 'https://raw.githubusercontent.com/gravitywelluk/yarn-plugin-postinstall/master/bundles/%40yarnpkg/plugin-postinstall.js'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.3.0.cjs
|
||||
postinstall: npx husky install
|
||||
|
||||
21
CHANGELOG.md
21
CHANGELOG.md
@@ -2,6 +2,27 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
## 0.2.0-alpha.0 (2022-12-01)
|
||||
|
||||
|
||||
### ⚠ BREAKING CHANGES
|
||||
|
||||
* 🧨 NO
|
||||
|
||||
### Features
|
||||
|
||||
* (🎸) add onClick prop to component ([4ae3898](https://github.com/leifermendez/bot-whatsapp/commit/4ae389846d38c133f6bb2129ae373eed39d9d08d))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** ci ([f55cfae](https://github.com/leifermendez/bot-whatsapp/commit/f55cfae6e4ccc1df949212999406680020d27f9c))
|
||||
* **ci:** ci ([671c5b3](https://github.com/leifermendez/bot-whatsapp/commit/671c5b37f33360e8cb754625b8dd6e83bce9014d))
|
||||
* **linter:** update linter and commitlint ([70a94ab](https://github.com/leifermendez/bot-whatsapp/commit/70a94ab2c6f8e4122780c77bc3a621944883e621))
|
||||
|
||||
|
||||
* (💍) Is justa test! ([37d04e9](https://github.com/leifermendez/bot-whatsapp/commit/37d04e9e89d3f01fdc367654ba60fb11ab2614c4))
|
||||
|
||||
## 0.1.0 (2022-11-29)
|
||||
|
||||
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
__Requerimientos:__
|
||||
- Node v16 o superior __[descargar node](https://nodejs.org/es/download/)__
|
||||
- __[Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#windows-stable)__ como gestor de paquetes. En el link conseguiras las intrucciones para instalar yarn.
|
||||
- __[VSCode](https://code.visualstudio.com/download)__ (recomendado): Editor de codigo con plugins
|
||||
- __[Conventional Commits](https://marketplace.visualstudio.com/items?itemName=vivaxy.vscode-conventional-commits&ssr=false#overview)__ (plugin-vscode) este plugin te ayudara a crear commit semantico.
|
||||
- Se usara la rama __dev__ *(https://github.com/leifermendez/bot-whatsapp/tree/dev)* como rama principal hasta que se haga oficialmente el lanzamiento de la V2
|
||||
|
||||
>💡 Se usa la version 3.3.0 o superior de Yarn para establecer esta version simplemente ejecuta el siguiente comando: `yarn set version 3.3.0`
|
||||
### 🚀 Iniciando
|
||||
|
||||
__Clonar repo rama dev__
|
||||
```
|
||||
@@ -14,14 +16,7 @@ git clone --branch dev https://github.com/leifermendez/bot-whatsapp
|
||||
__Instalar dependencias__
|
||||
```
|
||||
cd bot-whatsapp
|
||||
yarn set version 3.3.0
|
||||
yarn install
|
||||
npx husky install && npx prettier --write .
|
||||
```
|
||||
> __ATENCIÓN__ Si esta estas en ubuntu/linux ejecutar lo siguiente comandos adicionales.
|
||||
|
||||
```sheell
|
||||
chmod ug+x .husky/*
|
||||
```
|
||||
|
||||
__Compilar (build)__
|
||||
@@ -30,7 +25,9 @@ Para compilar la aplicación es necesario ejecutar, eso te genera dentro de pack
|
||||
```
|
||||
yarn build
|
||||
```
|
||||
Luego de ejecutar el comando conseguiras algo como lo siguiente. Esas carpetas lib NO se suben al repo estan ignoradas.
|
||||
|
||||
> (Solo informativo) Luego de ejecutar el comando conseguiras algo como lo siguiente. Esas carpetas lib NO se suben al repo ya estan ignoradas.
|
||||
|
||||
```
|
||||
packages/bot/lib
|
||||
packages/cli/lib
|
||||
@@ -39,16 +36,20 @@ packages/provider/lib
|
||||
```
|
||||
|
||||
__Linking__
|
||||
|
||||
Es el proceso que se realiza para poder hacer uso de los paquetes compilados en tu local.
|
||||
|
||||
```
|
||||
yarn link.dist
|
||||
```
|
||||
|
||||
__Example-app__
|
||||
Se ejecuta el CLI (Command Line Interface) para ayudarte a crear un app-bot de ejemplo
|
||||
```
|
||||
yarn run cli
|
||||
```
|
||||
|
||||
Abrir carpeta example-app-base
|
||||
Abrir carpeta __example-app-base__ y ejecutar
|
||||
```
|
||||
npm link @bot-whatsapp/bot -S
|
||||
npm link @bot-whatsapp/provider -S
|
||||
@@ -65,12 +66,7 @@ __commit:__ Los commit son semanticos esto quiere decir que deben cumplir un sta
|
||||
__push:__ Cada push ejecutar `yarn run test` el cual ejecuta los test internos que tienen que cumplir con __95% de cobertura__.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
> Documento en constaten actualización....
|
||||
|
||||
------
|
||||
- [Discord](https://link.codigoencasa.com/DISCORD)
|
||||
|
||||
8
config/banner.rollup.json
Normal file
8
config/banner.rollup.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"banner.output": [
|
||||
"/** \n",
|
||||
"* NO TOCAR ESTE ARCHIVO: Es generado automaticamente, si sabes lo que haces adelante ;)\n",
|
||||
"* de lo contrario mejor ir a la documentacion o al servidor de discord link.codigoencasa.com/DISCORD\n",
|
||||
"*/"
|
||||
]
|
||||
}
|
||||
16
package.json
16
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@bot-whatsapp/root",
|
||||
"version": "0.1.1",
|
||||
"version": "0.2.0-alpha.0",
|
||||
"description": "Bot de wahtsapp open source para MVP o pequeños negocios",
|
||||
"main": "app.js",
|
||||
"private": true,
|
||||
@@ -12,6 +12,7 @@
|
||||
"database:rollup": "rollup --config ./packages/database/rollup-database.config.js",
|
||||
"format:check": "prettier --check ./packages",
|
||||
"format:write": "prettier --write ./packages",
|
||||
"fmt.staged": "pretty-quick --staged",
|
||||
"lint:check": "eslint ./packages",
|
||||
"lint:fix": "eslint --fix ./packages",
|
||||
"build": "yarn run cli:rollup && yarn run bot:rollup && yarn run provider:rollup && yarn run database:rollup",
|
||||
@@ -61,16 +62,16 @@
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
"@rollup/plugin-replace": "^5.0.1",
|
||||
"c8": "^7.12.0",
|
||||
"commitizen": "^4.2.5",
|
||||
"conventional-changelog": "^3.1.25",
|
||||
"cross-env": "^7.0.3",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
"eslint": "^8.26.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"fs-extra": "^11.1.0",
|
||||
"git-cz": "^4.9.0",
|
||||
"husky": "^8.0.2",
|
||||
"only-allow": "^1.1.1",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier": "^2.8.0",
|
||||
"pretty-quick": "^3.1.3",
|
||||
"prompts": "^2.4.2",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^3.2.3",
|
||||
@@ -85,10 +86,5 @@
|
||||
"npm": "please-use-yarn",
|
||||
"yarn": ">=3"
|
||||
},
|
||||
"author": "Leifer Mendez <leifer33@gmail.com>",
|
||||
"config": {
|
||||
"commitizen": {
|
||||
"path": "git-cz"
|
||||
}
|
||||
}
|
||||
"author": "Leifer Mendez <leifer33@gmail.com>"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const banner = require('../../config/banner.rollup.json')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const { join } = require('path')
|
||||
@@ -7,6 +8,7 @@ const PATH = join(__dirname, 'lib', 'bundle.bot.cjs')
|
||||
module.exports = {
|
||||
input: join(__dirname, 'index.js'),
|
||||
output: {
|
||||
banner: banner['banner.output'].join(''),
|
||||
file: PATH,
|
||||
format: 'cjs',
|
||||
},
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const banner = require('../../config/banner.rollup.json')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const { join } = require('path')
|
||||
@@ -7,6 +8,7 @@ const PATH = join(__dirname, 'lib', 'cli', 'bundle.cli.cjs')
|
||||
module.exports = {
|
||||
input: join(__dirname, 'index.js'),
|
||||
output: {
|
||||
banner: banner['banner.output'].join(''),
|
||||
file: PATH,
|
||||
format: 'cjs',
|
||||
},
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const banner = require('../../config/banner.rollup.json')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
const { join } = require('path')
|
||||
|
||||
@@ -5,6 +6,7 @@ module.exports = [
|
||||
{
|
||||
input: join(__dirname, 'src', 'mock', 'index.js'),
|
||||
output: {
|
||||
banner: banner['banner.output'].join(''),
|
||||
file: join(__dirname, 'lib', 'mock', 'index.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
@@ -13,6 +15,7 @@ module.exports = [
|
||||
{
|
||||
input: join(__dirname, 'src', 'mongo', 'index.js'),
|
||||
output: {
|
||||
banner: banner['banner.output'].join(''),
|
||||
file: join(__dirname, 'lib', 'mongo', 'index.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
const banner = require('../../config/banner.rollup.json')
|
||||
const { join } = require('path')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
|
||||
@@ -5,6 +6,7 @@ module.exports = [
|
||||
{
|
||||
input: join(__dirname, 'src', 'web-whatsapp', 'index.js'),
|
||||
output: {
|
||||
banner: banner['banner.output'].join(''),
|
||||
file: join(__dirname, 'lib', 'web-whatsapp', 'index.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
@@ -13,6 +15,7 @@ module.exports = [
|
||||
{
|
||||
input: join(__dirname, 'src', 'twilio', 'index.js'),
|
||||
output: {
|
||||
banner: banner['banner.output'].join(''),
|
||||
file: join(__dirname, 'lib', 'twilio', 'index.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
@@ -21,6 +24,7 @@ module.exports = [
|
||||
{
|
||||
input: join(__dirname, 'src', 'mock', 'index.js'),
|
||||
output: {
|
||||
banner: banner['banner.output'].join(''),
|
||||
file: join(__dirname, 'lib', 'mock', 'index.cjs'),
|
||||
format: 'cjs',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user