makepack 1.7.8 → 1.7.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makepack",
3
- "version": "1.7.8",
3
+ "version": "1.7.9",
4
4
  "type": "module",
5
5
  "description": "A CLI tool to create, build, and manage JavaScript, TypeScript, React, and React-TypeScript libraries for npm projects.",
6
6
  "categories": [
@@ -2,24 +2,13 @@ import { rollup } from "rollup";
2
2
  import resolve from "@rollup/plugin-node-resolve";
3
3
  import commonjs from "@rollup/plugin-commonjs";
4
4
  import typescript from "@rollup/plugin-typescript";
5
- // import { builtinModules } from "module";
6
- import fs from "fs";
7
5
  import path from "path";
8
6
  import dts from "rollup-plugin-dts";
9
7
  import json from '@rollup/plugin-json';
10
8
  import terser from "@rollup/plugin-terser";
11
9
 
12
10
  async function bind(args, spinner) {
13
- // const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"));
14
- // const _external = [
15
- // ...builtinModules,
16
- // ...Object.keys(pkg.dependencies ?? {}),
17
- // ...Object.keys(pkg.devDependencies ?? {}),
18
- // ...Object.keys(pkg.peerDependencies ?? {}),
19
- // "tslib",
20
- // ];
21
-
22
- const isTs = args.entry.endsWith(".ts")
11
+ const isTs = args.entry.endsWith('.ts') || args.entry.endsWith('.tsx')
23
12
 
24
13
  const config = {
25
14
  input: [args.entry],
@@ -34,18 +23,6 @@ async function bind(args, spinner) {
34
23
  }),
35
24
  commonjs(),
36
25
  isTs ? typescript({
37
- // target: "ES2017",
38
- // module: "ESNext",
39
- // jsx: "react",
40
- // strict: true,
41
- // forceConsistentCasingInFileNames: true,
42
- // esModuleInterop: true,
43
- // importHelpers: true,
44
- // moduleResolution: "node",
45
- // skipLibCheck: true,
46
- // include: ["src/**/*.ts", "src/**/*.tsx"],
47
- // exclude: ["node_modules", ".mpack"],
48
-
49
26
  tsconfig: false,
50
27
  target: "ES2017",
51
28
  module: "ESNext",
@@ -58,7 +35,7 @@ async function bind(args, spinner) {
58
35
  forceConsistentCasingInFileNames: true,
59
36
  declaration: false,
60
37
  emitDeclarationOnly: false,
61
- include: ["src/**/*.ts", "src/**/*.tsx"],
38
+ include: ["src/**/*.{ts,tsx}"],
62
39
  exclude: ["node_modules", ".mpack"]
63
40
  }) : null,
64
41
  args.minify ? terser() : null,
@@ -98,7 +98,7 @@ async function loadExp() {
98
98
  }
99
99
 
100
100
  const ext = path.extname(uxpfile);
101
- const isTs = ext === '.ts';
101
+ const isTs = ext === '.ts' || ext === '.tsx';
102
102
 
103
103
  if (isTs) {
104
104
  if (esbuildCtx) {