wally-ui 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Walisson
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # Wally UI
2
+
3
+ Angular component generator CLI
4
+
5
+ ## Usage
6
+ ```bash
7
+ npx @wally-ui/cli add button # Add button component
8
+ npx @wally-ui/cli list # List available components
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const commander_1 = require("commander");
8
+ const fs_extra_1 = __importDefault(require("fs-extra"));
9
+ const chalk_1 = __importDefault(require("chalk"));
10
+ const path_1 = __importDefault(require("path"));
11
+ console.log(chalk_1.default.whiteBright(`
12
+ ██╗ ██╗ █████╗ ██╗ ██╗ ██╗ ██╗
13
+ ██║ ██║██╔══██╗██║ ██║ ╚██╗ ██╔╝
14
+ ██║ █╗ ██║███████║██║ ██║ ╚████╔╝
15
+ ██║███╗██║██╔══██║██║ ██║ ╚██╔╝
16
+ ╚███╔███╔╝██║ ██║███████╗███████╗██║
17
+ ╚══╝╚══╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝
18
+
19
+ Where’s Wally? Right here with Angular UI
20
+ Stop searching, start building
21
+ `));
22
+ const program = new commander_1.Command();
23
+ program
24
+ .name('wally')
25
+ .description('Angular component generator')
26
+ .version('1.0.0');
27
+ program
28
+ .command('add <component>')
29
+ .description('Add a new component')
30
+ .action(async (component) => {
31
+ // Check if Angular project
32
+ if (!fs_extra_1.default.existsSync('angular.json')) {
33
+ console.log(chalk_1.default.red('Not an Angular project. Run this in Angular project root.'));
34
+ return;
35
+ }
36
+ const templatePath = path_1.default.join(__dirname, '..', 'templates', component);
37
+ try {
38
+ const typescriptFile = await fs_extra_1.default.readFile(path_1.default.join(templatePath, `${component}.component.ts`), 'utf8');
39
+ const htmlFile = await fs_extra_1.default.readFile(path_1.default.join(templatePath, `${component}.component.html`), 'utf8');
40
+ // Create component directory
41
+ const componentPath = `src/app/components/${component}`;
42
+ await fs_extra_1.default.ensureDir(componentPath);
43
+ // Write files
44
+ await fs_extra_1.default.writeFile(`${componentPath}/${component}.component.ts`, typescriptFile);
45
+ await fs_extra_1.default.writeFile(`${componentPath}/${component}.component.html`, htmlFile);
46
+ console.log(chalk_1.default.green('Template loaded successfully!'));
47
+ }
48
+ catch (error) {
49
+ console.log(chalk_1.default.red(`Template not found: ${component}`));
50
+ }
51
+ });
52
+ program
53
+ .command('list')
54
+ .alias('ls')
55
+ .description('List available components')
56
+ .action(async () => {
57
+ const templatesPath = path_1.default.join(__dirname, '..', 'templates');
58
+ try {
59
+ const components = await fs_extra_1.default.readdir(templatesPath);
60
+ console.log(chalk_1.default.blue('\nAvailable components:'));
61
+ components.forEach(component => {
62
+ console.log(chalk_1.default.green(` ✓ ${component}`));
63
+ });
64
+ }
65
+ catch (error) {
66
+ console.log(chalk_1.default.red('No templates found'));
67
+ }
68
+ });
69
+ program.parse();
70
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;AAEA,yCAAoC;AACpC,wDAA0B;AAC1B,kDAA0B;AAC1B,gDAAwB;AAExB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,WAAW,CAAC;;;;;;;;;;CAU7B,CAAC,CAAC,CAAC;AAEJ,MAAM,OAAO,GAAY,IAAI,mBAAO,EAAE,CAAC;AAEvC,OAAO;KACF,IAAI,CAAC,OAAO,CAAC;KACb,WAAW,CAAC,6BAA6B,CAAC;KAC1C,OAAO,CAAC,OAAO,CAAC,CAAC;AAEtB,OAAO;KACF,OAAO,CAAC,iBAAiB,CAAC;KAC1B,WAAW,CAAC,qBAAqB,CAAC;KAClC,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;IACxB,2BAA2B;IAC3B,IAAI,CAAC,kBAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;QACjC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC,CAAC;QACpF,OAAO;IACX,CAAC;IAED,MAAM,YAAY,GAAG,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,S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G,CAAC,eAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,CAAC;QACnD,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;YAC3B,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,OAAO,SAAS,EAAE,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC,CAAA;IACN,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC;IACjD,CAAC;AACL,CAAC,CAAC,CAAA;AAEN,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "wally-ui",
3
+ "version": "1.0.0",
4
+ "description": "About Where’s Wally? Right here — bringing you ready-to-use Angular components with Wally-UI. Stop searching, start building.",
5
+ "bin": {
6
+ "wally": "dist/cli.js"
7
+ },
8
+ "files": [
9
+ "dist/**/*",
10
+ "templates/**/*",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc",
15
+ "dev": "tsc --watch",
16
+ "test": "echo 'Tests temporarily disabled' && exit 0",
17
+ "prepublishOnly": "npm run build"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/WalissonCF/wally-ui.git"
22
+ },
23
+ "keywords": [
24
+ "angular",
25
+ "cli",
26
+ "component-generator",
27
+ "tailwind",
28
+ "typescript"
29
+ ],
30
+ "engines": {
31
+ "node": ">=20.0.0"
32
+ },
33
+ "author": "Walisson Ferreira",
34
+ "license": "MIT",
35
+ "bugs": {
36
+ "url": "https://github.com/WalissonCF/wally-ui/issues"
37
+ },
38
+ "homepage": "https://github.com/WalissonCF/wally-ui#readme",
39
+ "devDependencies": {
40
+ "@types/fs-extra": "^11.0.4",
41
+ "@types/node": "^24.5.1",
42
+ "typescript": "^5.9.2"
43
+ },
44
+ "dependencies": {
45
+ "chalk": "^5.6.2",
46
+ "commander": "^14.0.1",
47
+ "fs-extra": "^11.3.2"
48
+ }
49
+ }
@@ -0,0 +1,16 @@
1
+ <div class="max-w-md mx-auto bg-white rounded-xl shadow-md p-6">
2
+ <h2 class="text-2xl font-bold text-gray-900 mb-4 text-center">
3
+ {{ title() }}
4
+ </h2>
5
+
6
+ <button (click)="onClick()"
7
+ class="w-full bg-blue-600 hover:bg-blue-700 text-white font-semibold py-3 px-6 rounded-lg transition-colors">
8
+ Clique em mim!
9
+ </button>
10
+
11
+ <div class="mt-4 text-center">
12
+ <span class="text-lg font-semibold text-blue-600">
13
+ Cliques: {{ clickCount() }}
14
+ </span>
15
+ </div>
16
+ </div>
@@ -0,0 +1,18 @@
1
+ import { Component, signal } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+
4
+ @Component({
5
+ selector: 'app-button',
6
+ standalone: true,
7
+ imports: [CommonModule],
8
+ templateUrl: './button.component.html'
9
+ })
10
+ export class ButtonComponent {
11
+ title = signal('Button Component');
12
+ clickCount = signal(0);
13
+
14
+ onClick() {
15
+ this.clickCount.update(count => count + 1);
16
+ console.log(`${this.title()} clicado ${this.clickCount()} vezes`);
17
+ }
18
+ }