jiek 0.2.1-alpha.2 → 0.2.2-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. package/bin/jiek.js +8 -1
  2. package/dist/base.esm.d.ts +55 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.esm.d.ts +2 -0
  5. package/dist/cli.esm.js +10 -0
  6. package/dist/cli.esm.js.map +1 -0
  7. package/dist/cli.esm.min.js +2 -0
  8. package/dist/cli.esm.min.js.map +1 -0
  9. package/dist/cli.iife.js +658 -0
  10. package/dist/cli.iife.js.map +1 -0
  11. package/dist/cli.iife.min.js +2 -0
  12. package/dist/cli.iife.min.js.map +1 -0
  13. package/dist/cli.umd.js +661 -0
  14. package/dist/cli.umd.js.map +1 -0
  15. package/dist/cli.umd.min.js +2 -0
  16. package/dist/cli.umd.min.js.map +1 -0
  17. package/dist/commands/build.esm.js +3 -4
  18. package/dist/commands/build.esm.js.map +1 -1
  19. package/dist/commands/build.esm.min.js +1 -1
  20. package/dist/commands/build.esm.min.js.map +1 -1
  21. package/dist/index.d.ts +56 -1
  22. package/dist/index.esm.d.ts +5 -1
  23. package/dist/index.esm.js +2 -8
  24. package/dist/index.esm.js.map +1 -1
  25. package/dist/index.esm.min.js +1 -1
  26. package/dist/index.esm.min.js.map +1 -1
  27. package/dist/index.iife.js +6 -653
  28. package/dist/index.iife.js.map +1 -1
  29. package/dist/index.iife.min.js +1 -1
  30. package/dist/index.iife.min.js.map +1 -1
  31. package/dist/index.umd.js +6 -655
  32. package/dist/index.umd.js.map +1 -1
  33. package/dist/index.umd.min.js +1 -1
  34. package/dist/index.umd.min.js.map +1 -1
  35. package/dist/utils/loadConfig.esm.js +1 -20
  36. package/dist/utils/loadConfig.esm.js.map +1 -1
  37. package/dist/utils/loadConfig.esm.min.js +1 -1
  38. package/dist/utils/loadConfig.esm.min.js.map +1 -1
  39. package/dist/utils/tsRegister.esm.js +24 -0
  40. package/dist/utils/tsRegister.esm.js.map +1 -0
  41. package/dist/utils/tsRegister.esm.min.js +2 -0
  42. package/dist/utils/tsRegister.esm.min.js.map +1 -0
  43. package/package.json +8 -3
  44. package/bin/jiek-dev.js +0 -4
package/bin/jiek.js CHANGED
@@ -1,2 +1,9 @@
1
1
  #!/usr/bin/env node
