@aerogel/cli 0.0.0-next.c8f032a868370824898e171969aec1bb6827688e → 0.0.0-next.f16bd1d894543c5303039c49f6f33488a1ffe931

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.
Files changed (45) hide show
  1. package/dist/aerogel-cli.cjs.js +1 -1
  2. package/dist/aerogel-cli.esm.js +1 -1
  3. package/package.json +3 -2
  4. package/src/cli.ts +4 -0
  5. package/src/commands/create.test.ts +13 -4
  6. package/src/commands/create.ts +25 -10
  7. package/src/commands/generate-component.test.ts +12 -1
  8. package/src/commands/generate-component.ts +127 -20
  9. package/src/commands/generate-model.test.ts +16 -5
  10. package/src/commands/generate-model.ts +38 -12
  11. package/src/commands/generate-service.test.ts +21 -0
  12. package/src/commands/generate-service.ts +152 -0
  13. package/src/commands/install.test.ts +18 -0
  14. package/src/commands/install.ts +32 -0
  15. package/src/lib/App.ts +65 -3
  16. package/src/lib/Editor.ts +51 -0
  17. package/src/lib/File.ts +10 -0
  18. package/src/lib/Log.mock.ts +13 -4
  19. package/src/lib/Log.test.ts +19 -3
  20. package/src/lib/Log.ts +36 -20
  21. package/src/lib/Template.ts +4 -3
  22. package/src/lib/utils/app.ts +15 -0
  23. package/src/lib/utils/edit.ts +44 -0
  24. package/src/lib/{utils.test.ts → utils/format.test.ts} +2 -2
  25. package/src/lib/{utils.ts → utils/format.ts} +0 -6
  26. package/src/lib/utils/paths.ts +34 -0
  27. package/src/plugins/Plugin.ts +125 -0
  28. package/src/plugins/Solid.ts +65 -0
  29. package/src/plugins/Soukai.ts +19 -0
  30. package/src/testing/setup.ts +38 -6
  31. package/templates/app/.eslintrc.js +3 -0
  32. package/templates/app/.gitignore.template +2 -0
  33. package/templates/app/.vscode/launch.json +16 -0
  34. package/templates/app/.vscode/settings.json +10 -0
  35. package/templates/app/cypress.config.ts +4 -0
  36. package/templates/app/index.html +1 -1
  37. package/templates/app/package.json +20 -10
  38. package/templates/app/prettier.config.js +5 -0
  39. package/templates/app/src/App.vue +3 -1
  40. package/templates/app/src/main.ts +5 -1
  41. package/templates/app/src/types/globals.d.ts +0 -1
  42. package/templates/app/tailwind.config.js +1 -1
  43. package/templates/app/vite.config.ts +8 -5
  44. package/templates/service/[service.name].ts +8 -0
  45. package/noeldemartin.config.js +0 -4
@@ -0,0 +1,44 @@
1
+ import { arrayFrom } from '@noeldemartin/utils';
2
+ import type { Node, SyntaxKind } from 'ts-morph';
3
+
4
+ export function editFiles(): boolean {
5
+ // TODO mock editor instead of relying on this for unit tests
6
+ return true;
7
+ }
8
+
9
+ export function findDescendant<T extends Node>(
10
+ node: Node | undefined,
11
+ options: {
12
+ guard?: (node: Node | undefined) => node is T;
13
+ validate?: (node: T) => boolean;
14
+ skip?: SyntaxKind | SyntaxKind[];
15
+ } = {},
16
+ ): T | undefined {
17
+ if (!node) {
18
+ return;
19
+ }
20
+
21
+ const guard = options.guard ?? (() => true);
22
+ const validate = options.validate ?? (() => true);
23
+ const skipKinds = arrayFrom(options.skip ?? []);
24
+
25
+ return node.forEachDescendant((descendant, traversal) => {
26
+ if (guard(descendant) && validate(descendant)) {
27
+ return descendant;
28
+ }
29
+
30
+ const descendantKind = descendant.getKind();
31
+
32
+ if (skipKinds.includes(descendantKind)) {
33
+ traversal.skip();
34
+ }
35
+ });
36
+ }
37
+
38
+ export function when<T extends Node>(node: Node | undefined, assertion: (node: Node) => node is T): T | undefined {
39
+ if (!node || !assertion(node)) {
40
+ return;
41
+ }
42
+
43
+ return node as T;
44
+ }
@@ -1,8 +1,8 @@
1
1
  import { describe, expect, it } from 'vitest';
