Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chexiu-cli

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chexiu-cli - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

templates/vue-js/.browserslistrc

23

bin/chexiu.js

@@ -17,8 +17,17 @@ #!/usr/bin/env node

const options = {
templateName: 'vue',
src: process.cwd()
}
program
.command('create <pwd>')
.option('--js', '使用js版本')
.description('创建一个项目')
.action((dir, command) => {
if (command.js) {
options.templateName = 'vue-js'
}
const Create = require('../scripts/create.js')
const create = new Create(dir, process.cwd()).create()
const create = new Create(dir, options).create()
create

@@ -40,9 +49,9 @@ .then(async () => {

program
.command('rm <dir>')
.option('-r, --recursive', 'Remove recursively')
.action(function (dir, cmdObj) {
console.log('remove ' + dir + (cmdObj.recursive ? ' recursively' : ''))
})
// program
// .command('rm <dir>')
// .option('-r, --recursive', 'Remove recursively')
// .action(function (dir, cmdObj) {
// console.log('remove ' + dir + (cmdObj.recursive ? ' recursively' : ''))
// })
program.parse(process.argv)
{
"name": "chexiu-cli",
"version": "1.0.9",
"version": "1.1.0",
"description": "这是一个cli",

@@ -5,0 +5,0 @@ "module": "esm",

@@ -7,4 +7,5 @@ const fs = require('fs-extra')

src = __dirname
constructor(name, src) {
console.log('name, path: ', name, src)
templateName = 'vue'
constructor(name, options) {
const { templateName, src } = options
this.name = name || this.name

@@ -15,2 +16,3 @@ if (!src) {

this.src = src
this.templateName = templateName
this.projectPath = path.resolve(this.src, this.name)

@@ -34,3 +36,3 @@ }

fs.copy(path.resolve(__dirname, '../templates/vue'), this.projectPath)
fs.copy(path.resolve(__dirname, `../templates/${this.templateName}`), this.projectPath)
.then(() => {

@@ -37,0 +39,0 @@ resolve()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc