Skip to content
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

chore: add play script #1327

Merged
merged 25 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1c56c66
feat: add initial playground script
angeloashmore Mar 8, 2024
7282e6a
chore: rebuild yarn.lock without playground deps
angeloashmore Mar 8, 2024
66cb48b
refactor: script
angeloashmore Mar 8, 2024
669033f
feat: try to make playgrounds isolated
angeloashmore Mar 14, 2024
d75188f
Merge branch 'main' into aa/playground-script
angeloashmore Mar 28, 2024
65e35df
feat: add `play` CLI
angeloashmore Mar 29, 2024
1a715a2
fix: pass dry run arg to `updateJSONFile`
angeloashmore Mar 29, 2024
b216ced
fix: ignore yarn.lock
angeloashmore Mar 29, 2024
fe7fb5b
refactor: review
angeloashmore Mar 29, 2024
875cb28
fix: rename `playgroundRoot` to `playgroundDir`
angeloashmore Mar 29, 2024
7986cc1
feat: support `--stage=<stage>`
angeloashmore Apr 2, 2024
ab16e49
feat: support Nuxt
angeloashmore Apr 2, 2024
49e053d
fix: use a hardcoded api endpoint in nuxt websites
angeloashmore Apr 2, 2024
bfb737b
feat: add playground name to output
angeloashmore Apr 2, 2024
78eff12
fix: use more compatible prefix styling
angeloashmore Apr 2, 2024
8486926
fix: use shorter generated names
angeloashmore Apr 2, 2024
c19f3ab
fix: rename `--stage` to `--environment`
angeloashmore Apr 2, 2024
df727d7
feat: add `-e` alias for `--environment`
angeloashmore Apr 2, 2024
b50ba5c
refactor: use an explicit default `framework` value
angeloashmore Apr 2, 2024
ef47bbf
fix: per review
angeloashmore Apr 2, 2024
55c535f
fix: remove unused `.yarnrc.yml` mention
angeloashmore Apr 2, 2024
1dbcfbe
fix: remove origin from playground and commit changes
angeloashmore Apr 2, 2024
e34cc87
refactor: simplify `exec` overload
angeloashmore Apr 4, 2024
ce650e6
feat: use the local `@slicemachine/init`
angeloashmore Apr 4, 2024
a9ae332
fix: use constants everywhere (I forgot some)
angeloashmore Apr 4, 2024
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
3 changes: 2 additions & 1 deletion package.json
Copy link
Collaborator

@bapmrl bapmrl Apr 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Is there a way to add the generated playgrounds to the clean script?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but I wonder if we should ask for confirmation before deleting all playgrounds. It's possible a playground could contain a lot of work or a specific set up, and I wouldn't want someone to accidentally lose it all.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could create a simple custom scripts/clean.ts with a prompt?

Copy link
Collaborator

@bapmrl bapmrl Apr 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you're right. We'll probably have changes we don't want to lose.

Consequently, I think we can either:

  1. Keep it simple and not change anything.
  2. Update the clean script so that it only deletes well known build/cache directories in the playgrounds. For example, it could delete the nested .next directories. Of course, it shouldn't accidentally delete content in the playgrounds/node_modules directory or other configuration files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To expedite merging this PR, let's not change the clean script for now. We can revisit it in a future PR. I like the second idea, perhaps in addition to the ability to delete playgrounds.

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"prettier:fix": "prettier --write .",
"prettier:check": "prettier --check .",
"test": "yarn workspaces foreach --parallel --topological-dev --verbose run test",
"publish": "tsx scripts/publish.ts"
"publish": "tsx scripts/publish.ts",
"play": "tsx scripts/play.ts"
},
"dependenciesMeta": {
"@sentry/cli": {
Expand Down
8 changes: 8 additions & 0 deletions playgrounds/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ignore everything...
*

# ...except the following files.
# They are necessary to isolate playgrounds and their dependencies from the monorepo.
!.gitignore
!yarnrc.yml
!package.json
18 changes: 18 additions & 0 deletions playgrounds/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"packageManager": "yarn@3.6.0",
"private": true,
"workspaces": [
"*"
bapmrl marked this conversation as resolved.
Show resolved Hide resolved
],
"resolutions": {
bapmrl marked this conversation as resolved.
Show resolved Hide resolved
"@slicemachine/adapter-next": "link:../packages/adapter-next",
bapmrl marked this conversation as resolved.
Show resolved Hide resolved
"@slicemachine/adapter-nuxt": "link:../packages/adapter-nuxt",
"@slicemachine/adapter-nuxt2": "link:../packages/adapter-nuxt2",
"@slicemachine/adapter-sveltekit": "link:../packages/adapter-sveltekit",
"@slicemachine/init": "link:../packages/init",
"@slicemachine/manager": "link:../packages/manager",
"@slicemachine/plugin-kit": "link:../packages/plugin-kit",
"slice-machine-ui": "link:../packages/slice-machine",
"start-slicemachine": "link:../packages/start-slicemachine"
}
}
Loading
Loading