8000 cli v0.1.0 by softmarshmallow · Pull Request #176 · gridaco/code · GitHub
[go: up one dir, main page]

Skip to content

cli v0.1.0 #176

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 27 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
95f1fc2
update no project root found message
softmarshmallow Aug 12, 2022
5937190
add fpat prompt for `grida code` command
softmarshmallow Aug 12, 2022
fb7585f
update init proc
softmarshmallow Aug 12, 2022
e1bb7c3
add framework prompt for `grida code x` command
softmarshmallow Aug 12, 2022
8cd66a8
add pacakge.json insert (write only)
softmarshmallow Aug 13, 2022
fad4513
add npm package manager
softmarshmallow Aug 13, 2022
6813472
add init package.json
softmarshmallow Aug 13, 2022
dd1c712
add global error message handling
softmarshmallow Aug 13, 2022
dce8649
update logging
softmarshmallow Aug 13, 2022
a634d0b
add npm initializer based on givven framework config
softmarshmallow Aug 13, 2022
4c21c99
organize
softmarshmallow Aug 13, 2022
4a4b60a
v0.0.16
softmarshmallow Aug 13, 2022
d4e0205
update readme
softmarshmallow Aug 13, 2022
2d6540a
rm cache flag when installing npm
softmarshmallow Aug 13, 2022
6e5f53e
v0.0.18
softmarshmallow Aug 13, 2022
acc5829
Merge branch 'main' of https://github.com/gridaco/designto-code into cli
softmarshmallow Aug 15, 2022
d3b2b91
add fpat doc link
softmarshmallow Aug 15, 2022
543ee53
add login & logout to grida cli
softmarshmallow Aug 15, 2022
a8dd2db
v0.0.19
softmarshmallow Aug 15, 2022
e227a9a
Merge branch 'main' of https://github.com/gridaco/designto-code into cli
softmarshmallow Aug 20, 2022
18520df
0.0.20 hotfix
softmarshmallow Aug 20, 2022
f2f37d2
add runtime env loader
softmarshmallow Aug 29, 2022
68169b7
fix .env syncer
softmarshmallow Aug 29, 2022
88a7138
v0.0.21
softmarshmallow Aug 29, 2022
586caff
update .env seeding line format
softmarshmallow Sep 11, 2022
0aca463
update npm keywords
softmarshmallow Sep 23, 2022
230c303
v0.0.22
softmarshmallow Sep 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8000 Prev Previous commit
Next Next commit
add runtime env loader
  • Loading branch information
softmarshmallow committed Aug 29, 2022
commit f2f37d230a9643aea72c0d65ecc55e2847acc723
1 change: 1 addition & 0 deletions cli/.runtime-env/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NODE_ENV=production
1 change: 1 addition & 0 deletions cli/.runtime-env/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.env
18 changes: 18 additions & 0 deletions cli/.runtime-env/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# this directory is for explicit .env for settings `NODE_ENV` for ncc build

Since the ncc does not opt us to set runtime env, so we'll need to load & set the env manually.

```ts
import dotenv from "dotenv";
dotenv.load({
path: "./.runtime-env/.env",
});
```

## Note for contributors

Is this required?:

Not essential, but some of our modules use logging conditioning based on `NODE_ENV !== "production"` not `NODE_ENV === "development"`.

So in most case, this will not change the core engine's logic behind, this is for disable verbose logging at this point.
7 changes: 7 additions & 0 deletions cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,12 @@ if (require.main === module) {
path: path.join(__dirname, ".public-credentials", ".env"),
});

/**
* load env for production @see {@link /cli/.runtime-env/readme.md}
*/
dotenv.config({
path: path.join(__dirname, ".runtime-env", ".env"),
});

cli();
}
0