@atlaspack/parcel-to-atlaspack 2.12.1-dev.3368 → 2.12.1-dev.3443
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/README.md +34 -0
- package/dist/migrations/migrate-parcelrc.js +1 -1
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @atlaspack/parcel-to-atlaspack
|
|
2
|
+
|
|
3
|
+
This package exposes a CLI that can be used to migrate a Parcel application to Atlaspack
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install -g @atlaspack/parcel-to-atlaspack
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
parcel-to-atlaspack
|
|
15
|
+
parcel-to-atlaspack --dry-run
|
|
16
|
+
parcel-to-atlaspack --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
This CLI supports the following features:
|
|
22
|
+
|
|
23
|
+
- Replace parcel dependencies with atlaspack in `package.json`
|
|
24
|
+
- Rename `.parcelrc` files to `.atlaspackrc`
|
|
25
|
+
- Update `@parcel/` plugin references to `@atlaspack` in both `.atlaspackrc` and `package.json`
|
|
26
|
+
- Update `package.json#engines` to reference atlaspack instead of parcel
|
|
27
|
+
|
|
28
|
+
## Development Workflow
|
|
29
|
+
|
|
30
|
+
```sh
|
|
31
|
+
yarn workspace @atlaspack/parcel-to-atlaspack start
|
|
32
|
+
yarn workspace @atlaspack/parcel-to-atlaspack start --dry-run
|
|
33
|
+
yarn workspace @atlaspack/parcel-to-atlaspack start --help
|
|
34
|
+
```
|
|
@@ -27,7 +27,7 @@ async function migrateParcelRc({ cwd, dryRun }) {
|
|
|
27
27
|
await (0, promises_1.writeFile)(parcelrcPath, atlaspckrc);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
|
-
const atlaspackrcPath = (0, node_path_1.join)((0, node_path_1.dirname)(parcelrcPath), '.atlaspackrc');
|
|
30
|
+
const atlaspackrcPath = (0, node_path_1.join)((0, node_path_1.dirname)(parcelrcPath), (0, node_path_1.basename)(parcelrcPath).replace('.parcelrc', '.atlaspackrc'));
|
|
31
31
|
if (dryRun) {
|
|
32
32
|
console.log(chalk.blue('[INFO]'), `Renamed ${(0, node_path_1.relative)(cwd, parcelrcPath)}`);
|
|
33
33
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/parcel-to-atlaspack",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3443+d1170cfc7",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
7
7
|
},
|
|
8
|
-
"license": "MIT",
|
|
8
|
+
"license": "(MIT OR Apache-2.0)",
|
|
9
9
|
"main": "dist/cli.js",
|
|
10
10
|
"bin": {
|
|
11
11
|
"parcel-to-atlaspack": "dist/bin.js"
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "d1170cfc79beb290b2a066f472f68f71f7d7cb23"
|
|
38
38
|
}
|