create-moost 0.5.21 → 0.5.22

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/dist/index.mjs CHANGED
@@ -1,310 +1,277 @@
1
- import { Cli, MoostCli } from '@moostjs/event-cli';
2
- import { useAutoHelp, useCliOption } from '@wooksjs/event-cli';
3
- import { Param, Controller, Moost } from 'moost';
4
- import { existsSync, readdirSync, readFileSync, mkdirSync, lstatSync, rmdirSync, unlinkSync } from 'fs';
5
- import prompts from 'prompts';
6
- import { ProstoRewrite } from '@prostojs/rewrite';
7
- import { join } from 'path';
1
+ import { Cli, CliApp, Param } from "@moostjs/event-cli";
2
+ import { useAutoHelp, useCliOption } from "@wooksjs/event-cli";
3
+ import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, rmdirSync, unlinkSync } from "fs";
4
+ import prompts from "prompts";
5
+ import { ProstoRewrite } from "@prostojs/rewrite";
6
+ import { join } from "path";
8
7
 
9
- /******************************************************************************
10
- Copyright (c) Microsoft Corporation.
11
-
12
- Permission to use, copy, modify, and/or distribute this software for any
13
- purpose with or without fee is hereby granted.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
16
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
17
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
18
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
19
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
20
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21
- PERFORMANCE OF THIS SOFTWARE.
22
- ***************************************************************************** */
23
- /* global Reflect, Promise, SuppressedError, Symbol */
24
-
25
-
26
- function __decorate(decorators, target, key, desc) {
27
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
28
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
29
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
30
- return c > 3 && r && Object.defineProperty(target, key, r), r;
31
- }
32
-
33
- function __param(paramIndex, decorator) {
34
- return function (target, key) { decorator(target, key, paramIndex); }
35
- }
36
-
37
- function __metadata(metadataKey, metadataValue) {
38
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
39
- }
40
-
41
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
42
- var e = new Error(message);
43
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
44
- };
45
-
46
- const defaultProjectName = 'moost-app';
8
+ //#region packages/create-moost/src/prompts.ts
9
+ const defaultProjectName = "moost-app";
47
10
  async function getPrompts(inputs) {
48
- const predefined = {
49
- targetDir: inputs.name || '',
50
- projectName: inputs.name || '',
51
- packageName: inputs.name || '',
52
- };
53
- try {
54
- const results = await prompts([
55
- {
56
- name: 'projectName',
57
- type: predefined.targetDir ? null : 'text',
58
- message: 'Project name:',
59
- initial: defaultProjectName,
60
- onState: (state) => (predefined.targetDir = String(state.value).trim() || defaultProjectName),
61
- },
62
- {
63
- name: 'overwrite',
64
- type: () => (canSkipEmptying(predefined.targetDir) || inputs.force ? null : 'confirm'),
65
- message: () => {
66
- const dirForPrompt = predefined.targetDir === '.'
67
- ? 'Current directory'
68
- : `Target directory "${predefined.targetDir}"`;
69
- return `${dirForPrompt} is not empty. Remove existing files and continue?`;
70
- },
71
- },
72
- {
73
- name: 'overwriteChecker',
74
- type: (prev, values) => {
75
- if (values.overwrite === false) {
76
- throw new Error('Operation cancelled');
77
- }
78
- return null;
79
- },
80
- },
81
- {
82
- name: 'type',
83
- type: () => {
84
- if (inputs.cli && !inputs.http) {
85
- predefined.type = 'cli';
86
- return null;
87
- }
88
- if (!inputs.cli && inputs.http) {
89
- predefined.type = 'http';
90
- return null;
91
- }
92
- return 'select';
93
- },
94
- message: 'Moost Adapter:',
95
- choices: [
96
- { title: 'HTTP (Web) Application', value: 'http' },
97
- { title: 'CLI Application', value: 'cli' },
98
- ],
99
- },
100
- {
101
- name: 'packageName',
102
- type: () => (isValidPackageName(predefined.targetDir) ? null : 'text'),
103
- message: 'Package name:',
104
- initial: () => toValidPackageName(predefined.targetDir),
105
- validate: (dir) => isValidPackageName(dir) || 'Invalid package.json name',
106
- },
107
- {
108
- name: 'wf',
109
- type: () => (inputs.wf ? null : 'toggle'),
110
- message: 'Add Moost Workflows Example?',
111
- initial: false,
112
- active: 'Yes',
113
- inactive: 'No',
114
- },
115
- {
116
- name: 'domelint',
117
- type: () => (inputs.domelint ? null : 'toggle'),
118
- message: 'Add do-me-lint (smart eslint installer)?',
119
- initial: false,
120
- active: 'Yes',
121
- inactive: 'No',
122
- },
123
- ], {
124
- onCancel: () => {
125
- throw new Error('Operation cancelled');
126
- },
127
- });
128
- return {
129
- ...predefined,
130
- ...results,
131
- packageName: (results.packageName || results.targetDir || predefined.targetDir),
132
- };
133
- }
134
- catch (error) {
135
- console.log(error.message);
136
- process.exit(1);
137
- }
11
+ const predefined = {
12
+ targetDir: inputs.name || "",
13
+ projectName: inputs.name || "",
14
+ packageName: inputs.name || ""
15
+ };
16
+ try {
17
+ const results = await prompts([
18
+ {
19
+ name: "projectName",
20
+ type: predefined.targetDir ? null : "text",
21
+ message: "Project name:",
22
+ initial: defaultProjectName,
23
+ onState: (state) => predefined.targetDir = String(state.value).trim() || defaultProjectName
24
+ },
25
+ {
26
+ name: "overwrite",
27
+ type: () => canSkipEmptying(predefined.targetDir) || inputs.force ? null : "confirm",
28
+ message: () => {
29
+ const dirForPrompt = predefined.targetDir === "." ? "Current directory" : `Target directory "${predefined.targetDir}"`;
30
+ return `${dirForPrompt} is not empty. Remove existing files and continue?`;
31
+ }
32
+ },
33
+ {
34
+ name: "overwriteChecker",
35
+ type: (prev, values) => {
36
+ if (values.overwrite === false) throw new Error("Operation cancelled");
37
+ return null;
38
+ }
39
+ },
40
+ {
41
+ name: "type",
42
+ type: () => {
43
+ if (inputs.cli && !inputs.http) {
44
+ predefined.type = "cli";
45
+ return null;
46
+ }
47
+ if (!inputs.cli && inputs.http) {
48
+ predefined.type = "http";
49
+ return null;
50
+ }
51
+ return "select";
52
+ },
53
+ message: "Moost Adapter:",
54
+ choices: [{
55
+ title: "HTTP (Web) Application",
56
+ value: "http"
57
+ }, {
58
+ title: "CLI Application",
59
+ value: "cli"
60
+ }]
61
+ },
62
+ {
63
+ name: "packageName",
64
+ type: () => isValidPackageName(predefined.targetDir) ? null : "text",
65
+ message: "Package name:",
66
+ initial: () => toValidPackageName(predefined.targetDir),
67
+ validate: (dir) => isValidPackageName(dir) || "Invalid package.json name"
68
+ },
69
+ {
70
+ name: "wf",
71
+ type: (prev, values) => inputs.wf || values.type === "cli" || inputs.cli ? null : "toggle",
72
+ message: "Add Moost Workflows Example?",
73
+ initial: false,
74
+ active: "Yes",
75
+ inactive: "No"
76
+ },
77
+ {
78
+ name: "domelint",
79
+ type: () => inputs.domelint ? null : "toggle",
80
+ message: "Add do-me-lint (smart eslint installer)?",
81
+ initial: false,
82
+ active: "Yes",
83
+ inactive: "No"
84
+ }
85
+ ], { onCancel: () => {
86
+ throw new Error("Operation cancelled");
87
+ } });
88
+ return {
89
+ ...predefined,
90
+ ...results,
91
+ packageName: results.packageName || results.targetDir || predefined.targetDir
92
+ };
93
+ } catch (error) {
94
+ console.log(error.message);
95
+ process.exit(1);
96
+ }
138
97
  }
