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

mern-x

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mern-x - npm Package Compare versions

Comparing version 1.0.22 to 1.0.23

61

my-npx-tool.js

@@ -1,27 +0,44 @@

// my-npx-tool.js
#!/usr/bin/env node
const { exec } = require('child_process');
const inquirer = require('inquirer');
const { promisify } = require('util');
const download = promisify(require('download-git-repo'));
inquirer.prompt([
{
type: 'input',
name: 'repoUrl',
message: 'Enter the URL of your Git repository:',
},
{
type: 'input',
name: 'projectName',
message: 'Enter the name of your project:',
},
])
.then(({ repoUrl, projectName }) => {
// Clone the repository
exec(`git clone ${repoUrl} ${projectName}`, (error, stdout, stderr) => {
if (error) {
console.error(`Error cloning repository: ${error}`);
return;
}
console.log(stdout);
console.error(stderr);
async function downloadBoilerplate(destination) {
const repoUrl = 'https://github.com/rupomsoft/MERN-Ecommerce';
try {
console.log('Downloading boilerplate...');
await download(repoUrl, destination);
console.log('Boilerplate downloaded successfully.');
} catch (error) {
console.error('Error downloading boilerplate:', error);
}
}
console.log('Repository cloned successfully!');
// Parse command-line arguments
const args = process.argv.slice(2);
// Run additional commands or setup if necessary
// For example:
// exec(`cd ${projectName} && npm install`, (error, stdout, stderr) => {
// if (error) {
// console.error(`Error installing dependencies: ${error}`);
// return;
// }
// console.log(stdout);
// console.error(stderr);
// Check if destination is provided
if (args[0]) {
const destination = args[0];
downloadBoilerplate(destination);
} else {
console.error('Please provide a destination.');
}
// console.log('Dependencies installed successfully!');
// });
});
});
{
"name": "mern-x",
"version": "1.0.22",
"version": "1.0.23",
"description": "MERN-X is a comprehensive full-stack framework designed to streamline the development of web applications using the popular MERN stack: MongoDB, Express.js, React, and Node.js. Built with simplicity and scalability in mind, MERN.js empowers developers to create robust and efficient applications from end to end.",

@@ -12,3 +12,6 @@ "scripts": {

"dependencies": {
"download-git-repo": "^3.0.2"
"axios": "^1.6.7",
"download-git-repo": "^3.0.2",
"inquirer": "^9.2.14",
"simple-git": "^3.22.0"
},

@@ -15,0 +18,0 @@ "bin": {

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