Skip to content

Commit 68e78bf

Browse files
authored
Merge pull request #44 from PureStackStudio/feature-purestack-wizard
Implement a cli&web wizard to create and configure purestack sites with ease.
2 parents 17ae17e + e8e360b commit 68e78bf

224 files changed

Lines changed: 11082 additions & 1495 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,44 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17+
toolchain:
18+
name: Fresh Corepack and Yarn (${{ matrix.os }})
19+
runs-on: ${{ matrix.os }}
20+
timeout-minutes: 10
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
os: [ubuntu-latest, windows-latest, macos-latest]
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
28+
with:
29+
persist-credentials: false
30+
31+
- name: Setup Node
32+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
33+
with:
34+
node-version: '26'
35+
package-manager-cache: false
36+
37+
# Node 25 and later no longer bundle Corepack. Runner images ship Yarn 1,
38+
# whose global launcher blocks Corepack's own (EEXIST on Windows).
39+
- name: Install and enable Corepack
40+
shell: bash
41+
run: |
42+
npm uninstall --global yarn
43+
npm install --global corepack@latest
44+
corepack enable
45+
46+
- name: Install dependencies
47+
run: yarn install --immutable
48+
49+
- name: Test package manager setup
50+
run: yarn vitest run packages/purestack/src/init/package-manager.test.ts
51+
52+
- name: Verify fresh installation and reuse with isolated tools
53+
run: yarn verify-toolchain
54+
1755
checks:
1856
name: Checks (${{ matrix.os }})
1957
runs-on: ${{ matrix.os }}
@@ -31,11 +69,17 @@ jobs:
3169
- name: Setup Node
3270
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3371
with:
34-
node-version: '24'
72+
node-version: '26'
3573
package-manager-cache: false
3674

37-
- name: Enable Corepack
38-
run: corepack enable
75+
# Node 25 and later no longer bundle Corepack. Runner images ship Yarn 1,
76+
# whose global launcher blocks Corepack's own (EEXIST on Windows).
77+
- name: Install and enable Corepack
78+
shell: bash
79+
run: |
80+
npm uninstall --global yarn
81+
npm install --global corepack@latest
82+
corepack enable
3983
4084
- name: Install dependencies
4185
run: yarn install --immutable
@@ -78,6 +122,6 @@ jobs:
78122
if: runner.os == 'Linux'
79123
run: yarn bundle
80124

81-
- name: Pack distributable packages
125+
- name: Pack packages and verify standalone templates
82126
if: runner.os == 'Linux'
83-
run: yarn package
127+
run: yarn verify-templates

