@canopy-iiif/app 1.8.6 → 1.8.8

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/lib/build/dev.js CHANGED
@@ -23,20 +23,13 @@ const APP_COMPONENTS_DIR = path.join(process.cwd(), "app", "components");
23
23
 
24
24
  function resolveTailwindCli() {
25
25
  const root = process.cwd();
26
- const binName = process.platform === "win32" ? "tailwindcss.cmd" : "tailwindcss";
27
- const bin = path.join(root, "node_modules", ".bin", binName);
28
- if (fs.existsSync(bin)) {
29
- return { cmd: bin, args: [] };
30
- }
31
- let cliEntry = null;
32
26
  try {
33
- cliEntry = require.resolve("@tailwindcss/cli/dist/index.mjs", { paths: [root] });
34
- } catch (_) {
35
- cliEntry = null;
36
- }
37
- if (cliEntry) {
38
- return { cmd: process.execPath || "node", args: [cliEntry] };
39
- }
27
+ const pkgPath = require.resolve("@tailwindcss/cli/package.json", { paths: [root] });
28
+ const cliEntry = path.join(path.dirname(pkgPath), "dist", "index.mjs");
29
+ if (fs.existsSync(cliEntry)) {
30
+ return { cmd: process.execPath || "node", args: [cliEntry] };
31
+ }
32
+ } catch (_) {}
40
33
  return null;
41
34
  }
42
35
  const PORT = Number(process.env.PORT || 5001);
@@ -9,20 +9,13 @@ const {
9
9
 
10
10
  function resolveTailwindCli() {
11
11
  const root = process.cwd();
12
- const binName = process.platform === "win32" ? "tailwindcss.cmd" : "tailwindcss";
13
- const localBin = path.join(root, "node_modules", ".bin", binName);
14
- if (fs.existsSync(localBin)) {
15
- return {cmd: localBin, args: []};
16
- }
17
- let cliEntry = null;
18
12
  try {
19
- cliEntry = require.resolve("@tailwindcss/cli/dist/index.mjs", { paths: [root] });
20
- } catch (_) {
21
- cliEntry = null;
22
- }
23
- if (cliEntry) {
24
- return {cmd: process.execPath || "node", args: [cliEntry]};
25
- }
13
+ const pkgPath = require.resolve("@tailwindcss/cli/package.json", {paths: [root]});
14
+ const cliEntry = path.join(path.dirname(pkgPath), "dist", "index.mjs");
15
+ if (fs.existsSync(cliEntry)) {
16
+ return {cmd: process.execPath || "node", args: [cliEntry]};
17
+ }
18
+ } catch (_) {}
26
19
  return null;
27
20
  }
28
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "1.8.6",
3
+ "version": "1.8.8",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",