@flairjs/parcel-transformer 0.0.1-beta.1 → 0.0.1-beta.10

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
@@ -0,0 +1,154 @@
1
+ # @flairjs/parcel-transformer
2
+
3
+ Parcel transformer for Flair CSS-in-JSX.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @flairjs/parcel-transformer
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Add the transformer to your `.parcelrc` file:
14
+
15
+ ```json
16
+ {
17
+ "extends": "@parcel/config-default",
18
+ "transformers": {
19
+ "*.{tsx,jsx}": ["@flairjs/parcel-transformer", "..."]
20
+ }
21
+ }
22
+ ```
23
+
24
+ ## Configuration
25
+
26
+ You can configure the transformer by adding options to your `package.json`:
27
+
28
+ ```json
29
+ {
30
+ "@flairjs/parcel-transformer": {
31
+ "include": ["src/**/*.{tsx,jsx}"],
32
+ "exclude": ["**/*.test.{tsx,jsx}"],
33
+ "classNameList": ["className", "class"]
34
+ }
35
+ }
36
+ ```
37
+
38
+ ### Configuration Options
39
+
40
+ ```typescript
41
+ interface FlairJsParcelTransformerOptions {
42
+ /**
43
+ * Preprocess the extracted CSS before it is passed to lightningcss
44
+ * @experimental
45
+ */
46
+ cssPreprocessor?: (css: string, id: string) => string
47
+
48
+ /**
49
+ * Files to include (default: all .tsx/.jsx files)
50
+ */
51
+ include?: string | string[]
52
+
53
+ /**
54
+ * Files to exclude (default: node_modules)
55
+ */
56
+ exclude?: string | string[]
57
+
58
+ /**
59
+ * Override the default theme file content
60
+ */
61
+ buildThemeFile?: (theme: FlairThemeConfig) => string
62
+
63
+ /**
64
+ * List of class names used in the project. Supports regex.
65
+ */
66
+ classNameList?: string[]
67
+ }
68
+ ```
69
+
70
+ ## Complete Parcel Setup
71
+
72
+ ### 1. Install Dependencies
73
+
74
+ ```bash
75
+ npm install parcel @flairjs/client @flairjs/core @flairjs/parcel-transformer
76
+ ```
77
+
78
+ ### 2. Create .parcelrc
79
+
80
+ ```json
81
+ {
82
+ "extends": "@parcel/config-default",
83
+ "transformers": {
84
+ "*.{tsx,jsx}": ["@flairjs/parcel-transformer", "..."]
85
+ }
86
+ }
87
+ ```
88
+
89
+ ### 3. Package.json Scripts
90
+
91
+ ```json
92
+ {
93
+ "scripts": {
94
+ "dev": "parcel src/index.html",
95
+ "build": "parcel build src/index.html"
96
+ }
97
+ }
98
+ ```
99
+
100
+ ### 4. Create Theme File
101
+
102
+ ```typescript
103
+ // flair.theme.ts
104
+ import { defineConfig } from '@flairjs/client'
105
+
106
+ export default defineConfig({
107
+ tokens: {
108
+ colors: {
109
+ primary: '#3b82f6',
110
+ secondary: '#64748b'
111
+ }
112
+ }
113
+ })
114
+ ```
115
+
116
+ ### 5. Import Theme CSS
117
+
118
+ ```js
119
+ // src/index.js
120
+ import '@flairjs/client/theme.css'
121
+ import { App } from './App'
122
+
123
+ // Render your app
124
+ ```
125
+
126
+ ## React Setup
127
+
128
+ ```jsx
129
+ // src/App.jsx
130
+ import { flair } from '@flairjs/client'
131
+
132
+ const App = () => {
133
+ return (
134
+ <div className="app">
135
+ <h1>Hello Flair!</h1>
136
+ </div>
137
+ )
138
+ }
139
+
140
+ App.flair = flair({
141
+ '.app': {
142
+ fontFamily: 'system-ui, sans-serif',
143
+ padding: '$space.4',
144
+ backgroundColor: '$colors.primary',
145
+ color: 'white'
146
+ }
147
+ })
148
+
149
+ export { App }
150
+ ```
151
+
152
+ ## License
153
+
154
+ MIT
package/dist/cjs/index.js CHANGED
@@ -43,10 +43,10 @@ let picomatch = require("picomatch");
43
43
  picomatch = __toESM(picomatch);