2
- require('../dist/index.umd.js')
2
+ const fs = require('node:fs')
3
+ const path = require('node:path')
4
+
5
+ if (fs.existsSync(path.join(__dirname, '../.jiek-dev-tag'))) {
6
+ require('esbuild-register')
7
+ require('../src/cli.ts')
8
+ } else
9
+ require('../dist/cli.umd.js')
@@ -0,0 +1,55 @@
1
+ type InitNamedFunction = (argument: string, paths: {
2
+ full: string;
3
+ relative: string;
4
+ basename?: string;
5
+ }) => [name?: string, path?: string];
6
+ type InitNamed = InitNamedFunction | {
7
+ /**
8
+ *
9
+ */
10
+ [key: string]: string | InitNamedFunction;
11
+ };
12
+ interface Config {
13
+ init?: {
14
+ /**
15
+ * the package.json template file path or file content
16
+ *
17
+ * if it can be parsed as json, it will be parsed
18
+ * if it is a relative file path, it will be resolved to an absolute path based on the current working directory
19
+ * if it is an absolute file path, it will be used directly
20
+ * @default '.jiek.template.package.json'
21
+ */
22
+ template?: string;
23
+ /**
24
+ * the readme content
25
+ *
26
+ * $name will be replaced with the package name
27
+ * $license will be replaced with the license
28
+ */
29
+ readme?: string | ((ctx: {
30
+ dir: string;
31
+ packageJson: Record<string, any>;
32
+ }) => string);
33
+ /**
34
+ * the readme template file path
35
+ * @default '.jiek.template.readme.md'
36
+ */
37
+ readmeTemplate?: string;
38
+ bug?: {
39
+ /**
40
+ * @default 'bug_report.yml'
41
+ */
42
+ template?: string;
43
+ /**
44
+ * @default ['bug']
45
+ */
46
+ labels?: string[] | ((ctx: {
47
+ name: string;
48
+ dir: string;
49
+ }) => string[]);
50
+ };
51
+ named?: InitNamed;
52
+ };
53
+ }
54
+
55
+ export type { Config, InitNamed, InitNamedFunction };
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,2 @@
1
+
2
+ export { }
@@ -0,0 +1,10 @@
1
+ import './utils/filterSupport.esm.js';
2
+ import './commands/build.esm.js';
3
+ import './commands/init.esm.js';
4
+ import './commands/publish.esm.js';
5
+ import { program } from 'commander';
6
+
7
+ const pkg = require("../package.json");
8
+ program.version(pkg.version).description(pkg.description).option("--root <root>", "root path").option("-c, --config-path <configPath>", "config path");
9
+ program.parse(process.argv);
10
+ //# sourceMappingURL=cli.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.esm.js","sources":["../src/cli.ts"],"sourcesContent":["import './utils/filterSupport'\nimport './commands/build'\nimport './commands/init'\nimport './commands/publish'\n\nimport { program } from 'commander'\n\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst pkg = require('../package.json')\n\nprogram\n .version(pkg.version)\n .description(pkg.description)\n .option('--root <root>', 'root path')\n .option('-c, --config-path <configPath>', 'config path')\n\nprogram.parse(process.argv)\n"],"names":[],"mappings":";;;;;;AAQA,MAAM,GAAA,GAAM,QAAQ,iBAAiB,CAAA,CAAA;AAErC,OAAA,CACG,OAAQ,CAAA,GAAA,CAAI,OAAO,CAAA,CACnB,YAAY,GAAI,CAAA,WAAW,CAC3B,CAAA,MAAA,CAAO,eAAiB,EAAA,WAAW,CACnC,CAAA,MAAA,CAAO,kCAAkC,aAAa,CAAA,CAAA;AAEzD,OAAQ,CAAA,KAAA,CAAM,QAAQ,IAAI,CAAA"}
@@ -0,0 +1,2 @@
1
+ import"./utils/filterSupport.esm.min.js";import"./commands/build.esm.min.js";import"./commands/init.esm.min.js";import"./commands/publish.esm.min.js";import{program as o}from"commander";const i=require("../package.json");o.version(i.version).description(i.description).option("--root <root>","root path").option("-c, --config-path <configPath>","config path"),o.parse(process.argv);
2
+ //# sourceMappingURL=cli.esm.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.esm.min.js","sources":["../src/cli.ts"],"sourcesContent":["import './utils/filterSupport'\nimport './commands/build'\nimport './commands/init'\nimport './commands/publish'\n\nimport { program } from 'commander'\n\n// eslint-disable-next-line @typescript-eslint/no-var-requires\nconst pkg = require('../package.json')\n\nprogram\n .version(pkg.version)\n .description(pkg.description)\n .option('--root <root>', 'root path')\n .option('-c, --config-path <configPath>', 'config path')\n\nprogram.parse(process.argv)\n"],"names":["pkg","require","program","version","description","option","parse","process","argv"],"mappings":"0LAQA,MAAMA,EAAMC,QAAQ,mBAEpBC,EACGC,QAAQH,EAAIG,SACZC,YAAYJ,EAAII,aAChBC,OAAO,gBAAiB,aACxBA,OAAO,iCAAkC,eAE5CH,EAAQI,MAAMC,QAAQC"}