@workleap/tsup-configs 3.0.6 → 3.0.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/CHANGELOG.md CHANGED
@@ -1,67 +1,79 @@
1
1
  # @workleap/tsup-configs
2
2
 
3
+ ## 3.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - [#242](https://github.com/workleap/wl-web-configs/pull/242) [`e165cb4`](https://github.com/workleap/wl-web-configs/commit/e165cb447e699e19f06d41532216e36c09d7b945) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
8
+
9
+ ## 3.0.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [#230](https://github.com/workleap/wl-web-configs/pull/230) [`0a4279c`](https://github.com/workleap/wl-web-configs/commit/0a4279c40b7c2ea76c7e1884a8e2fd744ca9b7c1) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Packages now includes the source codes and sourcemap.
14
+
3
15
  ## 3.0.6
4
16
 
5
17
  ### Patch Changes
6
18
 
7
- - [#199](https://github.com/gsoft-inc/wl-web-configs/pull/199) [`7805dbe`](https://github.com/gsoft-inc/wl-web-configs/commit/7805dbe75532e16797bc62ccccc7e0c4e8be66b1) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Add an export for the tsup configs default entry paths.
19
+ - [#199](https://github.com/workleap/wl-web-configs/pull/199) [`7805dbe`](https://github.com/workleap/wl-web-configs/commit/7805dbe75532e16797bc62ccccc7e0c4e8be66b1) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Add an export for the tsup configs default entry paths.
8
20
 
9
21
  ## 3.0.5
10
22
 
11
23
  ### Patch Changes
12
24
 
13
- - [#197](https://github.com/gsoft-inc/wl-web-configs/pull/197) [`d8b3d36`](https://github.com/gsoft-inc/wl-web-configs/commit/d8b3d36ab87dfd1e6be06186d03ed3427f4c64e0) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Exclusing css files from the entry option as they should import from tsx files.
25
+ - [#197](https://github.com/workleap/wl-web-configs/pull/197) [`d8b3d36`](https://github.com/workleap/wl-web-configs/commit/d8b3d36ab87dfd1e6be06186d03ed3427f4c64e0) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Exclusing css files from the entry option as they should import from tsx files.
14
26
 
15
27
  ## 3.0.4
16
28
 
17
29
  ### Patch Changes
18
30
 
19
- - [#181](https://github.com/gsoft-inc/wl-web-configs/pull/181) [`9a31cfc`](https://github.com/gsoft-inc/wl-web-configs/commit/9a31cfc6cc68455551c5b1b040843e8a7f83d6c9) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Excluding tests files and stories files from TSUP bundles.
31
+ - [#181](https://github.com/workleap/wl-web-configs/pull/181) [`9a31cfc`](https://github.com/workleap/wl-web-configs/commit/9a31cfc6cc68455551c5b1b040843e8a7f83d6c9) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Excluding tests files and stories files from TSUP bundles.
20
32
 
21
33
  ## 3.0.3
22
34
 
23
35
  ### Patch Changes
24
36
 
25
- - [#179](https://github.com/gsoft-inc/wl-web-configs/pull/179) [`61d3721`](https://github.com/gsoft-inc/wl-web-configs/commit/61d37216198083ba78cd4b1480e38c8d772a6119) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
37
+ - [#179](https://github.com/workleap/wl-web-configs/pull/179) [`61d3721`](https://github.com/workleap/wl-web-configs/commit/61d37216198083ba78cd4b1480e38c8d772a6119) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated dependencies.
26
38
 
27
39
  ## 3.0.2
28
40
 
29
41
  ### Patch Changes
30
42
 
31
- - [#177](https://github.com/gsoft-inc/wl-web-configs/pull/177) [`8936ce6`](https://github.com/gsoft-inc/wl-web-configs/commit/8936ce677cad205caba2f13a71f5c9208f1dd5e6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated packages dependencies.
43
+ - [#177](https://github.com/workleap/wl-web-configs/pull/177) [`8936ce6`](https://github.com/workleap/wl-web-configs/commit/8936ce677cad205caba2f13a71f5c9208f1dd5e6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated packages dependencies.
32
44
 
33
45
  ## 3.0.1
34
46
 
35
47
  ### Patch Changes
36
48
 
37
- - [#143](https://github.com/gsoft-inc/wl-web-configs/pull/143) [`334088f`](https://github.com/gsoft-inc/wl-web-configs/commit/334088fac63aad6cc245ee3300da076e5c201287) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated to SWC 1.3.85
49
+ - [#143](https://github.com/workleap/wl-web-configs/pull/143) [`334088f`](https://github.com/workleap/wl-web-configs/commit/334088fac63aad6cc245ee3300da076e5c201287) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated to SWC 1.3.85
38
50
 
39
51
  ## 3.0.0
40
52
 
41
53
  ### Major Changes
42
54
 
43
- - [#98](https://github.com/gsoft-inc/wl-web-configs/pull/98) [`56ca32e`](https://github.com/gsoft-inc/wl-web-configs/commit/56ca32ee3194c51210aacc5189f3ebbec5a4a7b6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - New start, every package has a major version bump
55
+ - [#98](https://github.com/workleap/wl-web-configs/pull/98) [`56ca32e`](https://github.com/workleap/wl-web-configs/commit/56ca32ee3194c51210aacc5189f3ebbec5a4a7b6) Thanks [@patricklafrance](https://github.com/patricklafrance)! - New start, every package has a major version bump
44
56
 
45
57
  ## 2.0.1
46
58
 
47
59
  ### Patch Changes
48
60
 
49
- - [#92](https://github.com/gsoft-inc/wl-web-configs/pull/92) [`66e8f10`](https://github.com/gsoft-inc/wl-web-configs/commit/66e8f1033a987523c65fe9e61f53dac6d2e38777) Thanks [@ofrogon](https://github.com/ofrogon)! - Migrate project from GitHub organization
61
+ - [#92](https://github.com/workleap/wl-web-configs/pull/92) [`66e8f10`](https://github.com/workleap/wl-web-configs/commit/66e8f1033a987523c65fe9e61f53dac6d2e38777) Thanks [@ofrogon](https://github.com/ofrogon)! - Migrate project from GitHub organization
50
62
 
51
63
  ## 2.0.0
52
64
 
53
65
  ### Major Changes
54
66
 
55
- - [#85](https://github.com/gsoft-inc/wl-web-configs/pull/85) [`bad2df7`](https://github.com/gsoft-inc/wl-web-configs/commit/bad2df75593fb70d431d73bdced653b157c50caa) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated TSUP configuration and added a new SWC config package
67
+ - [#85](https://github.com/workleap/wl-web-configs/pull/85) [`bad2df7`](https://github.com/workleap/wl-web-configs/commit/bad2df75593fb70d431d73bdced653b157c50caa) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated TSUP configuration and added a new SWC config package
56
68
 
57
69
  ## 1.0.1
58
70
 
59
71
  ### Patch Changes
60
72
 
61
- - [#74](https://github.com/gsoft-inc/wl-web-configs/pull/74) [`43c9eb1`](https://github.com/gsoft-inc/wl-web-configs/commit/43c9eb11e61896855666c44beb0e711c82a560a3) Thanks [@alexasselin008](https://github.com/alexasselin008)! - Updated installation documentation
73
+ - [#74](https://github.com/workleap/wl-web-configs/pull/74) [`43c9eb1`](https://github.com/workleap/wl-web-configs/commit/43c9eb11e61896855666c44beb0e711c82a560a3) Thanks [@alexasselin008](https://github.com/alexasselin008)! - Updated installation documentation
62
74
 
63
75
  ## 1.0.0
64
76
 
65
77
  ### Major Changes
66
78
 
67
- - [#55](https://github.com/gsoft-inc/wl-web-configs/pull/55) [`228dc8c`](https://github.com/gsoft-inc/wl-web-configs/commit/228dc8cf3a0b3bc82e7c5380c876284583158599) Thanks [@alexasselin008](https://github.com/alexasselin008)! - Initial release
79
+ - [#55](https://github.com/workleap/wl-web-configs/pull/55) [`228dc8c`](https://github.com/workleap/wl-web-configs/commit/228dc8cf3a0b3bc82e7c5380c876284583158599) Thanks [@alexasselin008](https://github.com/alexasselin008)! - Initial release
package/README.md CHANGED
@@ -5,21 +5,13 @@
5
5
 
6
6
  ## Usage
7
7
 
8
- View the [user's documentation](https://gsoft-inc.github.io/wl-web-configs/).
8
+ View the [user's documentation](https://workleap.github.io/wl-web-configs/).
9
9
 
10
10
  ## 🤝 Contributing
11
11
 
12
12
  View the [contributor's documentation](../../CONTRIBUTING.md).
13
13
 
14
- ### Notes
15
-
16
- #### CJS support
17
-
18
- To support CJS projects, this package is build for ESM and CJS formats. To support CJS, `type: "module"` has been temporary removed from the `package.json` file.
19
-
20
- Once all our projects use ESM, CJS support can be removed.
21
-
22
14
  ## License
23
15
 
24
- Copyright © 2023, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/gsoft-inc/workleap-license/blob/master/LICENSE.
16
+ Copyright © 2023, Workleap. This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license at https://github.com/workleap/workleap-license/blob/master/LICENSE.
25
17
 
@@ -1,9 +1,6 @@
1
- import { Options } from 'tsup';
2
-
3
- interface TsupConfigTransformerContext {
1
+ import type { Options as TsupConfig } from "tsup";
2
+ export interface TsupConfigTransformerContext {
4
3
  environment: "dev" | "build";
5
4
  }
6
- type TsupConfigTransformer = (config: Options, context: TsupConfigTransformerContext) => Options;
7
- declare function applyTransformers(config: Options, transformers: TsupConfigTransformer[], context: TsupConfigTransformerContext): Options;
8
-
9
- export { type TsupConfigTransformer, type TsupConfigTransformerContext, applyTransformers };
5
+ export type TsupConfigTransformer = (config: TsupConfig, context: TsupConfigTransformerContext) => TsupConfig;
6
+ export declare function applyTransformers(config: TsupConfig, transformers: TsupConfigTransformer[], context: TsupConfigTransformerContext): TsupConfig;
@@ -1,8 +1,9 @@
1
- 'use strict';
2
1
 
3
- // src/applyTransformers.ts
2
+ ;// CONCATENATED MODULE: ./src/applyTransformers.ts?__rslib_entry__
4
3
  function applyTransformers(config, transformers, context) {
5
- return transformers.reduce((acc, transformer) => transformer(acc, context), config);
4
+ return transformers.reduce((acc, transformer)=>transformer(acc, context), config);
6
5
  }
7
6
 
8
- exports.applyTransformers = applyTransformers;
7
+ export { applyTransformers };
8
+
9
+ //# sourceMappingURL=applyTransformers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyTransformers.js","sources":["webpack://@workleap/tsup-configs/./src/applyTransformers.ts"],"sourcesContent":["import type { Options as TsupConfig } from \"tsup\";\n\nexport interface TsupConfigTransformerContext {\n environment: \"dev\" | \"build\";\n}\n\nexport type TsupConfigTransformer = (config: TsupConfig, context: TsupConfigTransformerContext) => TsupConfig;\n\nexport function applyTransformers(config: TsupConfig, transformers: TsupConfigTransformer[], context: TsupConfigTransformerContext) {\n return transformers.reduce((acc, transformer) => transformer(acc, context), config);\n}\n"],"names":["applyTransformers","config","transformers","context","acc","transformer"],"mappings":";;AAQO,SAASA,kBAAkBC,MAAkB,EAAEC,YAAqC,EAAEC,OAAqC;IAC9H,OAAOD,aAAa,MAAM,CAAC,CAACE,KAAKC,cAAgBA,YAAYD,KAAKD,UAAUF;AAChF"}
package/dist/build.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- import { Options } from 'tsup';
2
- import { TsupConfigTransformer } from './applyTransformers.js';
3
-
4
- interface DefineBuildConfigOptions extends Options {
1
+ import type { Options as TsupConfig } from "tsup";
2
+ import { type TsupConfigTransformer } from "./applyTransformers.ts";
3
+ export interface DefineBuildConfigOptions extends TsupConfig {
5
4
  transformers?: TsupConfigTransformer[];
6
5
  }
7
- declare const TsupBuildEntryPaths: string[];
8
- declare function defineBuildConfig(options?: DefineBuildConfigOptions): Options;
9
-
10
- export { type DefineBuildConfigOptions, TsupBuildEntryPaths, defineBuildConfig };
6
+ export declare const TsupBuildEntryPaths: string[];
7
+ export declare function defineBuildConfig(options?: DefineBuildConfigOptions): TsupConfig;
package/dist/build.js CHANGED
@@ -1,38 +1,34 @@
1
- 'use strict';
1
+ import * as __WEBPACK_EXTERNAL_MODULE__applyTransformers_js_2d4fcf6d__ from "./applyTransformers.js";
2
2
 
3
- // src/applyTransformers.ts
4
- function applyTransformers(config, transformers, context) {
5
- return transformers.reduce((acc, transformer) => transformer(acc, context), config);
6
- }
3
+ ;// CONCATENATED MODULE: external "./applyTransformers.js"
4
+
5
+ ;// CONCATENATED MODULE: ./src/build.ts?__rslib_entry__
7
6
 
8
- // src/build.ts
9
- var TsupBuildEntryPaths = [
10
- "./src",
11
- "!src/**/*.css",
12
- "!src/**/*.stories.ts(x)",
13
- "!src/**/*.test.ts(x)"
7
+ const TsupBuildEntryPaths = [
8
+ "./src",
9
+ "!src/**/*.css",
10
+ "!src/**/*.stories.ts(x)",
11
+ "!src/**/*.test.ts(x)"
14
12
  ];
15
13
  function defineBuildConfig(options = {}) {
16
- const {
17
- transformers = [],
18
- ...rest
19
- } = options;
20
- const config = {
21
- clean: true,
22
- dts: true,
23
- treeshake: true,
24
- entry: TsupBuildEntryPaths,
25
- outDir: "./dist",
26
- format: "esm",
27
- target: "esnext",
28
- platform: "browser",
29
- ...rest
30
- };
31
- const transformedConfig = applyTransformers(config, transformers, {
32
- environment: "build"
33
- });
34
- return transformedConfig;
14
+ const { transformers = [], ...rest } = options;
15
+ const config = {
16
+ clean: true,
17
+ dts: true,
18
+ treeshake: true,
19
+ entry: TsupBuildEntryPaths,
20
+ outDir: "./dist",
21
+ format: "esm",
22
+ target: "esnext",
23
+ platform: "browser",
24
+ ...rest
25
+ };
26
+ const transformedConfig = (0,__WEBPACK_EXTERNAL_MODULE__applyTransformers_js_2d4fcf6d__.applyTransformers)(config, transformers, {
27
+ environment: "build"
28
+ });
29
+ return transformedConfig;
35
30
  }
36
31
 
37
- exports.TsupBuildEntryPaths = TsupBuildEntryPaths;
38
- exports.defineBuildConfig = defineBuildConfig;
32
+ export { TsupBuildEntryPaths, defineBuildConfig };
33
+
34
+ //# sourceMappingURL=build.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.js","sources":["webpack://@workleap/tsup-configs/./src/build.ts"],"sourcesContent":["import type { Options as TsupConfig } from \"tsup\";\nimport { applyTransformers, type TsupConfigTransformer } from \"./applyTransformers.ts\";\n\nexport interface DefineBuildConfigOptions extends TsupConfig {\n transformers?: TsupConfigTransformer[];\n}\n\nexport const TsupBuildEntryPaths = [\n \"./src\",\n \"!src/**/*.css\",\n \"!src/**/*.stories.ts(x)\",\n \"!src/**/*.test.ts(x)\"\n];\n\nexport function defineBuildConfig(options: DefineBuildConfigOptions = {}) {\n const {\n transformers = [],\n ...rest\n } = options;\n\n const config: TsupConfig = {\n clean: true,\n dts: true,\n treeshake: true,\n entry: TsupBuildEntryPaths,\n outDir: \"./dist\",\n format: \"esm\",\n target: \"esnext\",\n platform: \"browser\",\n ...rest\n };\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"build\"\n });\n\n return transformedConfig;\n}\n\n"],"names":["applyTransformers","TsupBuildEntryPaths","defineBuildConfig","options","transformers","rest","config","transformedConfig"],"mappings":";;;;;AACuF;AAMhF,MAAMC,sBAAsB;IAC/B;IACA;IACA;IACA;CACH,CAAC;AAEK,SAASC,kBAAkBC,UAAoC,CAAC,CAAC;IACpE,MAAM,EACFC,eAAe,EAAE,EACjB,GAAGC,MACN,GAAGF;IAEJ,MAAMG,SAAqB;QACvB,OAAO;QACP,KAAK;QACL,WAAW;QACX,OAAOL;QACP,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,GAAGI,IAAI;IACX;IAEA,MAAME,oBAAoBP,gFAAiBA,CAACM,QAAQF,cAAc;QAC9D,aAAa;IACjB;IAEA,OAAOG;AACX"}
package/dist/dev.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- import { Options } from 'tsup';
2
- import { TsupConfigTransformer } from './applyTransformers.js';
3
-
4
- interface DefineDevConfigOptions extends Options {
1
+ import type { Options as TsupConfig } from "tsup";
2
+ import { type TsupConfigTransformer } from "./applyTransformers.ts";
3
+ export interface DefineDevConfigOptions extends TsupConfig {
5
4
  transformers?: TsupConfigTransformer[];
6
5
  }
7
- declare const TsupDevEntryPaths: string[];
8
- declare function defineDevConfig(options?: DefineDevConfigOptions): Options;
9
-
10
- export { type DefineDevConfigOptions, TsupDevEntryPaths, defineDevConfig };
6
+ export declare const TsupDevEntryPaths: string[];
7
+ export declare function defineDevConfig(options?: DefineDevConfigOptions): TsupConfig;
package/dist/dev.js CHANGED
@@ -1,38 +1,34 @@
1
- 'use strict';
1
+ import * as __WEBPACK_EXTERNAL_MODULE__applyTransformers_js_2d4fcf6d__ from "./applyTransformers.js";
2
2
 
3
- // src/applyTransformers.ts
4
- function applyTransformers(config, transformers, context) {
5
- return transformers.reduce((acc, transformer) => transformer(acc, context), config);
6
- }
3
+ ;// CONCATENATED MODULE: external "./applyTransformers.js"
4
+
5
+ ;// CONCATENATED MODULE: ./src/dev.ts?__rslib_entry__
7
6
 
8
- // src/dev.ts
9
- var TsupDevEntryPaths = [
10
- "./src",
11
- "!src/**/*.css",
12
- "!src/**/*.stories.ts(x)",
13
- "!src/**/*.test.ts(x)"
7
+ const TsupDevEntryPaths = [
8
+ "./src",
9
+ "!src/**/*.css",
10
+ "!src/**/*.stories.ts(x)",
11
+ "!src/**/*.test.ts(x)"
14
12
  ];
15
13
  function defineDevConfig(options = {}) {
16
- const {
17
- transformers = [],
18
- ...rest
19
- } = options;
20
- const config = {
21
- dts: true,
22
- watch: true,
23
- entry: TsupDevEntryPaths,
24
- outDir: "./dist",
25
- format: "esm",
26
- target: "esnext",
27
- platform: "browser",
28
- sourcemap: "inline",
29
- ...rest
30
- };
31
- const transformedConfig = applyTransformers(config, transformers, {
32
- environment: "dev"
33
- });
34
- return transformedConfig;
14
+ const { transformers = [], ...rest } = options;
15
+ const config = {
16
+ dts: true,
17
+ watch: true,
18
+ entry: TsupDevEntryPaths,
19
+ outDir: "./dist",
20
+ format: "esm",
21
+ target: "esnext",
22
+ platform: "browser",
23
+ sourcemap: "inline",
24
+ ...rest
25
+ };
26
+ const transformedConfig = (0,__WEBPACK_EXTERNAL_MODULE__applyTransformers_js_2d4fcf6d__.applyTransformers)(config, transformers, {
27
+ environment: "dev"
28
+ });
29
+ return transformedConfig;
35
30
  }
36
31
 
37
- exports.TsupDevEntryPaths = TsupDevEntryPaths;
38
- exports.defineDevConfig = defineDevConfig;
32
+ export { TsupDevEntryPaths, defineDevConfig };
33
+
34
+ //# sourceMappingURL=dev.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.js","sources":["webpack://@workleap/tsup-configs/./src/dev.ts"],"sourcesContent":["import type { Options as TsupConfig } from \"tsup\";\nimport { applyTransformers, type TsupConfigTransformer } from \"./applyTransformers.ts\";\n\nexport interface DefineDevConfigOptions extends TsupConfig {\n transformers?: TsupConfigTransformer[];\n}\n\nexport const TsupDevEntryPaths = [\n \"./src\",\n \"!src/**/*.css\",\n \"!src/**/*.stories.ts(x)\",\n \"!src/**/*.test.ts(x)\"\n];\n\nexport function defineDevConfig(options: DefineDevConfigOptions = {}) {\n const {\n transformers = [],\n ...rest\n } = options;\n\n const config: TsupConfig = {\n dts: true,\n watch: true,\n entry: TsupDevEntryPaths,\n outDir: \"./dist\",\n format: \"esm\",\n target: \"esnext\",\n platform: \"browser\",\n sourcemap: \"inline\",\n ...rest\n };\n\n const transformedConfig = applyTransformers(config, transformers, {\n environment: \"dev\"\n });\n\n return transformedConfig;\n}\n"],"names":["applyTransformers","TsupDevEntryPaths","defineDevConfig","options","transformers","rest","config","transformedConfig"],"mappings":";;;;;AACuF;AAMhF,MAAMC,oBAAoB;IAC7B;IACA;IACA;IACA;CACH,CAAC;AAEK,SAASC,gBAAgBC,UAAkC,CAAC,CAAC;IAChE,MAAM,EACFC,eAAe,EAAE,EACjB,GAAGC,MACN,GAAGF;IAEJ,MAAMG,SAAqB;QACvB,KAAK;QACL,OAAO;QACP,OAAOL;QACP,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,WAAW;QACX,GAAGI,IAAI;IACX;IAEA,MAAME,oBAAoBP,gFAAiBA,CAACM,QAAQF,cAAc;QAC9D,aAAa;IACjB;IAEA,OAAOG;AACX"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { Options as TsupConfig } from 'tsup';
2
- export { TsupConfigTransformer, TsupConfigTransformerContext } from './applyTransformers.js';
3
- export { DefineBuildConfigOptions, TsupBuildEntryPaths, defineBuildConfig } from './build.js';
4
- export { DefineDevConfigOptions, TsupDevEntryPaths, defineDevConfig } from './dev.js';
1
+ import type { Options as TsupConfig } from "tsup";
2
+ export type { TsupConfigTransformer, TsupConfigTransformerContext } from "./applyTransformers.ts";
3
+ export * from "./build.ts";
4
+ export * from "./dev.ts";
5
+ export type { TsupConfig };
package/dist/index.js CHANGED
@@ -1,69 +1,9 @@
1
- 'use strict';
1
+ export * from "./build.js";
2
+ export * from "./dev.js";
2
3
 
3
- // src/applyTransformers.ts
4
- function applyTransformers(config, transformers, context) {
5
- return transformers.reduce((acc, transformer) => transformer(acc, context), config);
6
- }
4
+ ;// CONCATENATED MODULE: ./src/index.ts?__rslib_entry__
7
5
 
8
- // src/build.ts
9
- var TsupBuildEntryPaths = [
10
- "./src",
11
- "!src/**/*.css",
12
- "!src/**/*.stories.ts(x)",
13
- "!src/**/*.test.ts(x)"
14
- ];
15
- function defineBuildConfig(options = {}) {
16
- const {
17
- transformers = [],
18
- ...rest
19
- } = options;
20
- const config = {
21
- clean: true,
22
- dts: true,
23
- treeshake: true,
24
- entry: TsupBuildEntryPaths,
25
- outDir: "./dist",
26
- format: "esm",
27
- target: "esnext",
28
- platform: "browser",
29
- ...rest
30
- };
31
- const transformedConfig = applyTransformers(config, transformers, {
32
- environment: "build"
33
- });
34
- return transformedConfig;
35
- }
36
6
 
37
- // src/dev.ts
38
- var TsupDevEntryPaths = [
39
- "./src",
40
- "!src/**/*.css",
41
- "!src/**/*.stories.ts(x)",
42
- "!src/**/*.test.ts(x)"
43
- ];
44
- function defineDevConfig(options = {}) {
45
- const {
46
- transformers = [],
47
- ...rest
48
- } = options;
49
- const config = {
50
- dts: true,
51
- watch: true,
52
- entry: TsupDevEntryPaths,
53
- outDir: "./dist",
54
- format: "esm",
55
- target: "esnext",
56
- platform: "browser",
57
- sourcemap: "inline",
58
- ...rest
59
- };
60
- const transformedConfig = applyTransformers(config, transformers, {
61
- environment: "dev"
62
- });
63
- return transformedConfig;
64
- }
65
7
 
66
- exports.TsupBuildEntryPaths = TsupBuildEntryPaths;
67
- exports.TsupDevEntryPaths = TsupDevEntryPaths;
68
- exports.defineBuildConfig = defineBuildConfig;
69
- exports.defineDevConfig = defineDevConfig;
8
+
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["webpack://@workleap/tsup-configs/./src/index.ts"],"sourcesContent":["import type { Options as TsupConfig } from \"tsup\";\n\nexport type { TsupConfigTransformer, TsupConfigTransformerContext } from \"./applyTransformers.ts\";\nexport * from \"./build.ts\";\nexport * from \"./dev.ts\";\nexport type { TsupConfig };\n\n"],"names":[],"mappings":";;;;AAG2B;AACF"}
package/package.json CHANGED
@@ -1,33 +1,28 @@
1
1
  {
2
2
  "name": "@workleap/tsup-configs",
3
3
  "author": "Workleap",
4
- "description": "Workleap's recommended tsup configs.",
5
- "version": "3.0.6",
4
+ "description": "Workleap's recommended tsup configurations.",
5
+ "version": "3.0.8",
6
6
  "license": "Apache-2.0",
7
- "keywords": [
8
- "workleap",
9
- "tsup",
10
- "tsup-config"
11
- ],
12
7
  "repository": {
13
8
  "type": "git",
14
- "url": "git+https://github.com/gsoft-inc/wl-web-configs.git",
9
+ "url": "git+https://github.com/workleap/wl-web-configs.git",
15
10
  "directory": "packages/tsup-configs"
16
11
  },
12
+ "type": "module",
13
+ "publishConfig": {
14
+ "access": "public",
15
+ "provenance": true
16
+ },
17
17
  "exports": {
18
18
  ".": {
19
- "require": {
20
- "types": "./dist/index.d.ts",
21
- "default": "./dist/index.js"
22
- },
23
- "import": {
24
- "types": "./dist/index.d.mts",
25
- "default": "./dist/index.mjs"
26
- }
19
+ "import": "./dist/index.js",
20
+ "types": "./dist/index.d.ts",
21
+ "default": "./dist/index.js"
27
22
  }
28
23
  },
29
- "types": "./dist/index.d.ts",
30
24
  "files": [
25
+ "src",
31
26
  "dist",
32
27
  "CHANGELOG.md",
33
28
  "README.md"
@@ -37,21 +32,20 @@
37
32
  "typescript": "*"
38
33
  },
39
34
  "devDependencies": {
40
- "@swc/core": "1.4.12",
41
- "@swc/jest": "0.2.36",
42
- "@types/jest": "29.5.12",
43
- "jest": "29.7.0",
44
- "tsup": "8.0.2",
45
- "typescript": "5.4.4",
46
- "@workleap/eslint-plugin": "3.2.1",
47
- "@workleap/typescript-configs": "3.0.2",
48
- "@workleap/swc-configs": "2.2.3"
49
- },
50
- "publishConfig": {
51
- "access": "public",
52
- "provenance": true
35
+ "@rsbuild/core": "1.2.19",
36
+ "@rslib/core": "0.5.4",
37
+ "@typescript-eslint/parser": "8.26.1",
38
+ "eslint": "8.57.0",
39
+ "typescript": "5.8.2",
40
+ "vitest": "3.0.9",
41
+ "@workleap/eslint-plugin": "3.3.1",
42
+ "@workleap/rslib-configs": "1.0.3",
43
+ "@workleap/typescript-configs": "3.0.2"
53
44
  },
54
45
  "scripts": {
55
- "build": "tsup"
46
+ "build": "rslib build -c rslib.config.ts",
47
+ "eslint": "eslint . --max-warnings=-0 --cache --cache-location node_modules/.cache/eslint",
48
+ "typecheck": "tsc",
49
+ "test": "vitest --config vitest.config.ts --no-watch"
56
50
  }
57
51
  }
@@ -0,0 +1,11 @@
1
+ import type { Options as TsupConfig } from "tsup";
2
+
3
+ export interface TsupConfigTransformerContext {
4
+ environment: "dev" | "build";
5
+ }
6
+
7
+ export type TsupConfigTransformer = (config: TsupConfig, context: TsupConfigTransformerContext) => TsupConfig;
8
+
9
+ export function applyTransformers(config: TsupConfig, transformers: TsupConfigTransformer[], context: TsupConfigTransformerContext) {
10
+ return transformers.reduce((acc, transformer) => transformer(acc, context), config);
11
+ }
package/src/build.ts ADDED
@@ -0,0 +1,39 @@
1
+ import type { Options as TsupConfig } from "tsup";
2
+ import { applyTransformers, type TsupConfigTransformer } from "./applyTransformers.ts";
3
+
4
+ export interface DefineBuildConfigOptions extends TsupConfig {
5
+ transformers?: TsupConfigTransformer[];
6
+ }
7
+
8
+ export const TsupBuildEntryPaths = [
9
+ "./src",
10
+ "!src/**/*.css",
11
+ "!src/**/*.stories.ts(x)",
12
+ "!src/**/*.test.ts(x)"
13
+ ];
14
+
15
+ export function defineBuildConfig(options: DefineBuildConfigOptions = {}) {
16
+ const {
17
+ transformers = [],
18
+ ...rest
19
+ } = options;
20
+
21
+ const config: TsupConfig = {
22
+ clean: true,
23
+ dts: true,
24
+ treeshake: true,
25
+ entry: TsupBuildEntryPaths,
26
+ outDir: "./dist",
27
+ format: "esm",
28
+ target: "esnext",
29
+ platform: "browser",
30
+ ...rest
31
+ };
32
+
33
+ const transformedConfig = applyTransformers(config, transformers, {
34
+ environment: "build"
35
+ });
36
+
37
+ return transformedConfig;
38
+ }
39
+
package/src/dev.ts ADDED
@@ -0,0 +1,38 @@
1
+ import type { Options as TsupConfig } from "tsup";
2
+ import { applyTransformers, type TsupConfigTransformer } from "./applyTransformers.ts";
3
+
4
+ export interface DefineDevConfigOptions extends TsupConfig {
5
+ transformers?: TsupConfigTransformer[];
6
+ }
7
+
8
+ export const TsupDevEntryPaths = [
9
+ "./src",
10
+ "!src/**/*.css",
11
+ "!src/**/*.stories.ts(x)",
12
+ "!src/**/*.test.ts(x)"
13
+ ];
14
+
15
+ export function defineDevConfig(options: DefineDevConfigOptions = {}) {
16
+ const {
17
+ transformers = [],
18
+ ...rest
19
+ } = options;
20
+
21
+ const config: TsupConfig = {
22
+ dts: true,
23
+ watch: true,
24
+ entry: TsupDevEntryPaths,
25
+ outDir: "./dist",
26
+ format: "esm",
27
+ target: "esnext",
28
+ platform: "browser",
29
+ sourcemap: "inline",
30
+ ...rest
31
+ };
32
+
33
+ const transformedConfig = applyTransformers(config, transformers, {
34
+ environment: "dev"
35
+ });
36
+
37
+ return transformedConfig;
38
+ }
package/src/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ import type { Options as TsupConfig } from "tsup";
2
+
3
+ export type { TsupConfigTransformer, TsupConfigTransformerContext } from "./applyTransformers.ts";
4
+ export * from "./build.ts";
5
+ export * from "./dev.ts";
6
+ export type { TsupConfig };
7
+
@@ -1,9 +0,0 @@
1
- import { Options } from 'tsup';
2
-
3
- interface TsupConfigTransformerContext {
4
- environment: "dev" | "build";
5
- }
6
- type TsupConfigTransformer = (config: Options, context: TsupConfigTransformerContext) => Options;
7
- declare function applyTransformers(config: Options, transformers: TsupConfigTransformer[], context: TsupConfigTransformerContext): Options;
8
-
9
- export { type TsupConfigTransformer, type TsupConfigTransformerContext, applyTransformers };
@@ -1 +0,0 @@
1
- export { applyTransformers } from './chunk-3UBBOKDF.mjs';
package/dist/build.d.mts DELETED
@@ -1,10 +0,0 @@
1
- import { Options } from 'tsup';
2
- import { TsupConfigTransformer } from './applyTransformers.mjs';
3
-
4
- interface DefineBuildConfigOptions extends Options {
5
- transformers?: TsupConfigTransformer[];
6
- }
7
- declare const TsupBuildEntryPaths: string[];
8
- declare function defineBuildConfig(options?: DefineBuildConfigOptions): Options;
9
-
10
- export { type DefineBuildConfigOptions, TsupBuildEntryPaths, defineBuildConfig };
package/dist/build.mjs DELETED
@@ -1,2 +0,0 @@
1
- export { TsupBuildEntryPaths, defineBuildConfig } from './chunk-V7U7TSIL.mjs';
2
- import './chunk-3UBBOKDF.mjs';
@@ -1,6 +0,0 @@
1
- // src/applyTransformers.ts
2
- function applyTransformers(config, transformers, context) {
3
- return transformers.reduce((acc, transformer) => transformer(acc, context), config);
4
- }
5
-
6
- export { applyTransformers };
@@ -1,32 +0,0 @@
1
- import { applyTransformers } from './chunk-3UBBOKDF.mjs';
2
-
3
- // src/dev.ts
4
- var TsupDevEntryPaths = [
5
- "./src",
6
- "!src/**/*.css",
7
- "!src/**/*.stories.ts(x)",
8
- "!src/**/*.test.ts(x)"
9
- ];
10
- function defineDevConfig(options = {}) {
11
- const {
12
- transformers = [],
13
- ...rest
14
- } = options;
15
- const config = {
16
- dts: true,
17
- watch: true,
18
- entry: TsupDevEntryPaths,
19
- outDir: "./dist",
20
- format: "esm",
21
- target: "esnext",
22
- platform: "browser",
23
- sourcemap: "inline",
24
- ...rest
25
- };
26
- const transformedConfig = applyTransformers(config, transformers, {
27
- environment: "dev"
28
- });
29
- return transformedConfig;
30
- }
31
-
32
- export { TsupDevEntryPaths, defineDevConfig };
@@ -1,32 +0,0 @@
1
- import { applyTransformers } from './chunk-3UBBOKDF.mjs';
2
-
3
- // src/build.ts
4
- var TsupBuildEntryPaths = [
5
- "./src",
6
- "!src/**/*.css",
7
- "!src/**/*.stories.ts(x)",
8
- "!src/**/*.test.ts(x)"
9
- ];
10
- function defineBuildConfig(options = {}) {
11
- const {
12
- transformers = [],
13
- ...rest
14
- } = options;
15
- const config = {
16
- clean: true,
17
- dts: true,
18
- treeshake: true,
19
- entry: TsupBuildEntryPaths,
20
- outDir: "./dist",
21
- format: "esm",
22
- target: "esnext",
23
- platform: "browser",
24
- ...rest
25
- };
26
- const transformedConfig = applyTransformers(config, transformers, {
27
- environment: "build"
28
- });
29
- return transformedConfig;
30
- }
31
-
32
- export { TsupBuildEntryPaths, defineBuildConfig };
package/dist/dev.d.mts DELETED
@@ -1,10 +0,0 @@
1
- import { Options } from 'tsup';
2
- import { TsupConfigTransformer } from './applyTransformers.mjs';
3
-
4
- interface DefineDevConfigOptions extends Options {
5
- transformers?: TsupConfigTransformer[];
6
- }
7
- declare const TsupDevEntryPaths: string[];
8
- declare function defineDevConfig(options?: DefineDevConfigOptions): Options;
9
-
10
- export { type DefineDevConfigOptions, TsupDevEntryPaths, defineDevConfig };
package/dist/dev.mjs DELETED
@@ -1,2 +0,0 @@
1
- export { TsupDevEntryPaths, defineDevConfig } from './chunk-GC2YTVB4.mjs';
2
- import './chunk-3UBBOKDF.mjs';
package/dist/index.d.mts DELETED
@@ -1,4 +0,0 @@
1
- export { Options as TsupConfig } from 'tsup';
2
- export { TsupConfigTransformer, TsupConfigTransformerContext } from './applyTransformers.mjs';
3
- export { DefineBuildConfigOptions, TsupBuildEntryPaths, defineBuildConfig } from './build.mjs';
4
- export { DefineDevConfigOptions, TsupDevEntryPaths, defineDevConfig } from './dev.mjs';
package/dist/index.mjs DELETED
@@ -1,3 +0,0 @@
1
- export { TsupBuildEntryPaths, defineBuildConfig } from './chunk-V7U7TSIL.mjs';
2
- export { TsupDevEntryPaths, defineDevConfig } from './chunk-GC2YTVB4.mjs';
3
- import './chunk-3UBBOKDF.mjs';