44
44
  let __flairjs_core = require("@flairjs/core");
45
45
  __flairjs_core = __toESM(__flairjs_core);
46
- let __home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_plugin_2_16_0__parcel_core_2_16_0__swc_helpers_0_5_17__node_modules__parcel_plugin_lib_PluginAPI_js = require("/home/runner/work/flairjs/flairjs/node_modules/.pnpm/@parcel+plugin@2.16.0_@parcel+core@2.16.0_@swc+helpers@0.5.17_/node_modules/@parcel/plugin/lib/PluginAPI.js");
47
- __home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_plugin_2_16_0__parcel_core_2_16_0__swc_helpers_0_5_17__node_modules__parcel_plugin_lib_PluginAPI_js = __toESM(__home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_plugin_2_16_0__parcel_core_2_16_0__swc_helpers_0_5_17__node_modules__parcel_plugin_lib_PluginAPI_js);
48
- let __home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_source_map_2_1_1_node_modules__parcel_source_map_dist_node_js = require("/home/runner/work/flairjs/flairjs/node_modules/.pnpm/@parcel+source-map@2.1.1/node_modules/@parcel/source-map/dist/node.js");
49
- __home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_source_map_2_1_1_node_modules__parcel_source_map_dist_node_js = __toESM(__home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_source_map_2_1_1_node_modules__parcel_source_map_dist_node_js);
46
+ let __parcel_plugin = require("@parcel/plugin");
47
+ __parcel_plugin = __toESM(__parcel_plugin);
48
+ let __parcel_source_map = require("@parcel/source-map");
49
+ __parcel_source_map = __toESM(__parcel_source_map);
50
50
 
51
51
  //#region ../shared/dist/esm/index.js
52
52
  String.raw;
@@ -100,8 +100,8 @@ var Store = class {
100
100
  };
101
101
  const store = new Store();
102
102
  const __dirname$1 = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
