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

dev3cli

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dev3cli - npm Package Compare versions

Comparing version 0.0.11 to 0.0.12

libs/init/create-files/readme.js

9

index.js

@@ -15,4 +15,7 @@ #!/usr/bin/env node

const fs = require('fs-extra')
const { log, error } = require('./libs/helper')
const { log, error, getIPAddress } = require('./libs/helper')
const { createReadmeFile } = require('./libs/init/create-files')
const ipAddress = getIPAddress()
program.version(pkg.version)

@@ -43,2 +46,3 @@

shell.exec(`npm i`)
createReadmeFile(name)
echoEndedInfo(name)

@@ -89,4 +93,5 @@ return

npm run dev
The project will run at http://0.0.0.0:4000 or http://localhost/:4000
The project will run at
http://${ipAddress}:4000 or http://localhost:4000
`)
}

@@ -40,5 +40,20 @@ /**

function getIPAddress() {
const interfaces = require('os').networkInterfaces()
let temp
for (let devName in interfaces) {
temp = interfaces[devName]
for (let i = 0; i < temp.length; i++) {
let alias = temp[i]
if (alias.family === 'IPv4' && alias.address !== '127.0.0.1' && !alias.internal) {
return alias.address
}
}
}
}
module.exports = {
log,
error,
getIPAddress,
warn,

@@ -45,0 +60,0 @@ info,

@@ -14,2 +14,3 @@ /**

const { createReact } = require('./react')
const { createReadmeFile } = require('./readme')

@@ -24,24 +25,3 @@ function createFiles(entry, name, arr) {

// create README.md
const readmeCode = [
`# ${name}`,
BLANK_LINE,
'This project was created by the <a href="https://github.com/capricorncd/dev3cli" target="_blank">dev3cli</a> command tool.',
'https://github.com/capricorncd/dev3cli',
BLANK_LINE,
'## Build Setup',
BLANK_LINE,
'```bash',
'# serve with hot reload at localhost:4000',
'$ npm run dev',
'# or',
'$ yarn dev',
BLANK_LINE,
'# build static project',
'$ npm run build',
'# or',
'$ yarn build',
'```',
]
fs.writeFileSync('README.md', readmeCode.join(SYS_EOL))
createReadmeFile(name)

@@ -95,3 +75,4 @@ // create js/vue/react files

module.exports = {
createFiles
createFiles,
createReadmeFile,
}
{
"name": "dev3cli",
"version": "0.0.11",
"version": "0.0.12",
"description": "Quickly build command line interface for Web development environment.",
"main": "index.js",
"bin": {
"dev3cli": "./index.js"
},
"bin": "./index.js",
"scripts": {

@@ -10,0 +8,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

@@ -118,2 +118,3 @@ //__HEADER__

// publicPath: './dist',
useLocalIp: true,
host: '0.0.0.0',

@@ -120,0 +121,0 @@ port: 4000

@@ -22,2 +22,3 @@ /**

host: '0.0.0.0',
port: 4000,
// https://github.com/http-party/node-http-proxy#options

@@ -24,0 +25,0 @@ proxy: {

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