create-react-app-custom
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,3 +0,5 @@ | ||
var Start = require("./index"); | ||
#!/usr/bin/env node | ||
console.log(Start()); | ||
var Start = require('./index') | ||
console.log(Start()) |
20
index.js
@@ -1,23 +0,25 @@ | ||
"use strict"; | ||
'use strict' | ||
const fs = require("fs-extra"); | ||
const fs = require('fs-extra') | ||
function Start() { | ||
GenerateApp(); | ||
return "Your ReactAppCustom has been generated correctly"; | ||
GenerateApp() | ||
return 'Your project has been generated correctly' | ||
} | ||
function GenerateApp() { | ||
try { | ||
fs.copy(`${__dirname}/app`, `${process.cwd()}/${NameFolder()}`); | ||
fs.copy(`${__dirname}/app`, `${process.cwd()}/${NameFolder()}`) | ||
} catch (err) { | ||
return "An error has ocurred"; | ||
return 'An error has ocurred' | ||
} | ||
} | ||
function NameFolder() { | ||
const name = process.argv.slice(2)[0]; | ||
return name === undefined ? "myReactApp" : name; | ||
const name = process.argv.slice(2)[0] | ||
return (name === undefined) ? "myReactApp" : name | ||
} | ||
module.exports = Start; | ||
module.exports = Start |
{ | ||
"_from": "create-react-app-custom", | ||
"_id": "create-react-app-custom@1.0.0", | ||
"_id": "create-react-app-custom@1.0.1", | ||
"_inBundle": false, | ||
"_integrity": "sha512-RaRV3NmQE8DqWald/vkId727X5EZf+mU67nWSMSseP3Y1QqXaMD9lSvwrjV0SpseDVy/9yVEewv8sKJKSC9W7A==", | ||
"_integrity": "sha512-RaRV3NmQE8DqWald/vkId727X5EZf+mU67nWSMSseP3Y1QqXaMD9lSvwrjV0SpseDVy/9yVEewv8sKJKSC9W7B==", | ||
"_location": "/create-react-app-custom", | ||
@@ -21,4 +21,4 @@ "_phantomChildren": {}, | ||
], | ||
"_resolved": "https://registry.npmjs.org/create-react-app-custom/-/create-react-app-custom-1.0.0.tgz", | ||
"_shasum": "5ea366f91e38b3dbb66d803fa215a55c672d2bd4", | ||
"_resolved": "https://registry.npmjs.org/create-react-app-custom/-/create-react-app-custom-1.0.1.tgz", | ||
"_shasum": "5ea366f91e38b3dbb66d803fa215a55c672d2bd8", | ||
"_spec": "create-react-app-custom", | ||
@@ -63,3 +63,3 @@ "_where": "C:\\Users\\Juan Manuel", | ||
}, | ||
"version": "1.0.0" | ||
} | ||
"version": "1.0.1" | ||
} |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
81231
162