dcntui 0.1.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.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # DCNTUI CLI
@@ -0,0 +1,2 @@
1
+ export declare function initCommand(): Promise<void>;
2
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAQA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDjD"}
@@ -0,0 +1,44 @@
1
+ import * as clack from '@clack/prompts';
2
+ import chalk from 'chalk';
3
+ import fs from 'node:fs';
4
+ import path from 'node:path';
5
+ import { renderBanner } from '../utils/banner.js';
6
+ const CONFIG_FILE = 'dcntui.config.json';
7
+ export async function initCommand() {
8
+ console.clear();
9
+ // Banner
10
+ renderBanner();
11
+ // Intro
12
+ clack.intro(chalk.bgCyan.black(' DCNTUI INIT '));
13
+ // Verify project root
14
+ const cwd = process.cwd();
15
+ const packageJsonPath = path.join(cwd, 'package.json');
16
+ if (!fs.existsSync(packageJsonPath)) {
17
+ clack.log.error(chalk.red('No package.json found in the current directory.\n\n' +
18
+ 'dcntui init must be run from the root of your project — ' +
19
+ 'the same folder that contains your package.json.'));
20
+ clack.outro(chalk.red('Initialization aborted. Please try again from your project root.'));
21
+ process.exit(1);
22
+ }
23
+ clack.log.success(chalk.green("package.json found — you're in the right place."));
24
+ // Detect existing config
25
+ clack.log.info('Checking existing configuration…\n');
26
+ const configPath = path.join(cwd, CONFIG_FILE);
27
+ if (fs.existsSync(configPath)) {
28
+ clack.log.warn(chalk.yellow(`A ${CONFIG_FILE} already exists in this directory.\n\n` +
29
+ 'Continuing will overwrite your current configuration.'));
30
+ const shouldContinue = await clack.select({
31
+ message: 'Do you want to continue?',
32
+ options: [
33
+ { value: false, label: 'No — keep my existing config' },
34
+ { value: true, label: 'Yes — overwrite and reconfigure' }
35
+ ],
36
+ initialValue: false
37
+ });
38
+ if (clack.isCancel(shouldContinue) || shouldContinue === false) {
39
+ clack.outro(chalk.cyan('No changes made. Your existing config is untouched.'));
40
+ process.exit(0);
41
+ }
42
+ }
43
+ }
44
+ //# sourceMappingURL=init.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,WAAW,GAAG,oBAAoB,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,OAAO,CAAC,KAAK,EAAE,CAAC;IAEhB,SAAS;IACT,YAAY,EAAE,CAAC;IAEf,QAAQ;IACR,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;IAEjD,sBAAsB;IACtB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;IAEvD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC;QACpC,KAAK,CAAC,GAAG,CAAC,KAAK,CACb,KAAK,CAAC,GAAG,CACP,qDAAqD;YACnD,0DAA0D;YAC1D,kDAAkD,CACrD,CACF,CAAC;QAEF,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,kEAAkE,CAAC,CAAC,CAAC;QAC3F,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC,CAAC;IAElF,yBAAyB;IACzB,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;IAErD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IAE/C,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,KAAK,CAAC,GAAG,CAAC,IAAI,CACZ,KAAK,CAAC,MAAM,CACV,KAAK,WAAW,wCAAwC;YACtD,uDAAuD,CAC1D,CACF,CAAC;QAEF,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC;YACxC,OAAO,EAAE,0BAA0B;YACnC,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,8BAA8B,EAAE;gBACvD,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,iCAAiC,EAAE;aAC1D;YACD,YAAY,EAAE,KAAK;SACpB,CAAC,CAAC;QAEH,IAAI,KAAK,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,cAAc,KAAK,KAAK,EAAE,CAAC;YAC/D,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC,CAAC;YAC/E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from 'commander';
3
+ import { initCommand } from './commands/init.js';
4
+ const program = new Command();
5
+ program.name('dcntui').description('DCNTUI — Beautiful UI components for modern frameworks').version('0.1.0');
6
+ program.command('init').description('Initialize DCNTUI in your project').action(initCommand);
7
+ program.parse(process.argv);
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,wDAAwD,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;AAE9G,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,mCAAmC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AAE7F,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function renderBanner(): void;
2
+ //# sourceMappingURL=banner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.d.ts","sourceRoot":"","sources":["../../src/utils/banner.ts"],"names":[],"mappings":"AAEA,wBAAgB,YAAY,IAAI,IAAI,CAanC"}
@@ -0,0 +1,15 @@
1
+ import chalk from 'chalk';
2
+ export function renderBanner() {
3
+ const lines = [
4
+ chalk.cyanBright(' ╔╦╗╔═╗╔╗╔╔╦╗╦ ╦╦'),
5
+ chalk.blueBright(' ║║║ ║║║ ║ ║ ║║'),
6
+ chalk.magentaBright(' ═╩╝╚═╝╝╚╝ ╩ ╚═╝╩')
7
+ ];
8
+ console.log();
9
+ for (const line of lines) {
10
+ console.log(line);
11
+ }
12
+ console.log();
13
+ console.log(chalk.gray(' Beautiful UI components for modern frameworks.\n'));
14
+ }
15
+ //# sourceMappingURL=banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"banner.js","sourceRoot":"","sources":["../../src/utils/banner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,YAAY;IAC1B,MAAM,KAAK,GAAG;QACZ,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC;QACtC,KAAK,CAAC,UAAU,CAAC,oBAAoB,CAAC;QACtC,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC;KAC1C,CAAC;IAEF,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,OAAO,CAAC,GAAG,EAAE,CAAC;IACd,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC,CAAC;AAChF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "dcntui",
3
+ "version": "0.1.0",
4
+ "description": "CLI for initializing DCNT UI and adding components to projects",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "bin": {
8
+ "dcntui": "./dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "dev": "tsx src/index.ts",
13
+ "start": "node dist/index.js",
14
+ "lint": "eslint .",
15
+ "lint:fix": "eslint . --fix",
16
+ "format": "prettier . --write"
17
+ },
18
+ "dependencies": {
19
+ "@clack/prompts": "^0.7.0",
20
+ "chalk": "^5.3.0",
21
+ "commander": "^12.0.0"
22
+ },
23
+ "devDependencies": {
24
+ "@types/node": "^20.0.0",
25
+ "eslint": "^10.3.0",
26
+ "eslint-config-prettier": "^10.1.8",
27
+ "prettier": "^3.8.3",
28
+ "tsx": "^4.21.0",
29
+ "typescript": "^5.4.0",
30
+ "typescript-eslint": "^8.59.2"
31
+ },
32
+ "engines": {
33
+ "node": ">=18.0.0"
34
+ },
35
+ "files": [
36
+ "dist"
37
+ ]
38
+ }