1. Upload generic content from vue Base Scaffolding + project to Github

2. Upload the environment dependency package that you downloaded your scaffolding to NPM

3. Use NPM I LCJ-vue-CLI to install dependency packages

4. Run the lcj-vue-cli init command to download the project uploaded on Github

Dependency package main code

#! /usr/bin/env node const program = require('commander'); const fs = require('fs') const inquirer = require('inquirer') const chalk = require('chalk') const { exec } = Require (' child_process) program. The version (' 1.0.0 ', '- v, --version').command('init').action(() => {inquirer. Prompt ([{type: 'input', // problem type: fill in the blank message: 'your projectName:', // Problem description name: 'projectName', // problem description attribute validate: (val) => {if (val === "") {return chalk. Red (' The project name cannot be empty, Return true}}]). Then (answer => {console.log(chalk. Green (' start initializing file \n')) Console. log(chalk. Gray (' Initializing... ')) const gitUrl = 'https://github.com/Daisylcj/lcj-cli-vue.git' exec(`git clone ${gitUrl} ${answer.projectName}`, (error, stdout, Stderr) => {if (error) {// Print an error if there is an error and exit console.log(chalk. Red (error)) process.exit()} fs.readFile(`${process.cwd()}/${answer.projectName}/package.json`, (err, Parse (data.toString()) data.name => {if (error) {console.log(chalk. Red (' read file failed ')) process.exit()} data = json.parse (data.tostring ()) data.name =  answer.projectName fs.writeFile(`${process.cwd()}/${answer.projectName}/package.json`, JSON.stringify(data, "", "\t"), Err => {if (err) {console.log(chalk. Red (' failed to write to file ')) process.exit()} console.log(chalk. Green (' initialization completed ')) process.exit() })})})})}); program.parse(process.argv);Copy the code