103
- const getUserTheme = async () => {
104
- if (store.getUserTheme()) return store.getUserTheme();
103
+ const getUserTheme = async (options) => {
104
+ if (store.getUserTheme() && !options?.ignoreCache) return store.getUserTheme();
105
105
  try {
106
106
  let userThemeFilePath = path.default.resolve(process.cwd(), "flair.theme.ts");
107
107
  if (!(0, fs.existsSync)(userThemeFilePath)) userThemeFilePath = path.default.resolve(process.cwd(), "flair.theme.js");
@@ -139,11 +139,12 @@ const getGeneratedCssDir = () => {
139
139
  const flairThemeFile = require$1.resolve("@flairjs/client/theme.css");
140
140
  return node_path.default.resolve(flairThemeFile, "../generated-css");
141
141
  };
142
- const setupGeneratedCssDir = async () => {
142
+ const setupGeneratedCssDir = async (options) => {
143
143
  const flairGeneratedCssDir = getGeneratedCssDir();
144
+ const { clearExisting = true } = options ?? {};
144
145
  try {
145
146
  if (!(0, node_fs.existsSync)(flairGeneratedCssDir)) await (0, node_fs_promises.mkdir)(flairGeneratedCssDir);
146
- else {
147
+ else if (clearExisting) {
147
148
  await (0, node_fs_promises.rm)(flairGeneratedCssDir, {
148
149
  recursive: true,
149
150
  force: true
@@ -158,31 +159,26 @@ const setupGeneratedCssDir = async () => {
158
159
  }
159
160
  return flairGeneratedCssDir;
160
161
  };
161
- const setupUserThemeFile = async ({ buildThemeFile }) => {
162
+ const setupUserThemeFile = async ({ buildThemeFile, onThemeFileChange, deleteBeforeWrite = false }) => {
162
163
  const flairThemeFile = require$1.resolve("@flairjs/client/theme.css");
163
164
  let userTheme = await getUserTheme();
164
165
  const buildThemeCSS = buildThemeFile ?? buildThemeTokens;
165
166
  if (userTheme) {
166
167
  const themeCSS = buildThemeCSS(userTheme.theme);
167
168
  store.setLastThemeUpdate(Date.now());
169
+ if (deleteBeforeWrite) await (0, node_fs_promises.rm)(flairThemeFile, { force: true });
168
170
  await (0, node_fs_promises.writeFile)(flairThemeFile, themeCSS, "utf-8");
169
171
  (0, node_fs.watch)(userTheme.originalPath, async () => {
170
172
  userTheme = await getUserTheme();
171
173
  store.setLastThemeUpdate(Date.now());
172
174
  if (!userTheme) return;
173
175
  const themeCSS$1 = buildThemeCSS(userTheme.theme);
176
+ onThemeFileChange?.();
174
177
  await (0, node_fs_promises.writeFile)(flairThemeFile, themeCSS$1, "utf-8");
175
178
  });
176
179
  }
177
180
  return userTheme;
178
181
  };
179
- const removeOutdatedCssFiles = async (sourceFilePath, cssFilePath, { flairGeneratedCssDir }) => {
180
- const previousGeneratedCssName = store.getGeneratedCssName(sourceFilePath);
181
- if (previousGeneratedCssName && previousGeneratedCssName !== cssFilePath) setTimeout(() => {
182
- (0, node_fs_promises.rm)(node_path.default.join(flairGeneratedCssDir, previousGeneratedCssName), { force: true });
183
- }, 2e3);
184
- else store.setFileNameToGeneratedCssNameMap(sourceFilePath, cssFilePath);
185
- };
186
182
  function shouldProcessFile(id, include, exclude) {
187
183
  const isIncluded = (0, picomatch.default)(include ?? ["**/*.{js,ts,jsx,tsx}"]);
188
184
  const isExcluded = (0, picomatch.default)(exclude ?? ["**/node_modules/**"]);
@@ -234,15 +230,17 @@ const transformCode = (code, filePath, options) => {
234
230
 
235
231
  //#endregion
236
232
  //#region src/index.ts
237
- const SourceMap = __home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_source_map_2_1_1_node_modules__parcel_source_map_dist_node_js.default.default ?? __home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_source_map_2_1_1_node_modules__parcel_source_map_dist_node_js.default;
238
- var src_default = new __home_runner_work_flairjs_flairjs_node_modules__pnpm__parcel_plugin_2_16_0__parcel_core_2_16_0__swc_helpers_0_5_17__node_modules__parcel_plugin_lib_PluginAPI_js.Transformer({
233
+ const SourceMap = __parcel_source_map.default.default ?? __parcel_source_map.default;
234
+ let initialized = false;
235
+ const transformer = new __parcel_plugin.Transformer({
239
236
  async loadConfig({ config }) {
240
- const getConfigResult = await config.getConfig(["tool.config.js"]);
237
+ const getConfigResult = await config.getConfig(["flair.config.js"]);
241
238
  const filePath = getConfigResult?.filePath;
242
239
  const configContents = getConfigResult?.contents;
243
240
  if (filePath?.endsWith(".js")) config.invalidateOnStartup();
244
- const cssGeneratedDir = await setupGeneratedCssDir();
245
- const userTheme = await setupUserThemeFile({ buildThemeFile: configContents?.buildThemeFile });
241
+ const cssGeneratedDir = await setupGeneratedCssDir({ clearExisting: false });
242
+ const userTheme = initialized ? await getUserTheme() : await setupUserThemeFile({ buildThemeFile: configContents?.buildThemeFile });
243
+ if (!initialized) initialized = true;
246
244
  return {
247
245
  ...configContents,
248
246
  cssGeneratedDir,
@@ -257,7 +255,7 @@ var src_default = new __home_runner_work_flairjs_flairjs_node_modules__pnpm__par
257
255
  try {
258
256
  const code = await asset.getCode();
259
257
  const result = transformCode(code, asset.filePath, {
260
- appendTimestampToCssFile: true,
258
+ appendTimestampToCssFile: false,
261
259
  classNameList: config?.classNameList,
262
260
  cssPreprocessor: config?.cssPreprocessor ? (css) => config.cssPreprocessor(css, asset.filePath) : void 0,
263
261
  theme: config.userTheme?.theme,
@@ -265,13 +263,14 @@ var src_default = new __home_runner_work_flairjs_flairjs_node_modules__pnpm__par
265
263
  cssOutDir
266
264
  });
267
265
  if (!result) return [asset];
268
- if (result.generatedCssName) removeOutdatedCssFiles(asset.filePath, result.generatedCssName, { flairGeneratedCssDir: cssOutDir });
266
+ if (!result.generatedCssName) return [asset];
267
+ asset.addURLDependency(node_path.resolve(cssOutDir, result.generatedCssName), { pipeline: "css" });
269
268
  asset.setCode(result.code);
270
- if (result.sourcemap) {
269
+ if (result.sourcemap) try {
271
270
  const sourcemap = new SourceMap(options.projectRoot);
272
271
  sourcemap.addVLQMap(JSON.parse(result.sourcemap));
273
272
  asset.setMap(sourcemap);
274
- }
273
+ } catch {}
275
274
  return [asset];
276
275
  } catch (error) {
277
276
  logger$1.error({
@@ -282,6 +281,7 @@ var src_default = new __home_runner_work_flairjs_flairjs_node_modules__pnpm__par
282
281
  }
283
282
  }
284
283
  });
284
+ var src_default = transformer;
285
285
 
286
286
  //#endregion
287
287
  module.exports = src_default;
package/dist/esm/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import module from "node:module";
2
2
  import { existsSync, watch } from "node:fs";
3
3
  import { mkdir, rm, writeFile } from "node:fs/promises";
4
+ import * as path$2 from "node:path";
4
5
  import path, { dirname } from "node:path";
5
6
  import * as esbuild from "esbuild";
6
7
  import { existsSync as existsSync$1 } from "fs";
@@ -9,8 +10,8 @@ import path$1 from "path";
9
10
  import { pathToFileURL } from "url";
10
11
  import picomatch from "picomatch";
11
12
  import { transformCode } from "@flairjs/core";
12
- import { Transformer } from "/home/runner/work/flairjs/flairjs/node_modules/.pnpm/@parcel+plugin@2.16.0_@parcel+core@2.16.0_@swc+helpers@0.5.17_/node_modules/@parcel/plugin/lib/PluginAPI.js";
13
- import SourceMapImport from "/home/runner/work/flairjs/flairjs/node_modules/.pnpm/@parcel+source-map@2.1.1/node_modules/@parcel/source-map/dist/node.js";
13
+ import { Transformer } from "@parcel/plugin";
14
+ import SourceMapImport from "@parcel/source-map";
14
15
 
15
16
  //#region ../shared/dist/esm/index.js
16
17
  String.raw;
@@ -64,8 +65,8 @@ var Store = class {
64
65
  };
65
66
  const store = new Store();
66
67
  const __dirname = dirname(fileURLToPath(import.meta.url));
67
- const getUserTheme = async () => {
68
- if (store.getUserTheme()) return store.getUserTheme();
68
+ const getUserTheme = async (options) => {
69
+ if (store.getUserTheme() && !options?.ignoreCache) return store.getUserTheme();
69
70
  try {
70
71
  let userThemeFilePath = path$1.resolve(process.cwd(), "flair.theme.ts");
71
72
  if (!existsSync$1(userThemeFilePath)) userThemeFilePath = path$1.resolve(process.cwd(), "flair.theme.js");
@@ -103,11 +104,12 @@ const getGeneratedCssDir = () => {
103
104
  const flairThemeFile = require.resolve("@flairjs/client/theme.css");
104
105
  return path.resolve(flairThemeFile, "../generated-css");
105
106
  };
106
- const setupGeneratedCssDir = async () => {
107
+ const setupGeneratedCssDir = async (options) => {
107
108
  const flairGeneratedCssDir = getGeneratedCssDir();
109
+ const { clearExisting = true } = options ?? {};
108
110
  try {
109
111
  if (!existsSync(flairGeneratedCssDir)) await mkdir(flairGeneratedCssDir);
110
- else {
112
+ else if (clearExisting) {
111
113
  await rm(flairGeneratedCssDir, {
112
114
  recursive: true,
113
115
  force: true
@@ -122,31 +124,26 @@ const setupGeneratedCssDir = async () => {
122
124
  }
123
125
  return flairGeneratedCssDir;
124
126
  };
125
- const setupUserThemeFile = async ({ buildThemeFile }) => {
127
+ const setupUserThemeFile = async ({ buildThemeFile, onThemeFileChange, deleteBeforeWrite = false }) => {
126
128
  const flairThemeFile = require.resolve("@flairjs/client/theme.css");
127
129
  let userTheme = await getUserTheme();
128
130
  const buildThemeCSS = buildThemeFile ?? buildThemeTokens;
129
131
  if (userTheme) {
130
132
  const themeCSS = buildThemeCSS(userTheme.theme);
131
133
  store.setLastThemeUpdate(Date.now());
134
+ if (deleteBeforeWrite) await rm(flairThemeFile, { force: true });
132
135
  await writeFile(flairThemeFile, themeCSS, "utf-8");
133
136
  watch(userTheme.originalPath, async () => {
134
137
  userTheme = await getUserTheme();
135
138
  store.setLastThemeUpdate(Date.now());
136
139
  if (!userTheme) return;
137
140
  const themeCSS$1 = buildThemeCSS(userTheme.theme);
141
+ onThemeFileChange?.();
138
142
  await writeFile(flairThemeFile, themeCSS$1, "utf-8");
139
143
  });
140
144
  }
141
145
  return userTheme;
142
146
  };
143
- const removeOutdatedCssFiles = async (sourceFilePath, cssFilePath, { flairGeneratedCssDir }) => {
144
- const previousGeneratedCssName = store.getGeneratedCssName(sourceFilePath);
145
- if (previousGeneratedCssName && previousGeneratedCssName !== cssFilePath) setTimeout(() => {
146
- rm(path.join(flairGeneratedCssDir, previousGeneratedCssName), { force: true });
147
- }, 2e3);
148
- else store.setFileNameToGeneratedCssNameMap(sourceFilePath, cssFilePath);
149
- };
150
147
  function shouldProcessFile(id, include, exclude) {
151
148
  const isIncluded = picomatch(include ?? ["**/*.{js,ts,jsx,tsx}"]);
152
149
  const isExcluded = picomatch(exclude ?? ["**/node_modules/**"]);
@@ -199,14 +196,16 @@ const transformCode$1 = (code, filePath, options) => {
199
196
  //#endregion
200
197
  //#region src/index.ts
201
198
  const SourceMap = SourceMapImport.default ?? SourceMapImport;
202
- var src_default = new Transformer({
199
+ let initialized = false;
200
+ const transformer = new Transformer({
203
201
  async loadConfig({ config }) {
204
- const getConfigResult = await config.getConfig(["tool.config.js"]);
202
+ const getConfigResult = await config.getConfig(["flair.config.js"]);
205
203
  const filePath = getConfigResult?.filePath;
206
204
  const configContents = getConfigResult?.contents;
207
205
  if (filePath?.endsWith(".js")) config.invalidateOnStartup();
208
- const cssGeneratedDir = await setupGeneratedCssDir();
209
- const userTheme = await setupUserThemeFile({ buildThemeFile: configContents?.buildThemeFile });
206
+ const cssGeneratedDir = await setupGeneratedCssDir({ clearExisting: false });
207
+ const userTheme = initialized ? await getUserTheme() : await setupUserThemeFile({ buildThemeFile: configContents?.buildThemeFile });
208
+ if (!initialized) initialized = true;
210
209
  return {
211
210
  ...configContents,
212
211
  cssGeneratedDir,
@@ -221,7 +220,7 @@ var src_default = new Transformer({
221
220
  try {
222
221
  const code = await asset.getCode();
223
222
  const result = transformCode$1(code, asset.filePath, {
224
- appendTimestampToCssFile: true,
223
+ appendTimestampToCssFile: false,
225
224
  classNameList: config?.classNameList,
226
225
  cssPreprocessor: config?.cssPreprocessor ? (css) => config.cssPreprocessor(css, asset.filePath) : void 0,
227
226
  theme: config.userTheme?.theme,
@@ -229,13 +228,14 @@ var src_default = new Transformer({
229
228
  cssOutDir
230
229
  });
231
230
  if (!result) return [asset];
232
- if (result.generatedCssName) removeOutdatedCssFiles(asset.filePath, result.generatedCssName, { flairGeneratedCssDir: cssOutDir });
231
+ if (!result.generatedCssName) return [asset];
232
+ asset.addURLDependency(path$2.resolve(cssOutDir, result.generatedCssName), { pipeline: "css" });
233
233
  asset.setCode(result.code);
234
- if (result.sourcemap) {
234
+ if (result.sourcemap) try {
235
235
  const sourcemap = new SourceMap(options.projectRoot);
236
236
  sourcemap.addVLQMap(JSON.parse(result.sourcemap));
237
237
  asset.setMap(sourcemap);
238
- }
238
+ } catch {}
239
239
  return [asset];
240
240
  } catch (error) {
241
241
  logger$1.error({
@@ -246,6 +246,7 @@ var src_default = new Transformer({
246
246
  }
247
247
  }
248
248
  });
249
+ var src_default = transformer;
249
250
 
250
251
  //#endregion
251
252
  export { src_default as default };
@@ -1,14 +1,33 @@
1
- import { Transformer } from "@parcel/plugin";
2
- declare const _default: Transformer<{
3
- cssGeneratedDir: string | null;
4
- userTheme: {
5
- theme: any;
6
- originalPath: string;
7
- } | null;
8
- cssPreprocessor?: (css: string, id: string) => string;
9
- include?: string | string[];
10
- exclude?: string | string[];
11
- buildThemeFile?: (theme: import("@flairjs/client").FlairThemeConfig) => string;
12
- classNameList?: string[];
13
- }>;
14
- export default _default;
1
+ import { FlairThemeConfig } from '@flairjs/client';
2
+ import type { Transformer } from '@parcel/plugin';
3
+
4
+ export declare interface FlairJsParcelTransformerOptions extends SharedPluginOptions {
5
+ }
6
+
7
+ declare interface SharedPluginOptions {
8
+ /**
9
+ * Preprocess the extracted CSS before it is passed to lightningcss
10
+ * @experimental
11
+ * @param css the extracted css
12
+ * @param id the id of the file being processed
13
+ * @returns the processed css
14
+ */
15
+ cssPreprocessor?: (css: string, id: string) => string;
16
+ include?: string | string[];
17
+ exclude?: string | string[];
18
+ /**
19
+ * Override the default theme file content based on the user theme
20
+ * @param theme the user theme
21
+ * @returns the theme file content
22
+ */
23
+ buildThemeFile?: (theme: FlairThemeConfig) => string;
24
+ /**
25
+ * List of class names used in the project. Supports regex.
26
+ */
27
+ classNameList?: string[];
28
+ }
29
+
30
+ declare const transformer: Transformer<FlairJsParcelTransformerOptions>;
31
+ export default transformer;
32
+
33
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flairjs/parcel-transformer",
3
- "version": "0.0.1-beta.1",
3
+ "version": "0.0.1-beta.10",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -13,26 +13,30 @@
13
13
  },
14
14
  "peerDependencies": {
15
15
  "parcel": ">=2.0.0",
16
- "@flairjs/core": "0.0.1-beta.5"
16
+ "@flairjs/core": "0.0.1-beta.8"
17
17
  },
18
18
  "devDependencies": {
19
- "@biomejs/biome": "^1.9.4",
20
- "@parcel/plugin": "^2.16.0",
21
- "@parcel/source-map": "^2.1.1",
22
- "@rollup/plugin-typescript": "^12.1.4",
19
+ "@biomejs/biome": "^2.2.4",
20
+ "@microsoft/api-extractor": "^7.52.13",
23
21
  "@types/node": "^22.8.1",
24
22
  "parcel": "^2.16.0",
23
+ "rimraf": "^6.0.1",
25
24
  "rolldown": "1.0.0-beta.37",
26
25
  "typescript": "^5.8.2",
27
- "@flairjs/bundler-shared": "0.0.1-beta.8",
28
- "@flairjs/core": "0.0.1-beta.5"
26
+ "@flairjs/bundler-shared": "0.0.1-beta.14",
27
+ "@flairjs/core": "0.0.1-beta.8"
28
+ },
29
+ "engines": {
30
+ "parcel": ">=2.0.0"
29
31
  },
30
32
  "dependencies": {
33
+ "@parcel/plugin": "^2.16.0",
34
+ "@parcel/source-map": "^2.1.1",
31
35
  "esbuild": "^0.25.10",
32
36
  "picomatch": "^4.0.3"
33
37
  },
34
38
  "scripts": {
35
- "build": "rolldown -c",
39
+ "build": "rimraf dist && tsc && api-extractor run --local && rolldown -c && rimraf dist/types-temp",
36
40
  "check": "biome check --write",
37
41
  "dev": "rolldown -w -c",
38
42
  "format": "biome format --write"