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
Core work:
- Add create/install/build/start helpers for create-spectacle
- Add CI support
Work along the way:
- Extract `jest` dependencies to monorepo root
- Lots of wireit configuration cleanup
$ yarn clean:cache:modules # caches in node_modules (prettier, etc.)
122
122
```
123
123
124
+
### Checking `create-spectacle`
125
+
126
+
We have slower checks for the outputs created by our `create-spectacle` package that are run in CI, but you generally won't need to run unless you are developing that package.
127
+
128
+
First, you can install Chromium to use in `puppeteer` or use a local Chrome instance. We only presently have Mac instructions and will get to Windows/Linux support when we get demand. You only need to do the following step once.
129
+
130
+
```sh
131
+
# Option 1 -- Do nothing! If you have the Mac Chrome app, you can skip this step!
132
+
# Option 2 -- Install chromium
133
+
# Option 2.a -- Normal binary
134
+
$ pnpm puppeteer:install
135
+
# Option 2.b -- If you are on an M1/2 Mac, do this instead:
After that, you'll want to either build or watch the `create-spectacle` files:
140
+
141
+
```sh
142
+
$ pnpm run --filter ./packages/create-spectacle build
143
+
$ pnpm run --filter ./packages/create-spectacle build --watch
144
+
```
145
+
146
+
From there, here are sample collections of commands to create new example applications from scratch with full installation and ending with firing up a dev server:
147
+
148
+
```sh
149
+
# JavaScript
150
+
$ pnpm run --filter ./packages/create-spectacle examples:jsx:clean && \
151
+
pnpm run --filter ./packages/create-spectacle examples:jsx:create && \
152
+
pnpm run --filter ./packages/create-spectacle examples:jsx:install && \
153
+
pnpm run --filter ./packages/create-spectacle examples:jsx:build && \
154
+
pnpm run --filter ./packages/create-spectacle examples:jsx:start
155
+
156
+
# TypeScript
157
+
$ pnpm run --filter ./packages/create-spectacle examples:tsx:clean && \
158
+
pnpm run --filter ./packages/create-spectacle examples:tsx:create && \
159
+
pnpm run --filter ./packages/create-spectacle examples:tsx:install && \
160
+
pnpm run --filter ./packages/create-spectacle examples:tsx:build && \
161
+
pnpm run --filter ./packages/create-spectacle examples:tsx:start
162
+
163
+
# One Page (HTML-only, no build step)
164
+
$ pnpm run --filter ./packages/create-spectacle examples:onepage:clean && \
165
+
pnpm run --filter ./packages/create-spectacle examples:onepage:create && \
166
+
pnpm run --filter ./packages/create-spectacle examples:onepage:start
167
+
```
168
+
169
+
The dev server in each of these examples runs on port 3000 by default, and you can run a simple Puppeteer test against that port with the following:
170
+
171
+
```sh
172
+
$ pnpm run --filter ./packages/create-spectacle examples:test
173
+
```
174
+
124
175
### Before submitting a PR
125
176
126
177
Thanks for taking the time to help us make Spectacle even better! Before you go ahead and submit a PR, make sure that you have done the following:
0 commit comments