mirror of
https://github.com/cheveguerra/bot-whatsapp.git
synced 2026-04-20 12:39:24 +00:00
fix(cli): 🔥 create script - templates
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env node
|
||||
const main = require('../lib/bin/bundle.create.cjs')
|
||||
const main = require('../lib/bundle.create-bot-whatsapp.cjs')
|
||||
main()
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
const { startInteractive } = require('@bot-whatsapp/cli')
|
||||
/**
|
||||
* Main function
|
||||
* Voy a llamar directo a CLI
|
||||
* Temporalmente luego mejoro esta
|
||||
* parte
|
||||
* @returns
|
||||
*/
|
||||
const main = () => {
|
||||
console.clear()
|
||||
console.log(``)
|
||||
console.log(`[PostInstall]: Este es el main function.`)
|
||||
console.log(`[PostInstall]: 👌 Aqui podrias instalar cosas`)
|
||||
console.log(``)
|
||||
}
|
||||
const main = () => startInteractive()
|
||||
|
||||
module.exports = main
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
{
|
||||
"name": "create-bot-whatsapp",
|
||||
"version": "0.0.9-alpha.0",
|
||||
"version": "0.0.13-alpha.0",
|
||||
"description": "",
|
||||
"main": "./lib/bin/bundle.create.cjs",
|
||||
"main": "./lib/bundle.create-bot-whatsapp.cjs",
|
||||
"files": [
|
||||
"./starters/",
|
||||
"./bin/create.js",
|
||||
"./lib/bundle.create-bot-whatsapp.cjs"
|
||||
],
|
||||
"bin": "./bin/create.js",
|
||||
"dependencies": {
|
||||
"@bot-whatsapp/cli": "*"
|
||||
},
|
||||
"bin": {
|
||||
"bot": "./lib/bin/bundle.create.cjs"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
const banner = require('../../config/banner.rollup.json')
|
||||
const commonjs = require('@rollup/plugin-commonjs')
|
||||
const copy = require('rollup-plugin-copy')
|
||||
const { nodeResolve } = require('@rollup/plugin-node-resolve')
|
||||
const { join } = require('path')
|
||||
|
||||
const PATH = join(__dirname, 'lib', 'bin', 'bundle.create.cjs')
|
||||
const PATH = join(__dirname, 'lib', 'bundle.create-bot-whatsapp.cjs')
|
||||
|
||||
module.exports = {
|
||||
input: join(__dirname, 'index.js'),
|
||||
@@ -12,5 +13,11 @@ module.exports = {
|
||||
file: PATH,
|
||||
format: 'cjs',
|
||||
},
|
||||
plugins: [commonjs(), nodeResolve()],
|
||||
plugins: [
|
||||
copy({
|
||||
targets: [{ src: 'starters/*', dest: join(__dirname, 'starters') }],
|
||||
}),
|
||||
commonjs(),
|
||||
nodeResolve(),
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user