@parcel/create-react-app
Advanced tools
Comparing version 2.0.0-nightly.2377 to 2.0.0-nightly.2380
@@ -13,12 +13,4 @@ "use strict"; | ||
function _package() { | ||
const data = require("../package.json"); | ||
var _package = require("../package.json"); | ||
_package = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _simpleGit() { | ||
@@ -124,12 +116,4 @@ const data = _interopRequireDefault(require("simple-git")); | ||
function emoji() { | ||
const data = _interopRequireWildcard(require("./emoji")); | ||
var emoji = _interopRequireWildcard(require("./emoji")); | ||
emoji = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; } | ||
@@ -151,6 +135,6 @@ | ||
_commander().default.name('create-react-app').version(_package().version).arguments('<path-to-new-app>').action(command => { | ||
_commander().default.name('create-react-app').version(_package.version).arguments('<path-to-new-app>').action(command => { | ||
run(command).catch(reason => { | ||
// eslint-disable-next-line no-console | ||
console.error((0, _chalk().default)`${emoji().error} {red ${reason.message}}`); | ||
console.error((0, _chalk().default)`${emoji.error} {red ${reason.message}}`); | ||
process.exit(1); | ||
@@ -161,3 +145,3 @@ }); | ||
async function run(packagePath) { | ||
log((0, _chalk().default)`${emoji().progress} {green Creating Parcel app at}`, _chalk().default.bold.underline(packagePath)); | ||
log((0, _chalk().default)`${emoji.progress} {green Creating Parcel app at}`, _chalk().default.bold.underline(packagePath)); | ||
@@ -178,14 +162,14 @@ if (await fsExists(packagePath)) { | ||
await _fs().default.promises.rename(tempPath, packagePath); | ||
log((0, _chalk().default)`{green ${emoji().success} Successfully created a new Parcel app at {bold.underline ${packagePath}}.}`); | ||
log((0, _chalk().default)`${emoji().info} {dim Run} {bold cd ${packagePath}} {dim and then} {bold ${usesYarn ? 'yarn' : 'npm run'} start} {dim to start developing with Parcel.}`); | ||
log((0, _chalk().default)`{green ${emoji.success} Successfully created a new Parcel app at {bold.underline ${packagePath}}.}`); | ||
log((0, _chalk().default)`${emoji.info} {dim Run} {bold cd ${packagePath}} {dim and then} {bold ${usesYarn ? 'yarn' : 'npm run'} start} {dim to start developing with Parcel.}`); | ||
} | ||
async function createApp(packageName, tempPath) { | ||
log(emoji().progress, 'Creating package directory...'); | ||
log(emoji.progress, 'Creating package directory...'); | ||
const git = (0, _simpleGit().default)({ | ||
baseDir: tempPath | ||
}); | ||
log(emoji().progress, 'Initializing git repository...'); | ||
log(emoji.progress, 'Initializing git repository...'); | ||
await git.init(); | ||
log(emoji().progress, 'Adding templates...'); | ||
log(emoji.progress, 'Adding templates...'); | ||
@@ -201,3 +185,3 @@ async function writePackageJson() { | ||
await Promise.all([writePackageJson(), ncp(_path().default.join(TEMPLATES_DIR, 'default'), tempPath)]); | ||
log(emoji().progress, 'Installing packages...'); | ||
log(emoji.progress, 'Installing packages...'); | ||
await installPackages(['parcel@nightly', 'postcss', '@babel/core'], { | ||
@@ -210,3 +194,3 @@ cwd: tempPath, | ||
}); | ||
log(_chalk().default.green(emoji().progress, 'Creating initial commit...')); | ||
log(_chalk().default.green(emoji.progress, 'Creating initial commit...')); | ||
await git.add('.'); | ||
@@ -227,3 +211,3 @@ await git.commit('Initial commit created with @parcel/create-react-app'); | ||
async function installPackages(packageExpressions, opts) { | ||
log(emoji().progress, (0, _chalk().default)`{dim Installing}`, _chalk().default.bold(...packageExpressions)); | ||
log(emoji.progress, (0, _chalk().default)`{dim Installing}`, _chalk().default.bold(...packageExpressions)); | ||
@@ -230,0 +214,0 @@ if (usesYarn == null) { |
{ | ||
"name": "@parcel/create-react-app", | ||
"version": "2.0.0-nightly.2377+79923ce5", | ||
"version": "2.0.0-nightly.2380+ba548ef0", | ||
"bin": { | ||
@@ -29,5 +29,5 @@ "parcel-create-react-app": "lib/bin.js" | ||
"devDependencies": { | ||
"@parcel/babel-register": "2.0.0-nightly.755+79923ce5" | ||
"@parcel/babel-register": "2.0.0-nightly.758+ba548ef0" | ||
}, | ||
"gitHead": "79923ce52238f293c1dfec60f152996c73461c4c" | ||
"gitHead": "ba548ef0165e105565d31a87647edda999fbfb75" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
310377
254