You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# simplefrontend, the [Simple Frontend](<[https://](https://www.simplefrontend.dev/)>) CLI
2
2
3
+
A simple and straightforward CLI to help you setup and automate best practices and patterns for your frontend projects (formatting, linting, type checking) with end-to-end recipies (pre-push hook, CI/CD integration).
4
+
5
+
As the CLI will auto-detect your package manager, the only requirement for it to run is to be within an existing project root folder already installed (where you should have a `package.json` and an existing lock file).
@@ -35,15 +35,21 @@ export async function setupTypescript() {
35
35
});
36
36
37
37
if(isCancel(environment)){
38
-
cancel("typescript setup cancelled");
38
+
cancel("TypeScript setup cancelled");
39
39
return;
40
40
}
41
41
42
42
if(environment==="browser"){
43
-
log.info(
44
-
"Browser environment has a lot of branching possibilities, I recommend you follow the recommended configurations from Vite starters at https://vite.dev/guide/#trying-vite-online",
"For browser environments, I recommend you follow the recommended configurations from Vite starters at https://vite.dev/guide/#trying-vite-online. Do you want to open it now?",
Copy file name to clipboardExpand all lines: src/utils/package-manager.ts
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,19 +5,21 @@ import { execSync } from "node:child_process";
5
5
6
6
classPackageManagerDetector{
7
7
publicpackageManager: DetectResult;
8
+
publicpackageManagerError: string|null=null;
8
9
9
10
constructor(){
10
11
constpackageManager=detectSync();
11
12
if(!packageManager){
12
-
thrownewError(
13
-
"Not able to detect your package manager, make sure you have a lock file on disk first.",
14
-
);
13
+
this.packageManagerError=
14
+
"Unable to detect your package manager: simplefrontend CLI needs to run in an existing project root folder which is already installed (where you should have a `package.json` and an existing lock file).";
15
15
}
16
-
this.packageManager=packageManager;
16
+
// this is unsafe but we stop on errors within commands
0 commit comments