@rimelight/config 0.0.3 → 0.0.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/README.md CHANGED
@@ -20,13 +20,23 @@ Default strict TypeScript configuration for all Rimelight projects:
20
20
  }
21
21
  ```
22
22
 
23
- ### SolidJS Config
23
+ ### Astro Config
24
24
 
25
- For SolidJS/Astro projects:
25
+ For pure Astro projects:
26
26
 
27
27
  ```json
28
28
  {
29
- "extends": "@rimelight/config/tsconfig/solid.json"
29
+ "extends": "@rimelight/config/tsconfig/astro.json"
30
+ }
31
+ ```
32
+
33
+ ### Astro + SolidJS Config
34
+
35
+ For Astro projects using SolidJS components:
36
+
37
+ ```json
38
+ {
39
+ "extends": "@rimelight/config/tsconfig/astro-solid.json"
30
40
  }
31
41
  ```
32
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rimelight/config",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "private": false,
5
5
  "description": "Rimelight Entertainment's shared configuration package",
6
6
  "homepage": "https://rimelight.com/docs",
@@ -23,8 +23,12 @@
23
23
  "type": "module",
24
24
  "exports": {
25
25
  "./tsconfig/base": "./tsconfig/base.json",
26
- "./tsconfig/solid": "./tsconfig/solid.json",
27
- "./vite-plus/base": "./vite-plus/base.js"
26
+ "./tsconfig/astro": "./tsconfig/astro.json",
27
+ "./tsconfig/astro-solid": "./tsconfig/astro-solid.json",
28
+ "./vite-plus/base": {
29
+ "types": "./vite-plus/base.ts",
30
+ "default": "./vite-plus/base.js"
31
+ }
28
32
  },
29
33
  "publishConfig": {
30
34
  "access": "public"
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/tsconfig",
3
- "display": "Rimelight SolidJS",
4
- "extends": "./base.json",
5
3
  "compilerOptions": {
6
4
  "jsx": "preserve",
7
5
  "jsxImportSource": "solid-js"
8
- }
6
+ },
7
+ "display": "Rimelight Astro + SolidJS",
8
+ "extends": "./astro.json"
9
9
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/tsconfig",
3
+ "compilerOptions": {
4
+ "plugins": [
5
+ {
6
+ "name": "@astrojs/ts-plugin"
7
+ }
8
+ ]
9
+ },
10
+ "display": "Rimelight Astro",
11
+ "extends": "./base.json"
12
+ }
@@ -1,31 +1,33 @@
1
1
  {
2
- "exclude": ["dist"],
3
2
  "compilerOptions": {
4
- "target": "ESNext",
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "lib": ["ESNext", "DOM", "DOM.Iterable"],
8
- "types": ["node"],
3
+ "allowArbitraryExtensions": true,
9
4
  "allowImportingTsExtensions": true,
10
- "resolveJsonModule": true,
11
- "verbatimModuleSyntax": true,
12
- "isolatedModules": true,
13
- "noEmit": true,
5
+ "allowJs": true,
6
+ "allowUnreachableCode": false,
7
+ "allowUnusedLabels": false,
14
8
  "esModuleInterop": true,
9
+ "exactOptionalPropertyTypes": true,
15
10
  "forceConsistentCasingInFileNames": true,
16
- "strict": true,
17
- "skipLibCheck": true,
18
- "allowJs": true,
11
+ "isolatedModules": true,
19
12
  "jsx": "preserve",
20
- "allowArbitraryExtensions": true,
13
+ "lib": ["ESNext", "DOM", "DOM.Iterable"],
14
+ "module": "ESNext",
15
+ "moduleResolution": "bundler",
16
+ "noEmit": true,
17
+ "noErrorTruncation": true,
21
18
  "noFallthroughCasesInSwitch": true,
22
19
  "noImplicitOverride": true,
23
20
  "noImplicitReturns": true,
21
+ "noPropertyAccessFromIndexSignature": true,
22
+ "noUncheckedIndexedAccess": true,
23
+ "noUncheckedSideEffectImports": true,
24
24
  "noUnusedLocals": true,
25
25
  "noUnusedParameters": true,
26
- "noUncheckedIndexedAccess": true,
27
- "exactOptionalPropertyTypes": true,
28
- "allowUnreachableCode": false,
29
- "allowUnusedLabels": false
26
+ "resolveJsonModule": true,
27
+ "skipLibCheck": true,
28
+ "strict": true,
29
+ "target": "ESNext",
30
+ "types": ["node"],
31
+ "verbatimModuleSyntax": true
30
32
  }
31
33
  }
package/vite-plus/base.js CHANGED
@@ -20,3 +20,16 @@ export function rimelightConfig() {
20
20
  }
21
21
  }
22
22
  }
23
+
24
+ export function rimelightPackConfig(options = {}) {
25
+ const { entry = ["src/index.ts"], pack = {}, ...rest } = options
26
+ return {
27
+ ...rimelightConfig(),
28
+ ...rest,
29
+ pack: {
30
+ entry,
31
+ dts: true,
32
+ ...pack
33
+ }
34
+ }
35
+ }
package/vite-plus/base.ts CHANGED
@@ -22,3 +22,18 @@ export function rimelightConfig(): UserConfig {
22
22
  }
23
23
  }
24
24
  }
25
+
26
+ export function rimelightPackConfig(
27
+ options: { entry?: string[]; pack?: Record<string, any>; [key: string]: any } = {}
28
+ ): any {
29
+ const { entry = ["src/index.ts"], pack = {}, ...rest } = options
30
+ return {
31
+ ...rimelightConfig(),
32
+ ...rest,
33
+ pack: {
34
+ entry,
35
+ dts: true,
36
+ ...pack
37
+ }
38
+ }
39
+ }