@madebyseed/seed-cli-tools 3.0.2 → 4.0.0
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/CHANGELOG.md +57 -0
- package/__fixtures__/legacy-js-min/baseline/theme.dev.js +13 -0
- package/__fixtures__/legacy-js-min/baseline/theme.prod.js +1 -0
- package/__fixtures__/legacy-js-min/dist/assets/theme.js +13 -0
- package/__fixtures__/legacy-js-min/package.json +9 -0
- package/__fixtures__/legacy-js-min/src/scripts/components/sample.js +4 -0
- package/__fixtures__/legacy-js-min/src/scripts/theme.js +9 -0
- package/__fixtures__/legacy-js-min/src/scripts/vendor/lib.js +7 -0
- package/__fixtures__/legacy-js-min/src/scripts/vendor.js +3 -0
- package/__fixtures__/legacy-js-min/verify.sh +34 -0
- package/__fixtures__/module-js-min/dist/assets/components-greeter.js +6 -0
- package/__fixtures__/module-js-min/dist/assets/components-greeter.js.map +1 -0
- package/__fixtures__/module-js-min/dist/assets/components-items.js +5 -0
- package/__fixtures__/module-js-min/dist/assets/components-items.js.map +1 -0
- package/__fixtures__/module-js-min/dist/assets/header.js +20 -0
- package/__fixtures__/module-js-min/dist/assets/header.js.map +1 -0
- package/__fixtures__/module-js-min/dist/assets/sections-cart-items.js +8 -0
- package/__fixtures__/module-js-min/dist/assets/sections-cart-items.js.map +1 -0
- package/__fixtures__/module-js-min/dist/assets/vendor-lib.js +4 -0
- package/__fixtures__/module-js-min/dist/assets/vendor-lib.js.map +1 -0
- package/__fixtures__/module-js-min/package.json +9 -0
- package/__fixtures__/module-js-min/seed.project.json +15 -0
- package/__fixtures__/module-js-min/src/scripts/components/greeter.js +4 -0
- package/__fixtures__/module-js-min/src/scripts/components/items.js +3 -0
- package/__fixtures__/module-js-min/src/scripts/header.js +18 -0
- package/__fixtures__/module-js-min/src/scripts/sections/cart/items.js +6 -0
- package/__fixtures__/module-js-min/src/scripts/vendor/lib.js +2 -0
- package/__fixtures__/module-js-min/verify.sh +58 -0
- package/lib/commands/watch.js +55 -7
- package/lib/commands/watch.js.map +1 -1
- package/lib/shopify-bin.d.ts +14 -0
- package/lib/shopify-bin.js +18 -0
- package/lib/shopify-bin.js.map +1 -0
- package/lib/tasks/build-js-module.d.ts +2 -0
- package/lib/tasks/build-js-module.js +93 -0
- package/lib/tasks/build-js-module.js.map +1 -0
- package/lib/tasks/build-js.js +13 -1
- package/lib/tasks/build-js.js.map +1 -1
- package/lib/tasks/includes/config.d.ts +2 -0
- package/lib/tasks/includes/config.js +3 -0
- package/lib/tasks/includes/config.js.map +1 -1
- package/lib/tasks/includes/js-mode.d.ts +12 -0
- package/lib/tasks/includes/js-mode.js +42 -0
- package/lib/tasks/includes/js-mode.js.map +1 -0
- package/lib/tasks/watch-tui/App.d.ts +8 -0
- package/lib/tasks/watch-tui/App.js +337 -0
- package/lib/tasks/watch-tui/App.js.map +1 -0
- package/lib/tasks/watch-tui/classify.d.ts +39 -0
- package/lib/tasks/watch-tui/classify.js +84 -0
- package/lib/tasks/watch-tui/classify.js.map +1 -0
- package/lib/tasks/watch-tui/index.d.ts +30 -0
- package/lib/tasks/watch-tui/index.js +299 -0
- package/lib/tasks/watch-tui/index.js.map +1 -0
- package/lib/tasks/watch-tui/shopify-parse.d.ts +24 -0
- package/lib/tasks/watch-tui/shopify-parse.js +87 -0
- package/lib/tasks/watch-tui/shopify-parse.js.map +1 -0
- package/lib/tasks/watch-tui/state.d.ts +68 -0
- package/lib/tasks/watch-tui/state.js +61 -0
- package/lib/tasks/watch-tui/state.js.map +1 -0
- package/lib/tasks/watch-tui/theme-info.d.ts +10 -0
- package/lib/tasks/watch-tui/theme-info.js +79 -0
- package/lib/tasks/watch-tui/theme-info.js.map +1 -0
- package/lib/utils.js +63 -87
- package/lib/utils.js.map +1 -1
- package/package.json +11 -2
- package/src/commands/watch.ts +70 -20
- package/src/shopify-bin.ts +21 -0
- package/src/tasks/build-js-module.ts +92 -0
- package/src/tasks/build-js.ts +13 -1
- package/src/tasks/includes/config.ts +5 -0
- package/src/tasks/includes/js-mode.ts +48 -0
- package/src/tasks/watch-tui/App.tsx +486 -0
- package/src/tasks/watch-tui/classify.ts +120 -0
- package/src/tasks/watch-tui/index.ts +342 -0
- package/src/tasks/watch-tui/shopify-parse.ts +103 -0
- package/src/tasks/watch-tui/state.ts +113 -0
- package/src/tasks/watch-tui/theme-info.ts +109 -0
- package/src/types/declarations.d.ts +19 -1
- package/src/utils.ts +64 -93
- package/tsconfig.json +3 -2
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# @madebyseed/seed-cli-tools
|
|
2
|
+
|
|
3
|
+
## 4.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- # Seed CLI v4
|
|
8
|
+
|
|
9
|
+
## `seed watch` got a UI
|
|
10
|
+
- **Three tabs you can switch between mid-session.** `[d]` dashboard, `[l]` logs, `[e]` errors. Press the key, swap views, nothing scrolls away. Press `q` to quit cleanly.
|
|
11
|
+
- **One status line tells you the truth about your last save.** `⏳ building…` while compiling, `✓ build · 1.2s · 14:32:08` once it lands, `✗ build failed · 14:32 [e]` (sticky until the next clean build) if it dies.
|
|
12
|
+
- **Save blink.** Every `src/` file save flips the status to `⏳ building…` for ~600ms even when gulp's task system doesn't emit a Starting/Finished pair — so you see immediate feedback that your save registered.
|
|
13
|
+
- **Shopify URLs auto-discovered on the dashboard.** Local, preview, and editor URLs populate themselves the moment `shopify theme dev` prints them. No more scrolling up to find your preview link.
|
|
14
|
+
- **Context info always visible.** Branch, store, theme, task URL, PR URL — all on the dashboard. Empty fields show `N/A`, fields Shopify will populate show `loading…`, so the layout doesn't shift around as URLs arrive.
|
|
15
|
+
- **Shopify auth prompt as a banner.** If Shopify CLI needs you to log in (device-code flow), the URL and verification code show up in a yellow banner at the top of the dashboard. Auto-clears once the dev server boots.
|
|
16
|
+
- **Output tail on unexpected exits.** If watch dies non-zero, the last 60 raw output lines (with `out`/`err` tags) are dumped to your terminal scrollback alongside any captured error block. No more `✗ watch exited (code 1)` with zero context.
|
|
17
|
+
- **`--raw` flag** falls back to plain piped output if you prefer the old behavior.
|
|
18
|
+
|
|
19
|
+
## Bundled Shopify CLI
|
|
20
|
+
- **`@shopify/cli@3.78.1` ships inside seed-cli now.** Every dev on the team runs the same Shopify CLI version regardless of what's on `PATH`. When we need to bump it, we bump it in one place and ship a seed-cli release. Install size goes up by ~200MB, but the "works on my machine because I'm on a different Shopify CLI" class of bugs is gone.
|
|
21
|
+
- **Bundled binary wins over `PATH`.** Resolved via absolute path at startup, exposed to child processes through `SEED_SHOPIFY_BIN`.
|
|
22
|
+
|
|
23
|
+
## New: module-mode JS pipeline (opt-in)
|
|
24
|
+
|
|
25
|
+
Set `build.js.type: "module"` in `seed.project.json` to flip on. Default is `legacy` — existing themes build byte-identical to before.
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{ "build": { "js": { "type": "module" } } }
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
- **Each `src/scripts/**/\*.js`ships as its own ES module to`dist/assets/`.** No bundling, no `=require` concat. Filenames flatten with the parent folder as a prefix so collisions are impossible (`components/cart.js`→`components-cart.js`).
|
|
32
|
+
- **Modern syntax preserved through minification.** Uses `terser` instead of `uglify-js` — class fields, optional chaining, top-level `await`, template literals all survive.
|
|
33
|
+
- **Per-file watch.** Save one file, only that file rebuilds.
|
|
34
|
+
- **Dev gets external sourcemaps, prod minifies.**
|
|
35
|
+
|
|
36
|
+
## Context creation (`seed ctx create`)
|
|
37
|
+
- **Pick which theme to duplicate from.** When creating a preview theme, you now get a list of every theme in the store and can choose which one to copy. Defaults to live.
|
|
38
|
+
- **Use an existing branch.** If the branch name you enter already exists, the CLI offers to switch to it instead of erroring out.
|
|
39
|
+
- **Preview themes are named with your initials + branch.** New format: `Seed - GV - feature/redesign-checkout 🚧`. Initials are pulled from your git config `user.name`.
|
|
40
|
+
- **Partial failures no longer destroy your context.** If Shopify auth flakes or theme creation fails, your context, branch, and Asana link are preserved. You'll see a warning pointing you at `seed ctx edit`.
|
|
41
|
+
|
|
42
|
+
## New: `seed context edit` (alias `seed ctx e`)
|
|
43
|
+
|
|
44
|
+
Interactive menu to fix or change anything on an existing context — great for when something failed during create, or when details change mid-task. Pass `--id <contextId>` to edit a non-active context. Menu options: create/recreate preview theme, change Asana task, change PM, update notes, change store, rename context.
|
|
45
|
+
|
|
46
|
+
## Context dispatch (`seed ctx dispatch`)
|
|
47
|
+
- **No more errors when the PR is already open.** Dispatch detects the existing PR for your branch and updates its title and description in place.
|
|
48
|
+
- **Customizer URL is shown in the summary** alongside the preview URL and PR link.
|
|
49
|
+
- **Asana comments are clean.** Removed the `**` markdown that was rendering literally.
|
|
50
|
+
|
|
51
|
+
## Auth & token refresh
|
|
52
|
+
- **Asana and GitHub tokens auto-refresh.** When an access token expires, the CLI uses your refresh token to grab a new one in the background. No more random "you got logged out, please run `seed asana login` again" mid-task.
|
|
53
|
+
- **Scope mismatches no longer evict you.** If a future release widens the scope on either provider, your existing token stays put with a warning instead of being silently cleared.
|
|
54
|
+
- **401-retry on the fly.** If a request fails with `401` mid-flight, the CLI silently refreshes and retries once before surfacing an error.
|
|
55
|
+
|
|
56
|
+
## Build & release tooling
|
|
57
|
+
- **Migrated from Lerna 4 (deprecated) to npm workspaces + Changesets.** `npm install` at the root handles workspace symlinking; `npm run release` runs the changeset publish flow. Version bumps are tracked per-change in `.changeset/` and roll up into `CHANGELOG.md` per package on release.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Minimal fixture exercising gulp-include's =require directive.
|
|
2
|
+
// Output should match baseline/theme.js byte-for-byte after legacy build.
|
|
3
|
+
|
|
4
|
+
window.theme = window.theme || {};
|
|
5
|
+
window.theme.sampleComponent = function () {
|
|
6
|
+
return "sample";
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
window.theme = window.theme || {};
|
|
11
|
+
window.theme.greet = function (name) {
|
|
12
|
+
return "hello " + name;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.theme=window.theme||{},window.theme.sampleComponent=function(){return"sample"},window.theme=window.theme||{},window.theme.greet=function(e){return"hello "+e};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// Minimal fixture exercising gulp-include's =require directive.
|
|
2
|
+
// Output should match baseline/theme.js byte-for-byte after legacy build.
|
|
3
|
+
|
|
4
|
+
window.theme = window.theme || {};
|
|
5
|
+
window.theme.sampleComponent = function () {
|
|
6
|
+
return "sample";
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
window.theme = window.theme || {};
|
|
11
|
+
window.theme.greet = function (name) {
|
|
12
|
+
return "hello " + name;
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Minimal fixture exercising gulp-include's =require directive.
|
|
2
|
+
// Output should match baseline/theme.js byte-for-byte after legacy build.
|
|
3
|
+
|
|
4
|
+
//=require components/sample.js
|
|
5
|
+
|
|
6
|
+
window.theme = window.theme || {};
|
|
7
|
+
window.theme.greet = function (name) {
|
|
8
|
+
return "hello " + name;
|
|
9
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Phase 0 acceptance gate: build the legacy fixture and diff against the
|
|
3
|
+
# committed baseline. Anything non-zero exit means the legacy pipeline drifted.
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
cd "$(dirname "$0")/../.." # → packages/seed-tools
|
|
7
|
+
|
|
8
|
+
fail=0
|
|
9
|
+
|
|
10
|
+
run() {
|
|
11
|
+
local label=$1 baseline=$2
|
|
12
|
+
shift 2
|
|
13
|
+
rm -rf __fixtures__/legacy-js-min/dist
|
|
14
|
+
npx gulp build:js \
|
|
15
|
+
--gulpfile lib/gulpfile.js \
|
|
16
|
+
--cwd __fixtures__/legacy-js-min \
|
|
17
|
+
"$@" >/dev/null 2>&1
|
|
18
|
+
|
|
19
|
+
if diff -q \
|
|
20
|
+
"__fixtures__/legacy-js-min/dist/assets/theme.js" \
|
|
21
|
+
"__fixtures__/legacy-js-min/baseline/$baseline" >/dev/null; then
|
|
22
|
+
echo "✓ $label matches baseline/$baseline"
|
|
23
|
+
else
|
|
24
|
+
echo "✗ $label DRIFTED from baseline/$baseline"
|
|
25
|
+
diff "__fixtures__/legacy-js-min/dist/assets/theme.js" \
|
|
26
|
+
"__fixtures__/legacy-js-min/baseline/$baseline" || true
|
|
27
|
+
fail=1
|
|
28
|
+
fi
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
run "legacy prod (minified)" theme.prod.js
|
|
32
|
+
run "legacy dev (unminified)" theme.dev.js --skip-optimizations
|
|
33
|
+
|
|
34
|
+
exit $fail
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"mappings":"","sources":["components/greeter.js"],"sourcesContent":["// Should land at dist/assets/components-greeter.js\nexport function greet(target) {\n return `hello, ${target}`;\n}\n"],"file":"greeter.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"mappings":"","sources":["components/items.js"],"sourcesContent":["// Same basename as sections/cart/items.js — used to verify the parent-folder\n// flatten dodges the collision (this lands at components-items.js, not items.js).\nexport const KIND = \"component-items\";\n"],"file":"items.js"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Root-level module — should land at dist/assets/header.js (no prefix).
|
|
2
|
+
//
|
|
3
|
+
// Imports use bare specifiers, resolved at runtime by the theme's importmap
|
|
4
|
+
// (snippets/importmap.liquid in seed-base). The CLI does NOT rewrite import
|
|
5
|
+
// paths — `import "@theme/components/greeter"` ships verbatim to the
|
|
6
|
+
// browser, which then resolves it via the importmap to
|
|
7
|
+
// `components-greeter.js | asset_url`.
|
|
8
|
+
import { greet } from "@theme/components/greeter";
|
|
9
|
+
|
|
10
|
+
class HeaderEl extends HTMLElement {
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
this.textContent = greet("header");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (!customElements.get("seed-header")) {
|
|
17
|
+
customElements.define("seed-header", HeaderEl);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"mappings":"","sources":["header.js"],"sourcesContent":["// Root-level module — should land at dist/assets/header.js (no prefix).\n//\n// Imports use bare specifiers, resolved at runtime by the theme's importmap\n// (snippets/importmap.liquid in seed-base). The CLI does NOT rewrite import\n// paths — `import \"@theme/components/greeter\"` ships verbatim to the\n// browser, which then resolves it via the importmap to\n// `components-greeter.js | asset_url`.\nimport { greet } from \"@theme/components/greeter\";\n\nclass HeaderEl extends HTMLElement {\n connectedCallback() {\n this.textContent = greet(\"header\");\n }\n}\n\nif (!customElements.get(\"seed-header\")) {\n customElements.define(\"seed-header\", HeaderEl);\n}\n"],"file":"header.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"mappings":"","sources":["sections/cart/items.js"],"sourcesContent":["// Nested two levels deep — should land at dist/assets/sections-cart-items.js\nexport class CartItem {\n constructor(node) {\n this.node = node;\n }\n}\n"],"file":"items.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"mappings":"","sources":["vendor/lib.js"],"sourcesContent":["// Vendor file — same flatten rule. Should land at dist/assets/vendor-lib.js\nexport const VERSION = \"0.0.1\";\n"],"file":"lib.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Root-level module — should land at dist/assets/header.js (no prefix).
|
|
2
|
+
//
|
|
3
|
+
// Imports use bare specifiers, resolved at runtime by the theme's importmap
|
|
4
|
+
// (snippets/importmap.liquid in seed-base). The CLI does NOT rewrite import
|
|
5
|
+
// paths — `import "@theme/components/greeter"` ships verbatim to the
|
|
6
|
+
// browser, which then resolves it via the importmap to
|
|
7
|
+
// `components-greeter.js | asset_url`.
|
|
8
|
+
import { greet } from "@theme/components/greeter";
|
|
9
|
+
|
|
10
|
+
class HeaderEl extends HTMLElement {
|
|
11
|
+
connectedCallback() {
|
|
12
|
+
this.textContent = greet("header");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (!customElements.get("seed-header")) {
|
|
17
|
+
customElements.define("seed-header", HeaderEl);
|
|
18
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Phase 2 acceptance: module-mode pipeline produces flat, prefix-renamed
|
|
3
|
+
# files, supports both prod (minified) and dev (sourcemaps) builds, and
|
|
4
|
+
# tolerates same-basename source files in different folders.
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
cd "$(dirname "$0")/../.." # → packages/seed-tools
|
|
8
|
+
|
|
9
|
+
fail=0
|
|
10
|
+
|
|
11
|
+
expect_file() {
|
|
12
|
+
if [[ -f "__fixtures__/module-js-min/dist/assets/$1" ]]; then
|
|
13
|
+
echo "✓ $1"
|
|
14
|
+
else
|
|
15
|
+
echo "✗ missing: $1"
|
|
16
|
+
fail=1
|
|
17
|
+
fi
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
# Prod build (minified, no sourcemaps)
|
|
21
|
+
rm -rf __fixtures__/module-js-min/dist
|
|
22
|
+
npx gulp build:js \
|
|
23
|
+
--gulpfile lib/gulpfile.js \
|
|
24
|
+
--cwd __fixtures__/module-js-min >/dev/null 2>&1
|
|
25
|
+
|
|
26
|
+
echo "[prod build]"
|
|
27
|
+
expect_file "header.js"
|
|
28
|
+
expect_file "components-greeter.js"
|
|
29
|
+
expect_file "components-items.js"
|
|
30
|
+
expect_file "sections-cart-items.js"
|
|
31
|
+
expect_file "vendor-lib.js"
|
|
32
|
+
|
|
33
|
+
if grep -q "^//# sourceMappingURL" "__fixtures__/module-js-min/dist/assets/header.js"; then
|
|
34
|
+
echo "✗ prod build emitted a sourcemap reference (should be stripped)"
|
|
35
|
+
fail=1
|
|
36
|
+
else
|
|
37
|
+
echo "✓ no sourcemaps in prod"
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
# Dev build (sourcemaps, no minify)
|
|
41
|
+
rm -rf __fixtures__/module-js-min/dist
|
|
42
|
+
npx gulp build:js \
|
|
43
|
+
--gulpfile lib/gulpfile.js \
|
|
44
|
+
--cwd __fixtures__/module-js-min \
|
|
45
|
+
--skip-optimizations >/dev/null 2>&1
|
|
46
|
+
|
|
47
|
+
echo "[dev build]"
|
|
48
|
+
expect_file "header.js"
|
|
49
|
+
expect_file "header.js.map"
|
|
50
|
+
|
|
51
|
+
if grep -q "class HeaderEl extends HTMLElement" "__fixtures__/module-js-min/dist/assets/header.js"; then
|
|
52
|
+
echo "✓ dev build preserves source (modern syntax intact)"
|
|
53
|
+
else
|
|
54
|
+
echo "✗ dev build looks minified — sourcemaps/optimize wiring is wrong"
|
|
55
|
+
fail=1
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
exit $fail
|
package/lib/commands/watch.js
CHANGED
|
@@ -5,8 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = default_1;
|
|
7
7
|
const cross_spawn_1 = __importDefault(require("cross-spawn"));
|
|
8
|
+
const readline_1 = __importDefault(require("readline"));
|
|
8
9
|
const debug_1 = __importDefault(require("debug"));
|
|
9
10
|
const config_1 = __importDefault(require("../config"));
|
|
11
|
+
const watch_tui_1 = require("../tasks/watch-tui");
|
|
10
12
|
const logger = (0, debug_1.default)("seed-tools:watch");
|
|
11
13
|
function default_1(program) {
|
|
12
14
|
program
|
|
@@ -17,30 +19,76 @@ function default_1(program) {
|
|
|
17
19
|
.option("-s, --store <store>", "Used for multi-store projects, specify the store to run the watch command for.", false)
|
|
18
20
|
.option("-sp, --store-password <password>", "Used for store password protected stores.", false)
|
|
19
21
|
.option("-o, --optimize", "Optimizes assets by compressing, minifying and purging.", false)
|
|
22
|
+
.option("--raw", "Disable the TUI and stream raw gulp/shopify output.", false)
|
|
23
|
+
.option("--verbose", "Show all child-process output (TUI only).", false)
|
|
20
24
|
.action((options = {}) => {
|
|
21
25
|
logger(`--gulpfile ${config_1.default.gulpFile}`);
|
|
22
26
|
logger(`--cwd ${config_1.default.themeRoot}`);
|
|
23
27
|
const args = ["watch"];
|
|
24
|
-
if (options.store)
|
|
28
|
+
if (options.store)
|
|
25
29
|
args.push("--store", options.store);
|
|
26
|
-
|
|
27
|
-
if (options.storePassword) {
|
|
30
|
+
if (options.storePassword)
|
|
28
31
|
args.push("--store-password", options.storePassword);
|
|
29
|
-
}
|
|
30
32
|
if (!options.optimize)
|
|
31
33
|
args.push("--skip-optimizations");
|
|
32
34
|
process.env.NODE_ENV = options.optimize ? "production" : "development";
|
|
33
|
-
|
|
35
|
+
const gulpArgs = args.concat([
|
|
34
36
|
"--gulpfile",
|
|
35
37
|
config_1.default.gulpFile,
|
|
36
38
|
"--cwd",
|
|
37
39
|
config_1.default.themeRoot,
|
|
38
40
|
"--environment",
|
|
39
41
|
options.env || "development",
|
|
40
|
-
])
|
|
42
|
+
]);
|
|
43
|
+
const useTui = !options.raw && process.stdout.isTTY;
|
|
44
|
+
if (!useTui) {
|
|
45
|
+
(0, cross_spawn_1.default)(config_1.default.gulp, gulpArgs, {
|
|
46
|
+
detached: false,
|
|
47
|
+
stdio: "inherit",
|
|
48
|
+
});
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const child = (0, cross_spawn_1.default)(config_1.default.gulp, gulpArgs, {
|
|
41
52
|
detached: false,
|
|
42
|
-
|
|
53
|
+
// Ink owns stdin for keyboard nav; child runs without a tty on stdin.
|
|
54
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
43
55
|
});
|
|
56
|
+
const tui = new watch_tui_1.WatchTui({
|
|
57
|
+
verbose: options.verbose,
|
|
58
|
+
sourceLabel: typeof options.store === "string" ? options.store : undefined,
|
|
59
|
+
storeKey: typeof options.store === "string" ? options.store : undefined,
|
|
60
|
+
cwd: config_1.default.themeRoot,
|
|
61
|
+
onQuit: () => {
|
|
62
|
+
if (!child.killed)
|
|
63
|
+
child.kill("SIGINT");
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
tui.start();
|
|
67
|
+
if (child.stdout) {
|
|
68
|
+
readline_1.default.createInterface({ input: child.stdout }).on("line", (line) => {
|
|
69
|
+
tui.ingest(line, false);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (child.stderr) {
|
|
73
|
+
readline_1.default.createInterface({ input: child.stderr }).on("line", (line) => {
|
|
74
|
+
tui.ingest(line, true);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
let exited = false;
|
|
78
|
+
const shutdown = (code) => {
|
|
79
|
+
if (exited)
|
|
80
|
+
return;
|
|
81
|
+
exited = true;
|
|
82
|
+
tui.stop(code);
|
|
83
|
+
// Ink leaves stdin in raw mode with handlers attached even after
|
|
84
|
+
// unmount, which keeps the event loop alive. Force-exit so the user
|
|
85
|
+
// gets back to the shell on q / Ctrl+C without a second keypress.
|
|
86
|
+
// setImmediate gives the final-summary write one tick to flush.
|
|
87
|
+
setImmediate(() => process.exit(code ?? 0));
|
|
88
|
+
};
|
|
89
|
+
child.on("exit", (code) => shutdown(code));
|
|
90
|
+
process.on("SIGINT", () => shutdown(130));
|
|
91
|
+
process.on("SIGTERM", () => shutdown(143));
|
|
44
92
|
});
|
|
45
93
|
}
|
|
46
94
|
//# sourceMappingURL=watch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"watch.js","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":";;;;;AAkBA,4BAuGC;AAzHD,8DAAgC;AAChC,wDAA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
2
|
+
command: string;
|
|
3
|
+
args: string[];
|
|
4
|
+
/** Whether the spawn call should set `shell: true`. */
|
|
5
|
+
shell: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Build the (command, args) tuple to spawn the shopify cli with the given
|
|
9
|
+
* subcommand args. Prefers the bundled binary advertised by seed-cli via the
|
|
10
|
+
* `SEED_SHOPIFY_BIN` env var. Falls back to PATH `shopify` if the env var
|
|
11
|
+
* isn't set (e.g. someone running seed-tools' gulpfile directly without the
|
|
12
|
+
* seed-cli wrapper).
|
|
13
|
+
*/
|
|
14
|
+
export declare function shopifyCommand(subArgs: string[]): ShopifyCommand;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shopifyCommand = shopifyCommand;
|
|
4
|
+
/**
|
|
5
|
+
* Build the (command, args) tuple to spawn the shopify cli with the given
|
|
6
|
+
* subcommand args. Prefers the bundled binary advertised by seed-cli via the
|
|
7
|
+
* `SEED_SHOPIFY_BIN` env var. Falls back to PATH `shopify` if the env var
|
|
8
|
+
* isn't set (e.g. someone running seed-tools' gulpfile directly without the
|
|
9
|
+
* seed-cli wrapper).
|
|
10
|
+
*/
|
|
11
|
+
function shopifyCommand(subArgs) {
|
|
12
|
+
const bin = process.env.SEED_SHOPIFY_BIN;
|
|
13
|
+
if (bin) {
|
|
14
|
+
return { command: process.execPath, args: [bin, ...subArgs], shell: false };
|
|
15
|
+
}
|
|
16
|
+
return { command: "shopify", args: subArgs, shell: true };
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=shopify-bin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shopify-bin.js","sourceRoot":"","sources":["../src/shopify-bin.ts"],"names":[],"mappings":";;AAcA,wCAMC;AAbD;;;;;;GAMG;AACH,SAAgB,cAAc,CAAC,OAAiB;IAC9C,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IACzC,IAAI,GAAG,EAAE,CAAC;QACR,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAC9E,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.moduleBuildTask = moduleBuildTask;
|
|
7
|
+
exports.moduleWatchTask = moduleWatchTask;
|
|
8
|
+
const gulp_1 = __importDefault(require("gulp"));
|
|
9
|
+
const gulp_if_1 = __importDefault(require("gulp-if"));
|
|
10
|
+
const gulp_plumber_1 = __importDefault(require("gulp-plumber"));
|
|
11
|
+
const gulp_rename_1 = __importDefault(require("gulp-rename"));
|
|
12
|
+
const gulp_sourcemaps_1 = __importDefault(require("gulp-sourcemaps"));
|
|
13
|
+
const gulp_terser_1 = __importDefault(require("gulp-terser"));
|
|
14
|
+
const chokidar_1 = __importDefault(require("chokidar"));
|
|
15
|
+
const fs_1 = require("fs");
|
|
16
|
+
const glob_1 = require("glob");
|
|
17
|
+
const utilities_1 = __importDefault(require("./includes/utilities"));
|
|
18
|
+
const config_1 = __importDefault(require("./includes/config"));
|
|
19
|
+
const messages_1 = __importDefault(require("./includes/messages"));
|
|
20
|
+
/**
|
|
21
|
+
* Module-mode JS pipeline (seed.project.json: build.js.type = "module").
|
|
22
|
+
*
|
|
23
|
+
* Each `src/scripts/**\/*.js` file ships as its own ES module to
|
|
24
|
+
* `dist/assets/`. No bundling, no concatenation. Filenames are flattened with
|
|
25
|
+
* the parent folder as a prefix to dodge name collisions:
|
|
26
|
+
*
|
|
27
|
+
* src/scripts/header.js → dist/assets/header.js
|
|
28
|
+
* src/scripts/components/whatever.js → dist/assets/components-whatever.js
|
|
29
|
+
* src/scripts/sections/cart/items.js → dist/assets/sections-cart-items.js
|
|
30
|
+
* src/scripts/vendor/swiper.js → dist/assets/vendor-swiper.js
|
|
31
|
+
*
|
|
32
|
+
* In dev (no `--optimize`) we emit inline sourcemaps and skip minification so
|
|
33
|
+
* stack traces map cleanly to source. In prod we minify with terser (which
|
|
34
|
+
* supports modern syntax — uglify-js used by the legacy pipeline does not).
|
|
35
|
+
*/
|
|
36
|
+
const SCRIPTS_GLOB = "src/scripts/**/*.js";
|
|
37
|
+
function flattenWithParent() {
|
|
38
|
+
return (0, gulp_rename_1.default)((file) => {
|
|
39
|
+
if (file.dirname && file.dirname !== "." && file.dirname !== "") {
|
|
40
|
+
const segments = file.dirname.split(/[\\/]/).filter(Boolean);
|
|
41
|
+
file.basename = segments.join("-") + "-" + file.basename;
|
|
42
|
+
file.dirname = "";
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function buildOne(srcPath) {
|
|
47
|
+
return gulp_1.default
|
|
48
|
+
.src(srcPath, { allowEmpty: true, base: "src/scripts" })
|
|
49
|
+
.pipe((0, gulp_plumber_1.default)(utilities_1.default.errorHandler))
|
|
50
|
+
.pipe((0, gulp_if_1.default)(!config_1.default.optimize, gulp_sourcemaps_1.default.init()))
|
|
51
|
+
.pipe((0, gulp_if_1.default)(config_1.default.optimize, (0, gulp_terser_1.default)()))
|
|
52
|
+
.pipe((0, gulp_if_1.default)(!config_1.default.optimize, gulp_sourcemaps_1.default.write(".")))
|
|
53
|
+
.pipe(flattenWithParent())
|
|
54
|
+
.pipe(gulp_1.default.dest(config_1.default.dist.assets));
|
|
55
|
+
}
|
|
56
|
+
function processModuleJs() {
|
|
57
|
+
messages_1.default.logProcessFiles(`build:js (module mode)`);
|
|
58
|
+
return buildOne(SCRIPTS_GLOB);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Touch JS files to update their modification time so Shopify's watcher picks
|
|
62
|
+
* the change up — same trick the legacy pipeline uses.
|
|
63
|
+
*/
|
|
64
|
+
function touchJsFiles() {
|
|
65
|
+
try {
|
|
66
|
+
const jsFiles = glob_1.glob.sync(`${config_1.default.dist.assets}*.js`);
|
|
67
|
+
jsFiles.forEach((file) => {
|
|
68
|
+
const now = new Date();
|
|
69
|
+
(0, fs_1.utimesSync)(file, now, now);
|
|
70
|
+
messages_1.default.logFileEvent("touch", file);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
console.error("Error touching JS files:", error);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function moduleBuildTask() {
|
|
78
|
+
return processModuleJs();
|
|
79
|
+
}
|
|
80
|
+
function moduleWatchTask() {
|
|
81
|
+
chokidar_1.default
|
|
82
|
+
.watch(SCRIPTS_GLOB, { ignoreInitial: true })
|
|
83
|
+
.on("all", (event, path) => {
|
|
84
|
+
messages_1.default.logFileEvent(event, path);
|
|
85
|
+
// Per-file rebuild — only the changed file flows through. Cheaper and
|
|
86
|
+
// simpler than re-globbing the world on every save.
|
|
87
|
+
const stream = buildOne(path);
|
|
88
|
+
stream.on("end", () => {
|
|
89
|
+
setTimeout(() => touchJsFiles(), 500);
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=build-js-module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-js-module.js","sourceRoot":"","sources":["../../src/tasks/build-js-module.ts"],"names":[],"mappings":";;;;;AA2EA,0CAEC;AAED,0CAYC;AA3FD,gDAAwB;AACxB,sDAA6B;AAC7B,gEAAmC;AACnC,8DAAiC;AACjC,sEAAyC;AACzC,8DAAiC;AACjC,wDAAg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