@inkdropapp/theme-dev-helpers 0.3.3 → 0.3.5

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/bin/dev-server CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4
- echo $SCRIPT_DIR
3
+ SCRIPT_PATH="$(readlink -f "${BASH_SOURCE[0]}")"
4
+ SCRIPT_DIR="$(cd "$(dirname "${SCRIPT_PATH}")" && pwd)"
5
5
 
6
6
  bunx --bun vite "$SCRIPT_DIR/.."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkdropapp/theme-dev-helpers",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "type": "module",
5
5
  "description": "A helper module for creating themes for Inkdrop",
6
6
  "keywords": [
package/vite.config.ts CHANGED
@@ -1,13 +1,15 @@
1
1
  import { defineConfig } from 'vite'
2
2
  import react from '@vitejs/plugin-react'
3
+ import { readFile } from 'fs/promises'
3
4
 
4
5
  const baseProjectPath = process.env.BASE_PROJECT_PATH || process.cwd()
5
6
  console.log('Base project path:', baseProjectPath)
6
- const packageJson = await import(`${baseProjectPath}/package.json`, {
7
- with: {
8
- type: "json",
9
- }
10
- })
7
+ const packageJson = JSON.parse(
8
+ await readFile(
9
+ `${baseProjectPath}/package.json`,
10
+ { encoding: 'utf-8' }
11
+ )
12
+ );
11
13
  const { styleSheets } = packageJson
12
14
 
13
15
  // https://vitejs.dev/config/