@atomicsmash/cli 11.0.0-beta.2 → 11.0.0-beta.3
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 +9 -9
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +2 -11
- package/dist/index.js +0 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,18 +10,18 @@ smash-cli --help
|
|
|
10
10
|
|
|
11
11
|
## Development
|
|
12
12
|
|
|
13
|
-
To
|
|
13
|
+
To work on this package, navigate to the root of the project and run:
|
|
14
14
|
|
|
15
|
-
1. `nvm use`
|
|
15
|
+
1. `nvm use` - This will set the correct node environment (this is important for permissions for the following step)
|
|
16
|
+
2. `npm install`
|
|
17
|
+
3. `npm run dev` - To start tracking file changes and will transpile all `.ts` files down into usable `.js` files in dist.
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
2. `npm link`
|
|
19
|
+
Once these commands are done, you're ready to start working on this project. Check the "CHECKLISTS" file for a checklist of tasks for any development work.
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
## Run the package locally
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Navigate to the project/site you would like to work on, then run your selected command using:
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
`npx <Absolute path to project>/packages/packages/cli <command>`
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Instead of a package name from the npm registry, this points directly to a local directory on disk; npx will look inside that folder's package.json for the bin entry and execute it.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,QAAQ,kDAAkD,CAAC;AACxE,wBAAsB,OAAO,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/commands/setup.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO,UAAU,CAAC;AAC/B,eAAO,MAAM,QAAQ,kDAAkD,CAAC;AACxE,wBAAsB,OAAO,kBAiQ5B"}
|
package/dist/commands/setup.js
CHANGED
|
@@ -72,25 +72,16 @@ export async function handler() {
|
|
|
72
72
|
!existsSync(resolve(process.cwd(), "herd.yml"))) {
|
|
73
73
|
throw new Error("Herd is present on your machine, but the project is missing a herd.yaml file. Please do the initial setup by running herd init.");
|
|
74
74
|
}
|
|
75
|
-
await execute(`herd init`)
|
|
76
|
-
.then(() => {
|
|
77
|
-
performance.mark("herd init done");
|
|
78
|
-
console.log(`Herd is configured. (${convertMeasureToPrettyString(performance.measure("herd-or-valet", "Start"))})`);
|
|
79
|
-
})
|
|
80
|
-
.catch((error) => {
|
|
81
|
-
console.error(error);
|
|
82
|
-
throw new Error("Failed to configure the site using Herd.");
|
|
83
|
-
});
|
|
84
75
|
await execute(`herd link ${projectName} --secure`)
|
|
85
76
|
.then(() => {
|
|
86
77
|
performance.mark("herd link done");
|
|
87
|
-
console.log(`Herd is linked and secured. (${convertMeasureToPrettyString(performance.measure("herd link", "
|
|
78
|
+
console.log(`Herd is linked and secured. (${convertMeasureToPrettyString(performance.measure("herd link", "Start"))})`);
|
|
88
79
|
})
|
|
89
80
|
.catch((error) => {
|
|
90
81
|
console.error(error);
|
|
91
82
|
throw new Error("Failed to link the site using Herd.");
|
|
92
83
|
});
|
|
93
|
-
await execute(`herd isolate`)
|
|
84
|
+
await execute(`herd isolate --site=${projectName}`)
|
|
94
85
|
.then(() => {
|
|
95
86
|
console.log(`Herd is isolated. (${convertMeasureToPrettyString(performance.measure("herd isolate", "herd link done"))})`);
|
|
96
87
|
clearTimeout(timeout);
|
package/dist/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|