olly-molly 0.2.20 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -0
- package/bin/cli.js +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -168,6 +168,35 @@ npm run dev
|
|
|
168
168
|
# Open http://localhost:1234
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
+
### Releasing a New Version
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
scripts/build-prebuilt-macos.sh
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
npm version major|minor|patch
|
|
179
|
+
npm publish
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
git push origin main
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
gh release create v0.2.21 \
|
|
188
|
+
dist/prebuilt/olly-molly-darwin-arm64.tar.gz \
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
for windows:
|
|
192
|
+
```bash
|
|
193
|
+
powershell -ExecutionPolicy Bypass -File scripts/build-prebuilt-windows.ps1
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
gh release upload v0.2.21 dist/prebuilt/olly-molly-win32-x64.tar.gz --clobber
|
|
198
|
+
```
|
|
199
|
+
|
|
171
200
|
### Project Structure
|
|
172
201
|
|
|
173
202
|
```
|
package/bin/cli.js
CHANGED
|
@@ -148,6 +148,7 @@ async function main() {
|
|
|
148
148
|
const npmVersion = await getNpmVersion();
|
|
149
149
|
const prebuiltUrl = getPrebuiltUrl(npmVersion);
|
|
150
150
|
const standaloneServerPath = path.join(APP_DIR, '.next', 'standalone', 'server.js');
|
|
151
|
+
const prebuiltOnDisk = () => fs.existsSync(standaloneServerPath);
|
|
151
152
|
|
|
152
153
|
async function downloadApp() {
|
|
153
154
|
if (prebuiltUrl) {
|
|
@@ -183,13 +184,17 @@ async function main() {
|
|
|
183
184
|
needsBuild = !usedPrebuilt;
|
|
184
185
|
}
|
|
185
186
|
|
|
187
|
+
if (!usedPrebuilt && prebuiltOnDisk()) {
|
|
188
|
+
usedPrebuilt = true;
|
|
189
|
+
}
|
|
190
|
+
|
|
186
191
|
// Install
|
|
187
192
|
if (needsInstall || !fs.existsSync(path.join(APP_DIR, 'node_modules'))) {
|
|
188
193
|
console.log('📦 Installing...\n');
|
|
189
194
|
execSync('npm install --omit=dev', { cwd: APP_DIR, stdio: 'inherit' });
|
|
190
195
|
}
|
|
191
196
|
|
|
192
|
-
if (usedPrebuilt && !
|
|
197
|
+
if (usedPrebuilt && !prebuiltOnDisk()) {
|
|
193
198
|
usedPrebuilt = false;
|
|
194
199
|
needsInstall = true;
|
|
195
200
|
needsBuild = true;
|