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

aeboilerplate

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aeboilerplate - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

62

cli.js

@@ -5,2 +5,3 @@ #!/usr/bin/env node

const shell = require('shelljs')
const colors = require('colors')

@@ -11,33 +12,46 @@ program

.action(function(projectName) {
console.log('Creating project: ', projectName)
logStep(`Preparing AEboilerplate full-stack project: ${projectName}`)
cloneAeboilerplateProject(projectName)
executeAeboilerplate(projectName)
})
.version('0.0.1', '-v, --version')
.parse(process.argv)
let gitUrl
if (typeof argumentProjectName === 'undefined') {
console.error('Please specify the project name:\n')
console.error('aeboilerplate'.cyan, '<project-name> [--https]'.yellow)
console.error('\nFor example:\n')
console.error('aeboilerplate'.cyan, 'my-full-stack-app'.yellow)
console.error('\n<project-name> is the name of the project that you would like to create using AEboilerplate.')
console.error('[--https] to use https instead of ssh to clone from github.')
process.exit(1)
}
if (program.https) {
gitUrl = 'https://github.com/agencyenterprise/aeboilerplate.git'
} else {
gitUrl = 'git@github.com:agencyenterprise/aeboilerplate.git'
}
function logStep(message) {
console.log(`${message}\n`.cyan)
}
// Needed by commander to set a global variable to check for an empty argument
argumentProjectName = projectName
function cloneAeboilerplateProject(projectName) {
let gitUrl
if (shell.exec(`git clone ${gitUrl} ${projectName}`).code !== 0) {
console.log(`Error! Git clone failed for URL: ${gitUrl}`)
process.exit(1)
}
if (program.https) {
gitUrl = 'https://github.com/agencyenterprise/aeboilerplate.git'
} else {
gitUrl = 'git@github.com:agencyenterprise/aeboilerplate.git'
}
shell.cd(projectName)
shell.exec(`npm run aeboilerplate`)
})
// Needed by commander to set a global variable to check for an empty argument
argumentProjectName = projectName
.version('0.0.1', '-v, --version')
.parse(process.argv)
logStep(`Cloning ${gitUrl}`)
if (shell.exec(`git clone ${gitUrl} ${projectName}`).code !== 0) {
console.log(`Error! Git clone failed for URL: ${gitUrl}\n`.red)
process.exit(1)
}
}
if (typeof argumentProjectName === 'undefined') {
console.error('\nError: Project name was not specified.')
console.log('Try: aeboilerplate <projectName> [-ssh]')
console.log('Where <projectName> is the name of the project that you would like to initiate using AEboilerplate.')
console.log(' --https Use https instead of ssh to clone from github.')
process.exit(1)
function executeAeboilerplate(projectName) {
logStep(`\nExecuting AEboilerplate generator`)
shell.cd(projectName)
shell.exec(`npm run aeboilerplate`)
}
{
"name": "aeboilerplate",
"version": "0.0.1",
"version": "0.0.2",
"description": "Global scripts to create new full-stack projects using aeboilerplate",

@@ -20,2 +20,3 @@ "main": "index.js",

"dependencies": {
"colors": "^1.3.2",
"commander": "^2.19.0",

@@ -22,0 +23,0 @@ "shelljs": "^0.8.3"

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