@salty-css/astro 0.0.1-alpha.307 → 0.0.1-alpha.308

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/integration.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./astro-vite-plugin.cjs"),o=()=>({name:"astro-salty-integration",hooks:{"astro:config:setup":({config:t,updateConfig:e})=>{e({vite:{plugins:[n.saltyPlugin(t.root.pathname)]}})}}});exports.saltyIntegration=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./astro-vite-plugin.cjs"),a=require("path"),c=(t={})=>({name:"astro-salty-integration",hooks:{"astro:config:setup":({config:r,updateConfig:o})=>{const{srcDir:n="src",rootDir:i=r.root.pathname}=t,e=a.join(i,n);o({vite:{plugins:[s.saltyPlugin(e)]}})}}});exports.saltyIntegration=c;
package/integration.d.ts CHANGED
@@ -1,2 +1,15 @@
1
1
  import { AstroIntegration } from 'astro';
2
- export declare const saltyIntegration: () => AstroIntegration;
2
+ interface SaltyIntegrationOptions {
3
+ /**
4
+ * The source directory where SaltyCSS Config is located.
5
+ * Default is "src".
6
+ */
7
+ srcDir?: string;
8
+ /**
9
+ * Override full path to the project directory.
10
+ * Default is the current directory of the Astro configuration.
11
+ */
12
+ rootDir?: string;
13
+ }
14
+ export declare const saltyIntegration: (options?: SaltyIntegrationOptions) => AstroIntegration;
15
+ export {};
package/integration.js CHANGED
@@ -1,16 +1,18 @@
1
- import { saltyPlugin as n } from "./astro-vite-plugin.js";
2
- const r = () => ({
1
+ import { saltyPlugin as a } from "./astro-vite-plugin.js";
2
+ import { join as e } from "path";
3
+ const m = (o = {}) => ({
3
4
  name: "astro-salty-integration",
4
5
  hooks: {
5
- "astro:config:setup": ({ config: t, updateConfig: o }) => {
6
- o({
6
+ "astro:config:setup": ({ config: t, updateConfig: r }) => {
7
+ const { srcDir: i = "src", rootDir: n = t.root.pathname } = o, s = e(n, i);
8
+ r({
7
9
  vite: {
8
- plugins: [n(t.root.pathname)]
10
+ plugins: [a(s)]
9
11
  }
10
12
  });
11
13
  }
12
14
  }
13
15
  });
14
16
  export {
15
- r as saltyIntegration
17
+ m as saltyIntegration
16
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salty-css/astro",
3
- "version": "0.0.1-alpha.307",
3
+ "version": "0.0.1-alpha.308",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "typings": "./dist/index.d.ts",
@@ -46,7 +46,7 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@salty-css/core": "^0.0.1-alpha.307",
49
+ "@salty-css/core": "^0.0.1-alpha.308",
50
50
  "astro": "^5.13.2",
51
51
  "vite": "^6.3.5"
52
52
  }