@daiyam/artifact-npm-lib-ts 0.1.1 → 0.2.0

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.
@@ -0,0 +1,6 @@
1
+ entry:
2
+ .: index.ts
3
+ format:
4
+ - esm
5
+ - cjs
6
+ outDir: lib
@@ -3,11 +3,12 @@
3
3
  "main": "lib/cjs/index.cjs",
4
4
  "module": "lib/esm/index.js",
5
5
  "scripts": {
6
- "build": "tsdown",
7
- "clean": "rimraf lib",
6
+ "build": "npm run clean && npm run build:lib",
7
+ "build:lib": "tsc-leda generate",
8
+ "build:package": "tsc-leda update-package",
8
9
  "prepack": "npm run build"
9
10
  },
10
11
  "devDependencies": {
11
- "tsdown": "^0.12.9"
12
+ "@zokugun/tsc-leda": "^0.1.0"
12
13
  }
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daiyam/artifact-npm-lib-ts",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "The configuration to create a lib",
5
5
  "author": {
6
6
  "name": "Baptiste Augrain",
@@ -31,5 +31,5 @@
31
31
  "project-template",
32
32
  "scaffold"
33
33
  ],
34
- "gitHead": "a3fd16000d1997c35b8f6e967889a45be75dcb1b"
34
+ "gitHead": "b342b71c99ff5fc50584fc848503953e404c030d"
35
35
  }
@@ -1,32 +0,0 @@
1
- import path from 'path';
2
- import { defineConfig } from 'tsdown';
3
-
4
- export default defineConfig({
5
- entry: [
6
- 'src/index.ts',
7
- 'src/async.ts',
8
- 'src/sync.ts',
9
- ],
10
- format: ['esm', 'cjs'],
11
- outDir: 'lib',
12
- dts: true,
13
- unbundle: true,
14
- skipNodeModulesBundle: true,
15
- // @ts-ignore
16
- outputOptions: (options, format, _context) => {
17
- let subdir: string | undefined;
18
-
19
- if(format === 'es') {
20
- subdir = 'esm';
21
- }
22
- else if(format === 'cjs') {
23
- subdir = 'cjs';
24
- }
25
-
26
- if(subdir) {
27
- options.dir = path.join(options.dir, subdir);
28
- }
29
-
30
- return options;
31
- },
32
- });