139
98
  function canSkipEmptying(dir) {
140
- if (!existsSync(dir)) {
141
- return true;
142
- }
143
- const files = readdirSync(dir);
144
- if (files.length === 0) {
145
- return true;
146
- }
147
- if (files.length === 1 && files[0] === '.git') {
148
- return true;
149
- }
150
- return false;
99
+ if (!existsSync(dir)) return true;
100
+ const files = readdirSync(dir);
101
+ if (files.length === 0) return true;
102
+ if (files.length === 1 && files[0] === ".git") return true;
103
+ return false;
151
104
  }
152
105
  function isValidPackageName(projectName) {
153
- return /^(?:@[\d*a-z~-][\d*._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*$/.test(projectName);
106
+ return /^(?:@[\d*a-z~-][\d*._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*$/.test(projectName);
154
107
  }
155
108
  function toValidPackageName(projectName) {
156
- return projectName
157
- .trim()
158
- .toLowerCase()
159
- .replace(/\s+/g, '-')
160
- .replace(/^[._]/, '')
161
- .replace(/[^\da-z~-]+/g, '-');
109
+ return projectName.trim().toLowerCase().replace(/\s+/g, "-").replace(/^[._]/, "").replace(/[^\da-z~-]+/g, "-");
162
110
  }
163
111
 
164
- const rw = new ProstoRewrite({
165
- textPattern: [
166
- '*.{js,jsx,ts,tsx,txt,json,jsonc,yml,yaml,md,ini,css,html}',
167
- 'Dockerfile',
168
- '*config',
169
- '.gitignore',
170
- '.eslintrc.json',
171
- '.prettierignore',
172
- '.prettierrc',
173
- ],
174
- });
112
+ //#endregion
113
+ //#region packages/create-moost/src/scaffold.ts
114
+ const rw = new ProstoRewrite({ textPattern: [
115
+ "*.{js,jsx,ts,tsx,txt,json,jsonc,yml,yaml,md,ini,css,html}",
116
+ "Dockerfile",
117
+ "*config",
118
+ ".gitignore",
119
+ ".eslintrc.json",
120
+ ".prettierignore",
121
+ ".prettierrc"
122
+ ] });
175
123
  const root = process.cwd();
176
- const { version } = JSON.parse(readFileSync(join(__dirname, '../package.json')).toString());
124
+ const { version } = JSON.parse(readFileSync(join(__dirname, "../package.json")).toString());
177
125
  async function scaffold(data) {
178
- const projectDir = join(root, data.targetDir);
179
- if (existsSync(projectDir)) {
180
- if (data.overwrite) {
181
- emptyDirectorySync(projectDir);
182
- }
183
- }
184
- else {
185
- mkdirSync(projectDir);
186
- }
187
- const templatePath = join(__dirname, '../templates', data.type);
188
- const commonPath = join(__dirname, '../templates/common');
189
- const wfPath = join(__dirname, '../templates/wf');
190
- const context = { ...data, version };
191
- const excludeCommon = [];
192
- if (!data.domelint) {
193
- excludeCommon.push('.domelintrc.yml');
194
- }
195
- await rw.rewriteDir({
196
- baseDir: templatePath,
197
- output: projectDir,
198
- }, context);
199
- await rw.rewriteDir({
200
- baseDir: commonPath,
201
- output: projectDir,
202
- exclude: excludeCommon,
203
- renameFile(filename) {
204
- if (filename.endsWith('.jsonc')) {
205
- return filename.replace(/c$/, '');
206
- }
207
- return filename;
208
- },
209
- }, context);
210
- if (data.wf) {
211
- await rw.rewriteDir({
212
- baseDir: wfPath,
213
- output: projectDir,
214
- }, context);
215
- }
126
+ const projectDir = join(root, data.targetDir);
127
+ if (existsSync(projectDir)) {
128
+ if (data.overwrite) emptyDirectorySync(projectDir);
129
+ } else mkdirSync(projectDir);
130
+ const templatePath = join(__dirname, "../templates", data.type);
131
+ const commonPath = join(__dirname, "../templates/common");
132
+ const wfPath = join(__dirname, "../templates/wf");
133
+ const context = {
134
+ ...data,
135
+ version
136
+ };
137
+ const excludeCommon = [];
138
+ if (!data.domelint) excludeCommon.push(".domelintrc.yml");
139
+ await rw.rewriteDir({
140
+ baseDir: templatePath,
141
+ output: projectDir,
142
+ renameFile(filename) {
143
+ if (filename.endsWith(".jsonc")) return filename.replace(/c$/, "");
144
+ return filename;
145
+ }
146
+ }, context);
147
+ await rw.rewriteDir({
148
+ baseDir: commonPath,
149
+ output: projectDir,
150
+ exclude: excludeCommon,
151
+ renameFile(filename) {
152
+ if (filename.endsWith(".jsonc")) return filename.replace(/c$/, "");
153
+ return filename;
154
+ }
155
+ }, context);
156
+ if (data.wf) await rw.rewriteDir({
157
+ baseDir: wfPath,
158
+ output: projectDir,
159
+ renameFile(filename) {
160
+ if (filename.endsWith(".jsonc")) return filename.replace(/c$/, "");
161
+ return filename;
162
+ }
163
+ }, context);
216
164
  }
217
165
  function emptyDirectorySync(directory) {
218
- if (existsSync(directory)) {
219
- readdirSync(directory).forEach(file => {
220
- const currentPath = join(directory, file);
221
- if (lstatSync(currentPath).isDirectory()) {
222
- emptyDirectorySync(currentPath);
223
- rmdirSync(currentPath);
224
- }
225
- else {
226
- unlinkSync(currentPath);
227
- }
228
- });
229
- }
166
+ if (existsSync(directory)) readdirSync(directory).forEach((file) => {
167
+ const currentPath = join(directory, file);
168
+ if (lstatSync(currentPath).isDirectory()) {
169
+ emptyDirectorySync(currentPath);
170
+ rmdirSync(currentPath);
171
+ } else unlinkSync(currentPath);
172
+ });
230
173
  }
231
174
 
232
- let CliController = class CliController extends Moost {
233
- root() {
234
- return this.execute();
235
- }
236
- withName(name) {
237
- return this.execute(name);
238
- }
239
- async execute(name) {
240
- useAutoHelp() && process.exit(0);
241
- const prompts = await getPrompts({
242
- name,
243
- http: !!useCliOption('http'),
244
- cli: !!useCliOption('cli'),
245
- wf: !!useCliOption('wf'),
246
- domelint: !!useCliOption('domelint'),
247
- force: !!useCliOption('force'),
248
- });
249
- console.log('\nScaffolding a new project...');
250
- await scaffold(prompts);
251
- const cli = prompts.type === 'cli';
252
- return `
253
- ${'' + ''}Success! ${''}Your new "${prompts.projectName}" project has been created successfully. ${''}
175
+ //#endregion
176
+ //#region packages/create-moost/src/index.ts
177
+ function _ts_decorate(decorators, target, key, desc) {
178
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
179
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
180
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
181
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
182
+ }
183
+ function _ts_metadata(k, v) {
184
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
185
+ }
186
+ function _ts_param(paramIndex, decorator) {
187
+ return function(target, key) {
188
+ decorator(target, key, paramIndex);
189
+ };
190
+ }
191
+ let Commands = class Commands$1 extends CliApp {
192
+ root() {
193
+ return this.execute();
194
+ }
195
+ withName(name) {
196
+ return this.execute(name);
197
+ }
198
+ async execute(name) {
199
+ useAutoHelp() && process.exit(0);
200
+ const prompts$1 = await getPrompts({
201
+ name,
202
+ http: !!useCliOption("http"),
203
+ cli: !!useCliOption("cli"),
204
+ wf: !!useCliOption("wf"),
205
+ domelint: !!useCliOption("domelint"),
206
+ force: !!useCliOption("force")
207
+ });
208
+ console.log("\nScaffolding a new project...");
209
+ await scaffold(prompts$1);
210
+ const cli = prompts$1.type === "cli";
211
+ return `
212
+ ${"\x1B[97m\x1B[1m"}Success! ${"\x1B[22m"}Your new "${prompts$1.projectName}" project has been created successfully. ${"\x1B[39m"}
254
213
 
255
214
  Follow these next steps to start your development server:
256
215
 
257
216
  1. Navigate to your new project:
258
- ${''}cd ${prompts.targetDir} ${''}
217
+ ${"\x1B[36m"}cd ${prompts$1.targetDir} ${"\x1B[39m"}
259
218
 
260
219
  2. Install the dependencies:
261
- ${''}npm install ${''}
262
- ${cli
263
- ? `
220
+ ${"\x1B[36m"}npm install ${"\x1B[39m"}
221
+ ${cli ? `
264
222
  3. Make bin.js executable:
265
- ${''}chmod +x ./bin.js ${''}
266
- `
267
- : ''}
268
- ${cli ? '4' : '3'}. Start the development server:
269
- ${''}npm run dev${cli ? ' -- hello World' : ''}${''}
223
+ ${"\x1B[36m"}chmod +x ./bin.js ${"\x1B[39m"}
224
+ ` : ""}
225
+ ${cli ? "4" : "3"}. Start the development server:
226
+ ${"\x1B[36m"}npm run dev${cli ? " -- hello World" : ""}${"\x1B[39m"}
270
227
 
271
- ${''}You're all set! The development server will help you in building your application.
272
- Enjoy coding, and build something amazing!${''}
228
+ ${"\x1B[32m"}You're all set! The development server will help you in building your application.
229
+ Enjoy coding, and build something amazing!${"\x1B[39m"}
273
230
  `;
274
- }
231
+ }
275
232
  };
276
- __decorate([
277
- Cli(''),
278
- __metadata("design:type", Function),
279
- __metadata("design:paramtypes", []),
280
- __metadata("design:returntype", void 0)
281
- ], CliController.prototype, "root", null);
282
- __decorate([
283
- Cli(':name'),
284
- __param(0, Param('name')),
285
- __metadata("design:type", Function),
286
- __metadata("design:paramtypes", [String]),
287
- __metadata("design:returntype", void 0)
288
- ], CliController.prototype, "withName", null);
289
- CliController = __decorate([
290
- Controller()
291
- ], CliController);
233
+ _ts_decorate([
234
+ Cli(""),
235
+ _ts_metadata("design:type", Function),
236
+ _ts_metadata("design:paramtypes", []),
237
+ _ts_metadata("design:returntype", void 0)
238
+ ], Commands.prototype, "root", null);
239
+ _ts_decorate([
240
+ Cli(":name"),
241
+ _ts_param(0, Param("name")),
242
+ _ts_metadata("design:type", Function),
243
+ _ts_metadata("design:paramtypes", [String]),
244
+ _ts_metadata("design:returntype", void 0)
245
+ ], Commands.prototype, "withName", null);
292
246
  function run() {
293
- const app = new CliController();
294
- app.adapter(new MoostCli({
295
- globalCliOptions: [
296
- { keys: ['http'], description: 'Use Moost HTTP', type: Boolean },
297
- { keys: ['cli'], description: 'Use Moost CLI', type: Boolean },
298
- { keys: ['wf'], description: 'Add Workflow Adapter', type: Boolean },
299
- {
300
- keys: ['domelint'],
301
- description: 'Add do-me-lint (smart eslint installer)',
302
- type: Boolean,
303
- },
304
- { keys: ['force'], description: 'Force Overwrite', type: Boolean },
305
- ],
306
- }));
307
- void app.init();
247
+ new Commands().useOptions([
248
+ {
249
+ keys: ["http"],
250
+ description: "Use Moost HTTP",
251
+ type: Boolean
252
+ },
253
+ {
254
+ keys: ["cli"],
255
+ description: "Use Moost CLI",
256
+ type: Boolean
257
+ },
258
+ {
259
+ keys: ["wf"],
260
+ description: "Add Workflow Adapter",
261
+ type: Boolean
262
+ },
263
+ {
264
+ keys: ["domelint"],
265
+ description: "Add do-me-lint (smart eslint installer)",
266
+ type: Boolean
267
+ },
268
+ {
269
+ keys: ["force"],
270
+ description: "Force Overwrite",
271
+ type: Boolean
272
+ }
273
+ ]).start();
308
274
  }
309
275
 
310
- export { run };
276
+ //#endregion
277
+ export { run };
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "create-moost",
3
- "version": "0.5.21",
3
+ "version": "0.5.22",
4
4
  "description": "create-moost",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "sideEffects": false,
9
+ "type": "module",
9
10
  "exports": {
10
11
  "./package.json": "./package.json",
11
12
  ".": {
13
+ "types": "./dist/index.d.ts",
12
14
  "import": "./dist/index.mjs",
13
- "require": "./dist/index.cjs",
14
- "types": "./dist/index.d.ts"
15
+ "require": "./dist/index.cjs"
15
16
  }
16
17
  },
17
18
  "bin": {
18
- "create-moost": "./bin.js"
19
+ "create-moost": "./bin.cjs"
19
20
  },
20
21
  "files": [
21
22
  "dist",
@@ -42,10 +43,22 @@
42
43
  },
43
44
  "homepage": "https://github.com/moostjs/moostjs/tree/main/packages/create-moost#readme",
44
45
  "dependencies": {
45
- "@moostjs/event-cli": "0.5.21",
46
- "@wooksjs/event-cli": "^0.5.20",
47
46
  "@prostojs/rewrite": "^0.1.1",
48
- "moost": "0.5.21",
49
- "prompts": "^2.4.2"
47
+ "@wooksjs/event-cli": "^0.5.25",
48
+ "prompts": "^2.4.2",
49
+ "@moostjs/event-cli": "^0.5.22",
50
+ "moost": "^0.5.22"
51
+ },
52
+ "devDependencies": {
53
+ "@moostjs/vite": "^0.5.21",
54
+ "@types/prompts": "^2.4.9",
55
+ "rolldown": "1.0.0-beta.3",
56
+ "unplugin-swc": "^1.5.1",
57
+ "vite": "^6.1.0",
58
+ "vitest": "^3.0.5"
59
+ },
60
+ "scripts": {
61
+ "pub": "pnpm publish --access public",
62
+ "test": "vitest"
50
63
  }
51
- }
64
+ }
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- require('./dist/main.js');
2
+ require('./dist/main.cjs');
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "{{ packageName }}",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "main": "dist/main.cjs",
6
+ "scripts": {
7
+ //=IF (domelint)
8
+ "postinstall": "npx do-me-lint",
9
+ //=END IF
10
+ "dev": "pnpm build && node ./dist/main.cjs",
11
+ "build": "rolldown build -c rolldown.config.ts",
12
+ "test": "echo \"Error: no test specified\" && exit 1"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "dependencies": {
18
+ "@moostjs/event-cli": "^{{ version }}"
19
+ },
20
+ "devDependencies": {
21
+ "typescript": "^5.7.2",
22
+ "unplugin-swc": "^1.5.1",
23
+ "rolldown": "1.0.0-beta.3"
24
+ }
25
+ }