‎.gitignore‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ node_modules
44
dist
55
*.tgz
66
tsconfig.bundle.generated.json
7-
PureGate
8-
purestack-setup
97
*.vsix
108
.codex/*
119
/.tmp*
1210
/frontend/out/
1311
/frontend/purestack.studio/legal/_private/
12+
/private-docs

‎.yarnrc.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
nodeLinker: node-modules
2+
# Install fresh releases right away, including just-published PureStack packages.
3+
npmMinimalAgeGate: 0

‎CONTRIBUTING.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ page scripts change, run `yarn embed` manually; do not edit generated files unde
3232

3333
After pushing these files and obtaining the first successful CI run, create an
3434
active branch ruleset targeting `main` in **Settings → Rules → Rulesets**:
35-
3635
- Require a pull request before merging and resolve all review conversations.
3736
- Require `Checks (ubuntu-latest)` and `Checks (windows-latest)` to pass.
3837
- Require branches to be up to date before merging.

‎README.md‎

Lines changed: 55 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ for the markup and browser app model.
5050

5151
## Get your first page running
5252

53+
Create a complete project, install its dependencies, and start the preview:
54+
55+
```sh
56+
npx purestack@latest init my-site --install --yes
57+
cd my-site
58+
yarn dev
59+
```
60+
61+
The `starter` template creates a small site. You can select it directly with
62+
`--template starter`, initialize Git with `--git`, or
63+
run `init` alone to configure and create a site in the local PureStack wizard.
64+
Studio shows progress, starts the live site, and stays open until you finish.
65+
Use `--yes` to create a site directly without opening Studio.
66+
Installation is opt-in with `--install`.
67+
Each project includes `README.md` and
68+
`AGENTS.md` to guide customization, plus build and publish scripts.
69+
70+
To assemble a site manually instead, follow the steps below.
71+
5372
### 1. Create a project
5473

5574
```sh
@@ -126,25 +145,25 @@ has a complete example.
126145

127146
## Pick your next step
128147

129-
| I want to… | Start here |
130-
| :--- | :--- |
131-
| Configure a site | [Site configuration](https://purestack.studio/guides/getting-started/site-config/) |
132-
| Build a richer page | [Component catalog](https://purestack.studio/components/) |
133-
| Add browser behavior | [PageScript and RegorApp examples](packages/purestack/README.md) |
134-
| Understand the CLI | [CLI guide](https://purestack.studio/guides/getting-started/purestack-cli/) |
135-
| Explore a complete project | [Sample content](packages/ts-ssg/sample-content) · [Website source](frontend) |
136-
| Work on PureStack itself | [Contribution guide](CONTRIBUTING.md) |
148+
| I want to… | Start here |
149+
| :------------------------- | :--------------------------------------------------------------------------------- |
150+
| Configure a site | [Site configuration](https://purestack.studio/guides/getting-started/site-config/) |
151+
| Build a richer page | [Component catalog](https://purestack.studio/components/) |
152+
| Add browser behavior | [PageScript and RegorApp examples](packages/purestack/README.md) |
153+
| Understand the CLI | [CLI guide](https://purestack.studio/guides/getting-started/purestack-cli/) |
154+
| Explore a complete project | [Sample content](packages/ts-ssg/sample-content) · [Website source](frontend) |
155+
| Work on PureStack itself | [Contribution guide](CONTRIBUTING.md) |
137156

138157
<details>
139158
<summary><strong>How PureStack fits together</strong></summary>
140159

141-
| Source | What PureStack does |
142-
| --- | --- |
143-
| `siteConfig.json` | Defines output paths, site identity, themes, navigation, and optional features. |
144-
| `.md`, `.mdx`, `.rmdx` | Turn content files into routes and HTML pages. |
145-
| Regor components | Render UI into pages at build time. |
146-
| `PageScript` and `RegorApp` | Bundle TypeScript and add browser behavior where requested. |
147-
| Static assets | Copies files from the content directory into the site output. |
160+
| Source | What PureStack does |
161+
| --------------------------- | ------------------------------------------------------------------------------- |
162+
| `siteConfig.json` | Defines output paths, site identity, themes, navigation, and optional features. |
163+
| `.md`, `.mdx`, `.rmdx` | Turn content files into routes and HTML pages. |
164+
| Regor components | Render UI into pages at build time. |
165+
| `PageScript` and `RegorApp` | Bundle TypeScript and add browser behavior where requested. |
166+
| Static assets | Copies files from the content directory into the site output. |
148167

149168
The [CLI guide](https://purestack.studio/guides/getting-started/purestack-cli/) covers the
150169
commands and options. [Site configuration](https://purestack.studio/guides/getting-started/site-config/)
@@ -154,24 +173,28 @@ covers navigation, themes, search, sitemap, localization, and output paths.
154173

155174
## Repository map
156175

176+
Use [sites/](sites/README.md) to test the workspace CLI directly. Its shared
177+
instructions are repository files; generated site directories are Git-ignored.
178+
157179
The workspace contains the CLI, site generator, UI components, typed HTML/CSS
158180
builders, browser scripts, icon providers, and a private VS Code extension.
159181

160182
<details>
161183
<summary><strong>Explore the packages and source directories</strong></summary>
162184

163-
| Path | Purpose |
164-
| --- | --- |
165-
| [`packages/purestack`](packages/purestack) | Public `purestack` package, CLI, and TypeScript API. |
166-
| [`packages/ts-ssg`](packages/ts-ssg) | Content discovery, rendering, routing, builds, and development server. |
167-
| [`packages/ts-components`](packages/ts-components) | Built-in UI components and component metadata. |
168-
| [`packages/ts-style`](packages/ts-style) | Themes, skins, typography, and style generation. |
169-
| [`packages/ts-css`](packages/ts-css) and [`packages/ts-html`](packages/ts-html) | Typed CSS and HTML builders. |
170-
| [`packages/ts-page-scripts`](packages/ts-page-scripts) | Browser-side behavior used by site components. |
171-
| [`packages/ts-svg-icons`](packages/ts-svg-icons) | SVG icon providers and lookup. |
172-
| [`packages/ts-ssg-vscode`](packages/ts-ssg-vscode) | Private VS Code extension for PureStack content and components. |
173-
| [`frontend`](frontend) | Source for purestack.studio, built with PureStack. |
174-
| [`packages/ts-ssg/sample-content`](packages/ts-ssg/sample-content) | A larger example site with content, components, and browser scripts. |
185+
| Path | Purpose |
186+
| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
187+
| [`packages/purestack`](packages/purestack) | Public `purestack` package, CLI, and TypeScript API. |
188+
| [`packages/ts-ssg`](packages/ts-ssg) | Content discovery, rendering, routing, builds, and development server. |
189+
| [`packages/ts-components`](packages/ts-components) | Built-in UI components and component metadata. |
190+
| [`packages/ts-style`](packages/ts-style) | Themes, skins, typography, and style generation. |
191+
| [`packages/ts-css`](packages/ts-css) and [`packages/ts-html`](packages/ts-html) | Typed CSS and HTML builders. |
192+
| [`packages/ts-page-scripts`](packages/ts-page-scripts) | Browser-side behavior used by site components. |
193+
| [`packages/ts-svg-icons`](packages/ts-svg-icons) | SVG icon providers and lookup. |
194+
| [`packages/ts-ssg-vscode`](packages/ts-ssg-vscode) | Private VS Code extension for PureStack content and components. |
195+
| [`templates/`](templates) | Official npm template packages, sharing the PureStack product version. |
196+
| [`frontend`](frontend) | Source for purestack.studio, built with PureStack. |
197+
| [`packages/ts-ssg/sample-content`](packages/ts-ssg/sample-content) | A larger example site with content, components, and browser scripts. |
175198

176199
The remaining workspace packages provide shared types, utilities, rendering,
177200
and DOM support.
@@ -197,11 +220,11 @@ run `yarn frontend`; its development server opens at
197220
<http://127.0.0.1:4700/>. See the [frontend README](frontend/README.md) for
198221
the site-specific workflow.
199222

200-
| Command | Purpose |
201-
| :--- | :--- |
202-
| `yarn lint:ci` | Check source without modifying files. |
203-
| `yarn test:ci` | Run the test suite once. |
204-
| `yarn bundle` | Build distributable packages. |
223+
| Command | Purpose |
224+
| :------------- | :----------------------------------------------- |
225+
| `yarn lint:ci` | Check source without modifying files. |
226+
| `yarn test:ci` | Run the test suite once. |
227+
| `yarn bundle` | Build distributable packages. |
205228
| `yarn package` | Pack non-private workspaces into local tarballs. |
206229

207230
---

0 commit comments

Comments
 (0)