@parcel/create-react-app 2.10.4-nightly.3075 → 2.10.4-nightly.3093
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cli.js +7 -9
- package/lib/emoji.js +6 -12
- package/package.json +4 -4
package/lib/cli.js
CHANGED
@@ -57,9 +57,9 @@ function _promiseSpawn() {
|
|
57
57
|
};
|
58
58
|
return data;
|
59
59
|
}
|
60
|
-
function
|
60
|
+
function _rimraf() {
|
61
61
|
const data = _interopRequireDefault(require("rimraf"));
|
62
|
-
|
62
|
+
_rimraf = function () {
|
63
63
|
return data;
|
64
64
|
};
|
65
65
|
return data;
|
@@ -79,15 +79,14 @@ function _chalk() {
|
|
79
79
|
return data;
|
80
80
|
}
|
81
81
|
var emoji = _interopRequireWildcard(require("./emoji"));
|
82
|
-
function _getRequireWildcardCache(
|
83
|
-
function _interopRequireWildcard(
|
82
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
83
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
84
84
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
85
85
|
// flowlint-next-line untyped-import:off
|
86
86
|
// flowlint-next-line untyped-import:off
|
87
87
|
// flowlint-next-line untyped-import:off
|
88
88
|
const TEMPLATES_DIR = _path().default.resolve(__dirname, '../templates');
|
89
89
|
const ncp = (0, _util().promisify)(_ncp2().default);
|
90
|
-
const rimraf = (0, _util().promisify)(_rimraf2().default);
|
91
90
|
// eslint-disable-next-line no-console
|
92
91
|
const log = console.log;
|
93
92
|
_commander().default.name('create-react-app').version(_package.version).arguments('<path-to-new-app>').action(command => {
|
@@ -106,7 +105,7 @@ async function run(packagePath) {
|
|
106
105
|
try {
|
107
106
|
await createApp(_path().default.basename(packagePath), tempPath);
|
108
107
|
} catch (e) {
|
109
|
-
await
|
108
|
+
await (0, _rimraf().default)(tempPath);
|
110
109
|
throw e;
|
111
110
|
}
|
112
111
|
await _fs().default.promises.rename(tempPath, packagePath);
|
@@ -121,14 +120,13 @@ async function createApp(packageName, tempPath) {
|
|
121
120
|
log(emoji.progress, 'Initializing git repository...');
|
122
121
|
await git.init();
|
123
122
|
log(emoji.progress, 'Adding templates...');
|
124
|
-
async function writePackageJson() {
|
123
|
+
await Promise.all([async function writePackageJson() {
|
125
124
|
const packageJson = JSON.parse(await _fs().default.promises.readFile(_path().default.join(TEMPLATES_DIR, 'package.json'), 'utf8'));
|
126
125
|
await _fs().default.promises.writeFile(_path().default.join(tempPath, 'package.json'), JSON.stringify({
|
127
126
|
name: packageName,
|
128
127
|
...packageJson
|
129
128
|
}, null, 2));
|
130
|
-
}
|
131
|
-
await Promise.all([writePackageJson(), ncp(_path().default.join(TEMPLATES_DIR, 'default'), tempPath)]);
|
129
|
+
}(), ncp(_path().default.join(TEMPLATES_DIR, 'default'), tempPath)]);
|
132
130
|
log(emoji.progress, 'Installing packages...');
|
133
131
|
await installPackages(['parcel@nightly', 'postcss', '@babel/core'], {
|
134
132
|
cwd: tempPath,
|
package/lib/emoji.js
CHANGED
@@ -20,15 +20,9 @@ function isUnicodeSupported() {
|
|
20
20
|
const supportsEmoji = isUnicodeSupported();
|
21
21
|
|
22
22
|
// Fallback symbols for Windows from https://en.wikipedia.org/wiki/Code_page_437
|
23
|
-
const progress = supportsEmoji ? '⏳' : '∞';
|
24
|
-
exports.
|
25
|
-
const
|
26
|
-
exports.
|
27
|
-
const
|
28
|
-
exports.
|
29
|
-
const warning = supportsEmoji ? '⚠️' : '‼';
|
30
|
-
exports.warning = warning;
|
31
|
-
const info = supportsEmoji ? 'ℹ️' : 'ℹ';
|
32
|
-
exports.info = info;
|
33
|
-
const hint = supportsEmoji ? '💡' : 'ℹ';
|
34
|
-
exports.hint = hint;
|
23
|
+
const progress = exports.progress = supportsEmoji ? '⏳' : '∞';
|
24
|
+
const success = exports.success = supportsEmoji ? '✨' : '√';
|
25
|
+
const error = exports.error = supportsEmoji ? '🚨' : '×';
|
26
|
+
const warning = exports.warning = supportsEmoji ? '⚠️' : '‼';
|
27
|
+
const info = exports.info = supportsEmoji ? 'ℹ️' : 'ℹ';
|
28
|
+
const hint = exports.hint = supportsEmoji ? '💡' : 'ℹ';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/create-react-app",
|
3
|
-
"version": "2.10.4-nightly.
|
3
|
+
"version": "2.10.4-nightly.3093+3e7d56816",
|
4
4
|
"bin": {
|
5
5
|
"parcel-create-react-app": "lib/bin.js"
|
6
6
|
},
|
@@ -25,8 +25,8 @@
|
|
25
25
|
"command-exists": "^1.2.6",
|
26
26
|
"commander": "^7.0.0",
|
27
27
|
"ncp": "^2.0.0",
|
28
|
-
"rimraf": "^
|
29
|
-
"simple-git": "^
|
28
|
+
"rimraf": "^5.0.5",
|
29
|
+
"simple-git": "^3.21.0",
|
30
30
|
"tempy": "^0.2.1",
|
31
31
|
"v8-compile-cache": "^2.0.0"
|
32
32
|
},
|
@@ -34,5 +34,5 @@
|
|
34
34
|
"@babel/core": "^7.22.11",
|
35
35
|
"@parcel/babel-register": "2.10.3"
|
36
36
|
},
|
37
|
-
"gitHead": "
|
37
|
+
"gitHead": "3e7d56816da81fd30b8906c9d5f389401373029f"
|
38
38
|
}
|