-
Notifications
You must be signed in to change notification settings - Fork 322
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
Vanilla JS client library #408
base: dev
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Documentation Changes Required
Please ensure these changes are reflected in the relevant documentation files. All other changes analyzed do not require documentation updates as they are related to internal implementations, development tooling, or legal requirements that do not affect the public API or SDK functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good!
"build:packages": "only-allow pnpm && turbo run build --filter=./packages/*", | ||
"clean": "only-allow pnpm && turbo run clean && rimraf --glob **/.next && rimraf --glob **/.turbo && rimraf .turbo && rimraf --glob **/node_modules", | ||
"codegen": "only-allow pnpm && turbo run codegen", | ||
"pre": "npx -y only-allow pnpm && node -e \"if(require('fs').existsSync('./scripts/generate-from-template.ts')) require('child_process').execSync('npx --package=ts-node ts-node ./scripts/generate-from-template.ts')\"", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we only do this if the file exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is used for the environment where all the code that is not linked to the entry file will be removed(for example in turbo docker build)
"//": "IF_PLATFORM template", | ||
"name": "@stackframe/template", | ||
"//": "ELSE_IF_PLATFORM js", | ||
"name": "@stackframe/js", | ||
"//": "ELSE_IF_PLATFORM next", | ||
"name": "@stackframe/stack", | ||
"//": "END_PLATFORM", | ||
"//": "NEXT_LINE_PLATFORM template", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need these if we commit the package.json anyways? (btw while duplicate keys are technically allowed by the JSON spec, we should probably avoid them if we can)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the template to generate the package.json
in template
, js
, and stack
. It is very hard and requires a lot of tricks to make a valid package.json that is at the same time a valid template so I created a separate file for that
Co-authored-by: Konsti Wohlwend <[email protected]>
Important
Introduces a vanilla JavaScript client library for Stack with environment-specific code generation and updates to Docker and package management.
packages/js
.examples/js-example
demonstrating usage ofStackServerApp
.Dockerfile
to includetsx
and rungenerate-from-template.ts
script.generate-from-template.ts
for environment-specific code generation.package.json
scripts to include template generation and environment checks.packages/template
and uses macros for environment-specific builds.email.tsx
frompackages/stack/src/utils
.This description was created by
for 91c4f76. It will automatically update as commits are pushed.