Socket
Socket
Sign inDemoInstall

create-nexus-app

Package Overview
Dependencies
67
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.3 to 1.1.4

106

nexus.js

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

const { exec } = require("child_process");
const path = require('path');
const fs = require('fs');
async function main(){

@@ -38,5 +41,5 @@ const inquirerModule = await import("inquirer");

]);
const ora = (await import('ora')).default;
if (answers.template === "Dashboard") {
try{
try {
const emitter = degit('NexusDesignSystem/template-dashboard', {

@@ -47,20 +50,28 @@ cache: false,

});
emitter.clone(`${answers.projectName}`).then(() => {
console.log('Dashboard repository cloned successfully!');
});
await emitter.clone(`${answers.projectName}`);
console.log('Dashboard repository cloned successfully!');
const projectPath = path.resolve(process.cwd(), answers.projectName);
if (fs.existsSync(projectPath)) {
process.chdir(projectPath);
const spinner = ora('Installing dependencies...').start(); // Create a loading spinner
exec("npm i", (error) => {
if (error) {
console.error("Error installing dependencies:", error);
return;
}
console.log("Dependencies installed successfully.");
});
exec("npm i", (error) => {
spinner.stop(); // Stop the spinner when 'npm i' is done
if (error) {
console.error("Error installing dependencies:", error);
return;
}
console.log("Dependencies installed successfully.");
});
} else {
console.error("Project directory not found:", projectPath);
}
} catch (error) {
console.error("Error creating dashboard", error);
}
catch(error){
console.error("Error creating dashboard",error);
}
}
}
else if (answers.template == "Landing Page") {

@@ -74,8 +85,15 @@ try{

emitter.clone(`${answers.projectName}`).then(() => {
console.log("Landing Page repository cloned successfully!")
});
await emitter.clone(`${answers.projectName}`);
console.log('Dashboard repository cloned successfully!');
const projectPath = path.resolve(process.cwd(), answers.projectName);
if (fs.existsSync(projectPath)) {
process.chdir(projectPath);
const spinner = ora('Installing dependencies...').start(); // Create a loading spinner
exec("npm i", (error) => {
spinner.stop(); // Stop the spinner when 'npm i' is done
if (error) {

@@ -87,8 +105,9 @@ console.error("Error installing dependencies:", error);

});
} else {
console.error("Project directory not found:", projectPath);
}
catch(error){
console.error("Error creating blank template",error);
}
}
} catch (error) {
console.error("Error creating dashboard", error);
}
}
else if(answers.template == "Blank Template") {

@@ -102,8 +121,15 @@ try{

emitter.clone(`${answers.projectName}`).then(() => {
console.log('Blank Template repository cloned successfully!"');
});
await emitter.clone(`${answers.projectName}`);
console.log('Dashboard repository cloned successfully!');
const projectPath = path.resolve(process.cwd(), answers.projectName);
if (fs.existsSync(projectPath)) {
process.chdir(projectPath);
const spinner = ora('Installing dependencies...').start(); // Create a loading spinner
exec("npm i", (error) => {
spinner.stop(); // Stop the spinner when 'npm i' is done
if (error) {

@@ -115,16 +141,10 @@ console.error("Error installing dependencies:", error);

});
} else {
console.error("Project directory not found:", projectPath);
}
catch(error){
console.error("Error creating blank template",error);
}
}
else {
console.log(`Unsupported template: ${answers.framework}`);
} catch (error) {
console.error("Error creating dashboard", error);
}
console.log("Project initialized successfully!");
}
}
main();
{
"dependencies": {
"child_process": "^1.0.2",
"degit": "^2.8.4",
"inquirer": "^9.2.11",
"child_process": "^1.0.2"
"ora": "^7.0.1"
},
"name": "create-nexus-app",
"version": "1.1.3",
"version": "1.1.4",
"bin": {

@@ -10,0 +11,0 @@ "create-nexus-app": "./nexus.js"

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc