mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-17 19:26:23 +00:00
extends conditional class
This commit is contained in:
9
packages/database/classes/database.class.js
Normal file
9
packages/database/classes/database.class.js
Normal file
@@ -0,0 +1,9 @@
|
||||
class DatabaseClass {
|
||||
constructor() {}
|
||||
|
||||
saveLog = (ctx) => {
|
||||
return ctx
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DatabaseClass
|
||||
12
packages/database/index.js
Normal file
12
packages/database/index.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const DatabaseClass = require('./classes/database.class')
|
||||
|
||||
/**
|
||||
* Crear instancia de clase
|
||||
* @param {*} args
|
||||
* @returns
|
||||
*/
|
||||
const create = (args) => {
|
||||
return new DatabaseClass(args)
|
||||
}
|
||||
|
||||
module.exports = { create }
|
||||
11
packages/database/package.json
Normal file
11
packages/database/package.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "@bot-whatsapp/database",
|
||||
"version": "0.0.1",
|
||||
"description": "Esto es el conector a mysql, pg, mongo",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {}
|
||||
}
|
||||
10
packages/database/rollup-cli.config.js
Normal file
10
packages/database/rollup-cli.config.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
|
||||
module.exports = {
|
||||
input: 'index.js',
|
||||
output: {
|
||||
file: 'lib/database/bundle.database.cjs',
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [commonjs()],
|
||||
}
|
||||
Reference in New Issue
Block a user