wally-ui 1.0.5 → 1.0.7
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/cli.js +10 -9
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
- package/playground/showcase/.editorconfig +17 -0
- package/playground/showcase/.postcssrc.json +5 -0
- package/playground/showcase/.vscode/extensions.json +4 -0
- package/playground/showcase/.vscode/launch.json +20 -0
- package/playground/showcase/.vscode/tasks.json +42 -0
- package/playground/showcase/README.md +59 -0
- package/playground/showcase/angular.json +100 -0
- package/playground/showcase/package-lock.json +10671 -0
- package/playground/showcase/package.json +55 -0
- package/playground/showcase/public/favicon.ico +0 -0
- package/playground/showcase/src/app/app.config.server.ts +12 -0
- package/playground/showcase/src/app/app.config.ts +13 -0
- package/playground/showcase/src/app/app.css +0 -0
- package/playground/showcase/src/app/app.html +1 -0
- package/playground/showcase/src/app/app.routes.server.ts +12 -0
- package/playground/showcase/src/app/app.routes.ts +8 -0
- package/playground/showcase/src/app/app.spec.ts +23 -0
- package/playground/showcase/src/app/app.ts +12 -0
- package/playground/showcase/src/app/components/button/button.html +14 -0
- package/playground/showcase/src/app/components/button/button.spec.ts +23 -0
- package/playground/showcase/src/app/components/button/button.ts +10 -0
- package/playground/showcase/src/app/pages/home/home.css +0 -0
- package/playground/showcase/src/app/pages/home/home.html +4 -0
- package/playground/showcase/src/app/pages/home/home.spec.ts +23 -0
- package/playground/showcase/src/app/pages/home/home.ts +14 -0
- package/playground/showcase/src/index.html +27 -0
- package/playground/showcase/src/main.server.ts +8 -0
- package/playground/showcase/src/main.ts +6 -0
- package/playground/showcase/src/server.ts +68 -0
- package/playground/showcase/src/styles.css +6 -0
- package/playground/showcase/tsconfig.app.json +17 -0
- package/playground/showcase/tsconfig.json +34 -0
- package/playground/showcase/tsconfig.spec.json +14 -0
- package/templates/button/button.component.html +0 -16
- package/templates/button/button.component.ts +0 -18
package/dist/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ const program = new commander_1.Command();
|
|
|
23
23
|
program
|
|
24
24
|
.name('wally')
|
|
25
25
|
.description('Angular component generator')
|
|
26
|
-
.version('1.0.
|
|
26
|
+
.version('1.0.5');
|
|
27
27
|
program
|
|
28
28
|
.command('add <component>')
|
|
29
29
|
.description('Add a new component')
|
|
@@ -33,16 +33,16 @@ program
|
|
|
33
33
|
console.log(chalk_1.default.red('Not an Angular project. Run this in Angular project root.'));
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const playgroundPath = path_1.default.join(__dirname, '..', 'playground', 'showcase', 'src', 'app', 'components', component);
|
|
37
37
|
try {
|
|
38
|
-
const typescriptFile = await fs_extra_1.default.readFile(path_1.default.join(
|
|
39
|
-
const htmlFile = await fs_extra_1.default.readFile(path_1.default.join(
|
|
38
|
+
const typescriptFile = await fs_extra_1.default.readFile(path_1.default.join(playgroundPath, `${component}.ts`), 'utf8');
|
|
39
|
+
const htmlFile = await fs_extra_1.default.readFile(path_1.default.join(playgroundPath, `${component}.html`), 'utf8');
|
|
40
40
|
// Create component directory
|
|
41
41
|
const componentPath = `src/app/components/${component}`;
|
|
42
42
|
await fs_extra_1.default.ensureDir(componentPath);
|
|
43
43
|
// Write files
|
|
44
|
-
await fs_extra_1.default.writeFile(`${componentPath}/${component}.
|
|
45
|
-
await fs_extra_1.default.writeFile(`${componentPath}/${component}.
|
|
44
|
+
await fs_extra_1.default.writeFile(`${componentPath}/${component}.ts`, typescriptFile);
|
|
45
|
+
await fs_extra_1.default.writeFile(`${componentPath}/${component}.html`, htmlFile);
|
|
46
46
|
console.log(chalk_1.default.green('Template loaded successfully!'));
|
|
47
47
|
}
|
|
48
48
|
catch (error) {
|
|
@@ -54,16 +54,17 @@ program
|
|
|
54
54
|
.alias('ls')
|
|
55
55
|
.description('List available components')
|
|
56
56
|
.action(async () => {
|
|
57
|
-
const
|
|
57
|
+
const playgroundComponentsPath = path_1.default.join(__dirname, '..', 'playground', 'showcase', 'src', 'app', 'components');
|
|
58
58
|
try {
|
|
59
|
-
const components = await fs_extra_1.default.readdir(
|
|
59
|
+
const components = await fs_extra_1.default.readdir(playgroundComponentsPath);
|
|
60
60
|
console.log(chalk_1.default.blue('\nAvailable components:'));
|
|
61
61
|
components.forEach(component => {
|
|
62
62
|
console.log(chalk_1.default.green(` ✓ ${component}`));
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
catch (error) {
|
|
66
|
-
console.log(chalk_1.default.red('
|
|
66
|
+
console.log(chalk_1.default.red('Could not access playground components.'));
|
|
67
|
+
console.log(chalk_1.default.yellow('Make sure playground/src/app/components/ exists.'));
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
program.parse();
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"cli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AK,CAAC,MAAM,CAAC,kDAAkD,CAAC,CAAC,CAAC;IAClF,CAAC;AACL,CAAC,CAAC,CAAA;AAEN,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wally-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "About Where’s Wally? Right here — bringing you ready-to-use Angular components with Wally-UI. Stop searching, start building.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"wally": "dist/cli.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
9
|
"dist/**/*",
|
|
10
|
-
"
|
|
10
|
+
"playground/**/*",
|
|
11
11
|
"README.md"
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 2
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
|
|
11
|
+
[*.ts]
|
|
12
|
+
quote_type = single
|
|
13
|
+
ij_typescript_use_double_quotes = false
|
|
14
|
+
|
|
15
|
+
[*.md]
|
|
16
|
+
max_line_length = off
|
|
17
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ng serve",
|
|
7
|
+
"type": "chrome",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: start",
|
|
10
|
+
"url": "http://localhost:4200/"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "ng test",
|
|
14
|
+
"type": "chrome",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"preLaunchTask": "npm: test",
|
|
17
|
+
"url": "http://localhost:9876/debug.html"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"type": "npm",
|
|
7
|
+
"script": "start",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"problemMatcher": {
|
|
10
|
+
"owner": "typescript",
|
|
11
|
+
"pattern": "$tsc",
|
|
12
|
+
"background": {
|
|
13
|
+
"activeOnStart": true,
|
|
14
|
+
"beginsPattern": {
|
|
15
|
+
"regexp": "(.*?)"
|
|
16
|
+
},
|
|
17
|
+
"endsPattern": {
|
|
18
|
+
"regexp": "bundle generation complete"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "npm",
|
|
25
|
+
"script": "test",
|
|
26
|
+
"isBackground": true,
|
|
27
|
+
"problemMatcher": {
|
|
28
|
+
"owner": "typescript",
|
|
29
|
+
"pattern": "$tsc",
|
|
30
|
+
"background": {
|
|
31
|
+
"activeOnStart": true,
|
|
32
|
+
"beginsPattern": {
|
|
33
|
+
"regexp": "(.*?)"
|
|
34
|
+
},
|
|
35
|
+
"endsPattern": {
|
|
36
|
+
"regexp": "bundle generation complete"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# Showcase
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.0.5.
|
|
4
|
+
|
|
5
|
+
## Development server
|
|
6
|
+
|
|
7
|
+
To start a local development server, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng serve
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
|
|
14
|
+
|
|
15
|
+
## Code scaffolding
|
|
16
|
+
|
|
17
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
ng generate component component-name
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
ng generate --help
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Building
|
|
30
|
+
|
|
31
|
+
To build the project run:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
ng build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
|
|
38
|
+
|
|
39
|
+
## Running unit tests
|
|
40
|
+
|
|
41
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ng test
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Running end-to-end tests
|
|
48
|
+
|
|
49
|
+
For end-to-end (e2e) testing, run:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
ng e2e
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
56
|
+
|
|
57
|
+
## Additional Resources
|
|
58
|
+
|
|
59
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"showcase": {
|
|
7
|
+
"projectType": "application",
|
|
8
|
+
"schematics": {},
|
|
9
|
+
"root": "",
|
|
10
|
+
"sourceRoot": "src",
|
|
11
|
+
"prefix": "wally",
|
|
12
|
+
"architect": {
|
|
13
|
+
"build": {
|
|
14
|
+
"builder": "@angular/build:application",
|
|
15
|
+
"options": {
|
|
16
|
+
"browser": "src/main.ts",
|
|
17
|
+
"polyfills": [
|
|
18
|
+
"zone.js"
|
|
19
|
+
],
|
|
20
|
+
"tsConfig": "tsconfig.app.json",
|
|
21
|
+
"assets": [
|
|
22
|
+
{
|
|
23
|
+
"glob": "**/*",
|
|
24
|
+
"input": "public"
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"styles": [
|
|
28
|
+
"src/styles.css"
|
|
29
|
+
],
|
|
30
|
+
"server": "src/main.server.ts",
|
|
31
|
+
"outputMode": "server",
|
|
32
|
+
"ssr": {
|
|
33
|
+
"entry": "src/server.ts"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"configurations": {
|
|
37
|
+
"production": {
|
|
38
|
+
"budgets": [
|
|
39
|
+
{
|
|
40
|
+
"type": "initial",
|
|
41
|
+
"maximumWarning": "500kB",
|
|
42
|
+
"maximumError": "1MB"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "anyComponentStyle",
|
|
46
|
+
"maximumWarning": "4kB",
|
|
47
|
+
"maximumError": "8kB"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"outputHashing": "all"
|
|
51
|
+
},
|
|
52
|
+
"development": {
|
|
53
|
+
"optimization": false,
|
|
54
|
+
"extractLicenses": false,
|
|
55
|
+
"sourceMap": true
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"defaultConfiguration": "production"
|
|
59
|
+
},
|
|
60
|
+
"serve": {
|
|
61
|
+
"builder": "@angular/build:dev-server",
|
|
62
|
+
"configurations": {
|
|
63
|
+
"production": {
|
|
64
|
+
"buildTarget": "showcase:build:production"
|
|
65
|
+
},
|
|
66
|
+
"development": {
|
|
67
|
+
"buildTarget": "showcase:build:development"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"defaultConfiguration": "development"
|
|
71
|
+
},
|
|
72
|
+
"extract-i18n": {
|
|
73
|
+
"builder": "@angular/build:extract-i18n"
|
|
74
|
+
},
|
|
75
|
+
"test": {
|
|
76
|
+
"builder": "@angular/build:karma",
|
|
77
|
+
"options": {
|
|
78
|
+
"polyfills": [
|
|
79
|
+
"zone.js",
|
|
80
|
+
"zone.js/testing"
|
|
81
|
+
],
|
|
82
|
+
"tsConfig": "tsconfig.spec.json",
|
|
83
|
+
"assets": [
|
|
84
|
+
{
|
|
85
|
+
"glob": "**/*",
|
|
86
|
+
"input": "public"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"styles": [
|
|
90
|
+
"src/styles.css"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"cli": {
|
|
98
|
+
"analytics": "eb2c8ad1-ad18-4d0e-b6c6-efb27b8f701c"
|
|
99
|
+
}
|
|
100
|
+
}
|