2
2
 
3
- import { formatCodeBlock } from './utils';
3
+ import { formatCodeBlock } from './format';
4
4
 
5
- describe('Utils', () => {
5
+ describe('Format utils', () => {
6
6
 
7
7
  it('Formats code blocks', () => {
8
8
  // Arrange
@@ -1,13 +1,7 @@
1
- import { resolve } from 'path';
2
-
3
1
  export interface FormatCodeBlockOptions {
4
2
  indent?: number;
5
3
  }
6
4
 
7
- export function basePath(path: string): string {
8
- return resolve(__dirname, '../', path);
9
- }
10
-
11
5
  export function formatCodeBlock(code: string, options: FormatCodeBlockOptions = {}): string {
12
6
  const lines = code.split('\n');
13
7
  const indent = options.indent ?? 0;
@@ -0,0 +1,34 @@
1
+ import { resolve } from 'path';
2
+ import { stringMatch } from '@noeldemartin/utils';
3
+
4
+ import File from '@/lib/File';
5
+ import Log from '@/lib/Log';
6
+
7
+ export function basePath(path: string = ''): string {
8
+ if (File.contains(resolve(__dirname, '../../../package.json'), '"name": "aerogel"')) {
9
+ return resolve(__dirname, '../', path);
10
+ }
11
+
12
+ const packageJson = File.read(resolve(__dirname, '../../../../package.json'));
13
+ const matches = stringMatch<2>(packageJson ?? '', /"@aerogel\/cli": "file:(.*)\/aerogel-cli-[\d.]*\.tgz"/);
14
+ const cliPath = matches?.[1] ?? Log.fail<string>('Could not determine base path');
15
+
16
+ return resolve(cliPath, path);
17
+ }
18
+
19
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
+ export function packNotFound(packageName: string): any {
21
+ return Log.fail(`Could not find ${packageName} pack file, did you run 'npm pack'?`);
22
+ }
23
+
24
+ export function packagePackPath(packageName: string): string | null {
25
+ return File.getFiles(packagePath(packageName)).find((file) => file.endsWith('.tgz')) ?? null;
26
+ }
27
+
28
+ export function packagePath(packageName: string): string {
29
+ return basePath(`../${packageName}`);
30
+ }
31
+
32
+ export function templatePath(name: string): string {
33
+ return resolve(__dirname, `../templates/${name}`);
34
+ }
@@ -0,0 +1,125 @@
1
+ import { Node, SyntaxKind } from 'ts-morph';
2
+ import type { ArrayLiteralExpression, ImportDeclarationStructure, OptionalKind, SourceFile } from 'ts-morph';
3
+
4
+ import Log from '@/lib/Log';
5
+ import Shell from '@/lib/Shell';
6
+ import File from '@/lib/File';
7
+ import { app, isLinkedLocalApp, isLocalApp } from '@/lib/utils/app';
8
+ import { editFiles, findDescendant, when } from '@/lib/utils/edit';
9
+ import { packNotFound, packagePackPath, packagePath } from '@/lib/utils/paths';
10
+ import type { Editor } from '@/lib/Editor';
11
+
12
+ export default abstract class Plugin {
13
+
14
+ public readonly name: string;
15
+
16
+ constructor(name: string) {
17
+ this.name = name;
18
+ }
19
+
20
+ public async install(): Promise<void> {
21
+ this.assertNotInstalled();
22
+
23
+ await this.installDependencies();
24
+
25
+ if (editFiles()) {
26
+ const editor = app().edit();
27
+
28
+ await this.updateFiles(editor);
29
+ await editor.format();
30
+ }
31
+
32
+ Log.info(`Plugin ${this.name} installed!`);
33
+ }
34
+
35
+ protected assertNotInstalled(): void {
36
+ if (File.contains('package.json', `"${this.getNpmPackageName()}"`)) {
37
+ Log.fail(`${this.name} is already installed!`);
38
+ }
39
+ }
40
+
41
+ protected async installDependencies(): Promise<void> {
42
+ await Log.animate('Installing plugin dependencies', async () => {
43
+ await this.installNpmDependencies();
44
+ });
45
+ }
46
+
47
+ protected async updateFiles(editor: Editor): Promise<void> {
48
+ await this.updateBootstrapConfig(editor);
49
+ }
50
+
51
+ protected async installNpmDependencies(): Promise<void> {
52
+ if (isLinkedLocalApp()) {
53
+ await Shell.run(`npm install file:${packagePath(this.getLocalPackageName())}`);
54
+
55
+ return;
56
+ }
57
+
58
+ if (isLocalApp()) {
59
+ const packPath = packagePackPath(this.getLocalPackageName()) ?? packNotFound(this.getLocalPackageName());
60
+
61
+ await Shell.run(`npm install file:${packPath}`);
62
+
63
+ return;
64
+ }
65
+
66
+ await Shell.run(`npm install ${this.getNpmPackageName()}@next --save-exact`);
67
+ }
68
+
69
+ protected async updateBootstrapConfig(editor: Editor): Promise<void> {
70
+ await Log.animate('Injecting plugin in bootstrap configuration', async () => {
71
+ const mainConfig = editor.requireSourceFile('src/main.ts');
72
+ const pluginsArray = this.getBootstrapPluginsDeclaration(mainConfig);
73
+
74
+ if (!pluginsArray) {
75
+ return Log.fail(`
76
+ Could not find plugins array in bootstrap config, please add the following manually:
77
+
78
+ ${this.getBootstrapConfig()}
79
+ `);
80
+ }
81
+
82
+ mainConfig.addImportDeclaration(this.getBootstrapImport());
83
+ pluginsArray.addElement(this.getBootstrapConfig());
84
+
85
+ await editor.save(mainConfig);
86
+ });
87
+ }
88
+
89
+ protected getBootstrapPluginsDeclaration(mainConfig: SourceFile): ArrayLiteralExpression | null {
90
+ const bootstrapAppCall = findDescendant(mainConfig, {
91
+ guard: Node.isCallExpression,
92
+ validate: (callExpression) => callExpression.getExpression().getText() === 'bootstrapApplication',
93
+ skip: SyntaxKind.ImportDeclaration,
94
+ });
95
+ const bootstrapOptions = bootstrapAppCall?.getArguments()[1];
96
+ const pluginsOption = when(bootstrapOptions, Node.isObjectLiteralExpression)?.getProperty('plugins');
97
+ const pluginsArray = when(pluginsOption, Node.isPropertyAssignment)?.getInitializer();
98
+
99
+ if (!Node.isArrayLiteralExpression(pluginsArray)) {
100
+ return null;
101
+ }
102
+
103
+ return pluginsArray;
104
+ }
105
+
106
+ protected getBootstrapImport(): OptionalKind<ImportDeclarationStructure> {
107
+ return {
108
+ defaultImport: this.name,
109
+ moduleSpecifier: `@aerogel/plugin-${this.name}`,
110
+ };
111
+ }
112
+
113
+ protected getNpmPackageName(): string {
114
+ return `@aerogel/${this.getLocalPackageName()}`;
115
+ }
116
+
117
+ protected getLocalPackageName(): string {
118
+ return `plugin-${this.name}`;
119
+ }
120
+
121
+ protected getBootstrapConfig(): string {
122
+ return `${this.name}()`;
123
+ }
124
+
125
+ }
@@ -0,0 +1,65 @@
1
+ import { Node, SyntaxKind } from 'ts-morph';
2
+ import type { ArrayLiteralExpression, SourceFile } from 'ts-morph';
3
+
4
+ import Plugin from '@/plugins/Plugin';
5
+ import Shell from '@/lib/Shell';
6
+ import Log from '@/lib/Log';
7
+ import { findDescendant } from '@/lib/utils/edit';
8
+ import { isLinkedLocalApp } from '@/lib/utils/app';
9
+ import { packagePath } from '@/lib/utils/paths';
10
+ import type { Editor } from '@/lib/Editor';
11
+
12
+ export class Solid extends Plugin {
13
+
14
+ constructor() {
15
+ super('solid');
16
+ }
17
+
18
+ protected async updateFiles(editor: Editor): Promise<void> {
19
+ await this.updateTailwindConfig(editor);
20
+ await super.updateFiles(editor);
21
+ }
22
+
23
+ protected async installNpmDependencies(): Promise<void> {
24
+ await Shell.run('npm install soukai-solid@next --save-exact');
25
+ await super.installNpmDependencies();
26
+ }
27
+
28
+ protected async updateTailwindConfig(editor: Editor): Promise<void> {
29
+ await Log.animate('Updating tailwind configuration', async () => {
30
+ const tailwindConfig = editor.requireSourceFile('tailwind.config.js');
31
+ const contentArray = this.getTailwindContentArray(tailwindConfig);
32
+ const contentValue = isLinkedLocalApp()
33
+ ? `'${packagePath('plugin-solid')}/dist/**/*.js'`
34
+ : '\'./node_modules/@aerogel/plugin-solid/dist/**/*.js\'';
35
+
36
+ if (!contentArray) {
37
+ return Log.fail(`
38
+ Could not find content array in tailwind config, please add the following manually:
39
+
40
+ ${contentValue}
41
+ `);
42
+ }
43
+
44
+ contentArray.addElement(contentValue);
45
+
46
+ await editor.save(tailwindConfig);
47
+ });
48
+ }
49
+
50
+ protected getTailwindContentArray(tailwindConfig: SourceFile): ArrayLiteralExpression | null {
51
+ const contentAssignment = findDescendant(tailwindConfig, {
52
+ guard: Node.isPropertyAssignment,
53
+ validate: (propertyAssignment) => propertyAssignment.getName() === 'content',
54
+ skip: SyntaxKind.JSDoc,
55
+ });
56
+ const contentArray = contentAssignment?.getInitializer();
57
+
58
+ if (!Node.isArrayLiteralExpression(contentArray)) {
59
+ return null;
60
+ }
61
+
62
+ return contentArray;
63
+ }
64
+
65
+ }
@@ -0,0 +1,19 @@
1
+ import Plugin from '@/plugins/Plugin';
2
+ import Shell from '@/lib/Shell';
3
+
4
+ export class Soukai extends Plugin {
5
+
6
+ constructor() {
7
+ super('soukai');
8
+ }
9
+
10
+ protected async installNpmDependencies(): Promise<void> {
11
+ await Shell.run('npm install soukai@next --save-exact');
12
+ await super.installNpmDependencies();
13
+ }
14
+
15
+ protected getBootstrapConfig(): string {
16
+ return 'soukai({ models: import.meta.glob(\'@/models/*\', { eager: true }) })';
17
+ }
18
+
19
+ }
@@ -17,21 +17,53 @@ Shell.setMockInstance(ShellMock);
17
17
 
18
18
  beforeEach(() => {
19
19
  FileMock.reset();
20
+ LogMock.reset();
21
+
20
22
  File.mock();
21
23
  Log.mock();
22
24
  Shell.mock();
23
25
  });
24
26
 
27
+ vi.mock('@/lib/utils/app', async () => {
28
+ const original = (await vi.importActual('@/lib/utils/app')) as object;
29
+
30
+ return {
31
+ ...original,
32
+ isLocalApp: () => false,
33
+ isLinkedLocalApp: () => false,
34
+ };
35
+ });
36
+
37
+ vi.mock('@/lib/utils/edit', async () => {
38
+ const original = (await vi.importActual('@/lib/utils/edit')) as object;
39
+
40
+ return {
41
+ ...original,
42
+ editFiles: () => false,
43
+ };
44
+ });
45
+
25
46
  // TODO find out why these need to be mocked
47
+ vi.mock('@/lib/utils/paths', async () => {
48
+ const original = (await vi.importActual('@/lib/utils/paths')) as object;
49
+
50
+ function basePath(path: string = '') {
51
+ return resolve(__dirname, '../../', path);
52
+ }
53
+
54
+ function packagePath(packageName: string) {
55
+ return basePath(`../${packageName}`);
56
+ }
26
57
 
27
- vi.mock('@/lib/utils', async () => {
28
- const utils = (await vi.importActual('@/lib/utils')) as object;
58
+ function templatePath(name: string = '') {
59
+ return resolve(__dirname, `../../templates/${name}`);
60
+ }
29
61
 
30
62
  return {
31
- ...utils,
32
- basePath(path: string) {
33
- return resolve(__dirname, '../../', path);
34
- },
63
+ ...original,
64
+ basePath,
65
+ packagePath,
66
+ templatePath,
35
67
  };
36
68
  });
37
69
 
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ extends: ['@noeldemartin/eslint-config-vue'],
3
+ };
@@ -0,0 +1,2 @@
1
+ /dist
2
+ /node_modules
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "type": "node",
6
+ "request": "launch",
7
+ "name": "Debug Current Test File",
8
+ "autoAttachChildProcesses": true,
9
+ "skipFiles": ["<node_internals>/**", "**/node_modules/**"],
10
+ "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs",
11
+ "args": ["run", "${fileBasenameNoExtension}"],
12
+ "smartStep": true,
13
+ "console": "integratedTerminal"
14
+ }
15
+ ]
16
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "emeraldwalk.runonsave": {
3
+ "commands": [
4
+ {
5
+ "match": ".*",
6
+ "cmd": "npx prettier-eslint ${file} --write"
7
+ }
8
+ ]
9
+ }
10
+ }
@@ -1,8 +1,12 @@
1
+ import install from '@aerogel/cypress/dist/plugin';
1
2
  import { defineConfig } from 'cypress';
2
3
 
3
4
  export default defineConfig({
4
5
  e2e: {
5
6
  baseUrl: 'http://localhost:5001',
6
7
  video: false,
8
+ setupNodeEvents(on) {
9
+ install(on);
10
+ },
7
11
  },
8
12
  });
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title><% app.name %></title>
7
7
  </head>
8
- <body class="h-full w-full">
8
+ <body class="h-full w-full text-base font-normal leading-tight text-gray-900 antialiased">
9
9
  <div id="app" class="h-full"></div>
10
10
  <script type="module" src="./src/main.ts"></script>
11
11
  </body>
@@ -8,6 +8,8 @@
8
8
  "cy:open": "cypress open --e2e --browser chromium",
9
9
  "cy:run": "cypress run",
10
10
  "cy:test": "start-server-and-test test:serve-app http-get://localhost:5001 cy:run",
11
+ "cy:test-snapshots": "docker run -it -u `id -u ${whoami}` -e CYPRESS_SNAPSHOTS=true -v ./:/app -w /app cypress/base:18.16.0 sh -c \"npx cypress install && npm run cy:test\"",
12
+ "cy:test-snapshots:ci": "docker run -e CYPRESS_SNAPSHOTS=true -v ./:/app -w /app cypress/base:18.16.0 sh -c \"npx cypress install && npm run cy:test\"",
11
13
  "dev": "vite",
12
14
  "lint": "noeldemartin-lint src",
13
15
  "test": "vitest --run",
@@ -15,30 +17,38 @@
15
17
  "test:serve-app": "vite --port 5001"
16
18
  },
17
19
  "dependencies": {
18
- "@aerogel/core": "next",
19
- "@aerogel/plugin-i18n": "next",
20
+ "@aerogel/core": "<% &dependencies.aerogelCore %>",
21
+ "@aerogel/plugin-i18n": "<% &dependencies.aerogelPluginI18n %>",
22
+ "@aerogel/plugin-soukai": "<% &dependencies.aerogelPluginSoukai %>",
20
23
  "@intlify/unplugin-vue-i18n": "^0.12.2",
24
+ "@noeldemartin/utils": "next",
21
25
  "@tailwindcss/forms": "^0.5.3",
22
26
  "@tailwindcss/typography": "^0.5.9",
23
- "soukai": "^0.5.1",
27
+ "soukai": "next",
24
28
  "tailwindcss": "^3.3.2",
25
29
  "vue": "^3.3.0",
26
- "vue-i18n": "9.3.0-beta.19",
27
- "vue-router": "^4.2.1"
30
+ "vue-i18n": "9.3.0-beta.19"
28
31
  },
29
32
  "devDependencies": {
30
- "@aerogel/cli": "next",
31
- "@aerogel/cypress": "next",
32
- "@aerogel/vite": "next",
33
- "@noeldemartin/utils": "0.4.0-next.ac00beaecf32bb02ed8e335225d7948d946d73bd",
33
+ "@aerogel/cli": "<% &dependencies.aerogelCli %>",
34
+ "@aerogel/cypress": "<% &dependencies.aerogelCypress %>",
35
+ "@aerogel/vite": "<% &dependencies.aerogelVite %>",
36
+ "@noeldemartin/eslint-config-vue": "next",
37
+ "@noeldemartin/scripts": "next",
34
38
  "@total-typescript/ts-reset": "^0.4.2",
35
39
  "@types/node": "^20.3.1",
36
40
  "autoprefixer": "^10.4.14",
37
41
  "concurrently": "^8.2.0",
38
42
  "cypress": "^12.17.0",
43
+ "eslint": "^8.40.0",
44
+ "prettier": "^2.8.8",
45
+ "prettier-eslint-cli": "^7.1.0",
46
+ "prettier-plugin-tailwindcss": "^0.2.8",
39
47
  "start-server-and-test": "^2.0.0",
48
+ "unplugin-icons": "^0.16.3",
40
49
  "unplugin-vue-components": "^0.24.1",
41
50
  "vite": "^4.3.0",
42
- "vitest": "^0.33.0"
51
+ "vitest": "^0.33.0",
52
+ "vue-tsc": "^1.8.15"
43
53
  }
44
54
  }
@@ -0,0 +1,5 @@
1
+ /** @type {import('prettier').Config} */
2
+ module.exports = {
3
+ plugins: [require('prettier-plugin-tailwindcss')],
4
+ printWidth: 120,
5
+ };
@@ -1,7 +1,9 @@
1
1
  <template>
2
2
  <AGAppLayout>
3
3
  <main class="flex flex-grow flex-col items-center justify-center bg-blue-50">
4
- <h1 class="text-4xl font-semibold">{{ $t('home.title') }}</h1>
4
+ <h1 class="text-4xl font-semibold">
5
+ {{ $t('home.title') }}
6
+ </h1>
5
7
  <a href="https://aerogel.js.org" target="_blank" class="mt-2 underline opacity-75 hover:opacity-100">
6
8
  {{ $t('home.getStarted') }}
7
9
  </a>
@@ -1,9 +1,13 @@
1
1
  import i18n from '@aerogel/plugin-i18n';
2
+ import soukai from '@aerogel/plugin-soukai';
2
3
  import { bootstrapApplication } from '@aerogel/core';
3
4
 
4
5
  import './assets/styles.css';
5
6
  import App from './App.vue';
6
7
 
7
8
  bootstrapApplication(App, {
8
- plugins: [i18n({ messages: import.meta.glob('@/lang/*.yaml') })],
9
+ plugins: [
10
+ i18n({ messages: import.meta.glob('@/lang/*.yaml') }),
11
+ soukai({ models: import.meta.glob('@/models/*', { eager: true }) }),
12
+ ],
9
13
  });
@@ -1,3 +1,2 @@
1
1
  /// <reference types="vite/client" />
2
- /// <reference types="vue-router" />
3
2
  /// <reference types="vue-i18n" />
@@ -1,5 +1,5 @@
1
1
  /** @type {import('tailwindcss').Config} */
2
2
  module.exports = {
3
- content: ['./index.html', './src/**/*.{vue,ts}', '../core/src/**/*.{vue,ts}'],
3
+ content: ['./index.html', './src/**/*.{vue,ts}', '<% &contentPath %>'],
4
4
  plugins: [require('@tailwindcss/forms'), require('@tailwindcss/typography')],
5
5
  };
@@ -1,21 +1,24 @@
1
1
  import Aerogel, { AerogelResolver } from '@aerogel/vite';
2
2
  import Components from 'unplugin-vue-components/vite';
3
3
  import I18n from '@intlify/unplugin-vue-i18n/vite';
4
+ import Icons from 'unplugin-icons/vite';
5
+ import IconsResolver from 'unplugin-icons/resolver';
6
+ import { defineConfig } from 'vitest/config';
4
7
  import { resolve } from 'path';
5
8
 
6
- export default {
9
+ export default defineConfig({
7
10
  plugins: [
8
- I18n({ include: resolve(__dirname, './src/lang/**/*.yaml') }),
9
11
  Aerogel(),
10
12
  Components({
11
- dirs: ['src/pages'],
12
13
  dts: false,
13
- resolvers: [AerogelResolver()],
14
+ resolvers: [AerogelResolver(), IconsResolver()],
14
15
  }),
16
+ I18n({ include: resolve(__dirname, './src/lang/**/*.yaml') }),
17
+ Icons(),
15
18
  ],
16
19
  resolve: {
17
20
  alias: {
18
21
  '@': resolve(__dirname, './src'),
19
22
  },
20
23
  },
21
- };
24
+ });
@@ -0,0 +1,8 @@
1
+ import { Service } from '@aerogel/core';
2
+ import { facade } from '@noeldemartin/utils';
3
+
4
+ export class <% service.name %>Service extends Service {
5
+
6
+ }
7
+
8
+ export default facade(new <% service.name %>Service());
@@ -1,4 +0,0 @@
1
- /** @type {import('@noeldemartin/scripts').Config} */
2
- module.exports = {
3
- external: ['fs', '@noeldemartin/utils', 'chalk', 'child_process', 'commander', 'mustache', 'path', 'readline'],
4
- };