@aerogel/cli 0.0.0-next.47ed8ee3c048720794026e45140e9b700cb428b9 → 0.0.0-next.5953e1862a7c89a8fc80da087467d67d4f4e8c73

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 (58) hide show
  1. package/dist/aerogel-cli.cjs.js +1 -1
  2. package/dist/aerogel-cli.cjs.js.map +1 -1
  3. package/dist/aerogel-cli.esm.js +1 -1
  4. package/dist/aerogel-cli.esm.js.map +1 -1
  5. package/package.json +11 -4
  6. package/src/cli.ts +4 -0
  7. package/src/commands/create.test.ts +22 -5
  8. package/src/commands/create.ts +30 -12
  9. package/src/commands/generate-component.test.ts +40 -3
  10. package/src/commands/generate-component.ts +143 -20
  11. package/src/commands/generate-model.test.ts +7 -4
  12. package/src/commands/generate-model.ts +32 -15
  13. package/src/commands/generate-service.test.ts +21 -0
  14. package/src/commands/generate-service.ts +151 -0
  15. package/src/commands/install.test.ts +41 -0
  16. package/src/commands/install.ts +33 -0
  17. package/src/lib/App.ts +65 -3
  18. package/src/lib/Editor.ts +58 -0
  19. package/src/lib/File.ts +6 -0
  20. package/src/lib/Log.mock.ts +13 -4
  21. package/src/lib/Log.test.ts +19 -3
  22. package/src/lib/Log.ts +36 -20
  23. package/src/lib/Shell.mock.ts +1 -1
  24. package/src/lib/Template.ts +5 -1
  25. package/src/lib/utils/app.ts +15 -0
  26. package/src/lib/utils/edit.ts +44 -0
  27. package/src/lib/utils/paths.ts +34 -0
  28. package/src/plugins/Histoire.ts +93 -0
  29. package/src/plugins/Plugin.ts +178 -0
  30. package/src/plugins/Solid.ts +78 -0
  31. package/src/plugins/Soukai.ts +19 -0
  32. package/src/testing/setup.ts +38 -6
  33. package/templates/app/.github/workflows/ci.yml +14 -2
  34. package/templates/app/.vscode/launch.json +16 -0
  35. package/templates/app/.vscode/settings.json +10 -0
  36. package/templates/app/README.md +3 -0
  37. package/templates/app/cypress/cypress.config.ts +16 -0
  38. package/templates/app/index.html +4 -3
  39. package/templates/app/package.json +34 -12
  40. package/templates/app/src/App.vue +5 -3
  41. package/templates/app/src/assets/public/robots.txt +2 -0
  42. package/templates/app/src/main.ts +6 -2
  43. package/templates/app/src/types/globals.d.ts +0 -1
  44. package/templates/app/tailwind.config.js +1 -1
  45. package/templates/app/tsconfig.json +1 -0
  46. package/templates/app/vite.config.ts +14 -6
  47. package/templates/component-input/[component.name].vue +16 -0
  48. package/templates/component-input-story/[component.name].story.vue +63 -0
  49. package/templates/histoire/histoire.config.ts +7 -0
  50. package/templates/histoire/patches/histoire+0.17.6.patch +13 -0
  51. package/templates/histoire/src/main.histoire.ts +8 -0
  52. package/templates/service/[service.name].ts +8 -0
  53. package/.eslintrc.js +0 -7
  54. package/noeldemartin.config.js +0 -4
  55. package/src/lib/utils.test.ts +0 -33
  56. package/src/lib/utils.ts +0 -44
  57. package/templates/app/cypress.config.ts +0 -8
  58. /package/templates/app/src/assets/{styles.css → css/styles.css} +0 -0
@@ -0,0 +1,93 @@
1
+ import File from '@/lib/File';
2
+ import Log from '@/lib/Log';
3
+ import Plugin from '@/plugins/Plugin';
4
+ import Shell from '@/lib/Shell';
5
+ import Template from '@/lib/Template';
6
+ import { isLinkedLocalApp } from '@/lib/utils/app';
7
+ import { packagePath, templatePath } from '@/lib/utils/paths';
8
+ import type { Editor } from '@/lib/Editor';
9
+
10
+ export class Histoire extends Plugin {
11
+
12
+ private installedPatchPackage: boolean = false;
13
+
14
+ constructor() {
15
+ super('histoire');
16
+ }
17
+
18
+ public async beforeInstall(): Promise<void> {
19
+ this.installedPatchPackage = false;
20
+ }
21
+
22
+ protected async afterInstall(): Promise<void> {
23
+ if (!this.installedPatchPackage) {
24
+ return;
25
+ }
26
+
27
+ await Log.animate('Patching dependencies', async () => {
28
+ await Shell.run('npx patch-package');
29
+ });
30
+ }
31
+
32
+ protected async updateFiles(editor: Editor): Promise<void> {
33
+ await this.updateTailwindConfig(editor, {
34
+ content: isLinkedLocalApp()
35
+ ? `'${packagePath('histoire')}/dist/**/*.js'`
36
+ : '\'./node_modules/@aerogel/histoire/dist/**/*.js\'',
37
+ });
38
+
39
+ await this.updateNpmScripts(editor);
40
+ await this.createConfigFiles();
41
+ await super.updateFiles(editor);
42
+ }
43
+
44
+ protected async installNpmDependencies(): Promise<void> {
45
+ // We need this specific version because we're patching it using patch-package
46
+ await Shell.run('npm install histoire@0.17.6 --save-dev');
47
+
48
+ if (!File.contains('package.json', '"patch-package"')) {
49
+ await Shell.run('npm install patch-package --save-dev');
50
+
51
+ this.installedPatchPackage = true;
52
+ }
53
+
54
+ await super.installNpmDependencies();
55
+ }
56
+
57
+ protected getLocalPackageName(): string {
58
+ return this.name;
59
+ }
60
+
61
+ protected async updateNpmScripts(editor: Editor): Promise<void> {
62
+ Log.info('Updating npm scripts...');
63
+
64
+ const packageJson = File.read('package.json');
65
+
66
+ if (!packageJson) {
67
+ return Log.fail('Could not find package.json file');
68
+ }
69
+
70
+ File.write(
71
+ 'package.json',
72
+ packageJson.replace(
73
+ '"lint": "noeldemartin-lint src",',
74
+ this.installedPatchPackage
75
+ ? '"histoire": "histoire dev", "lint": "noeldemartin-lint src", "postinstall": "patch-package",'
76
+ : '"histoire": "histoire dev", "lint": "noeldemartin-lint src",',
77
+ ),
78
+ );
79
+
80
+ editor.addModifiedFile('package.json');
81
+ }
82
+
83
+ protected async createConfigFiles(): Promise<void> {
84
+ Log.info('Creating config files...');
85
+
86
+ Template.instantiate(templatePath('histoire'));
87
+ }
88
+
89
+ protected isForDevelopment(): boolean {
90
+ return true;
91
+ }
92
+
93
+ }
@@ -0,0 +1,178 @@
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.beforeInstall();
24
+ await this.installDependencies();
25
+
26
+ if (editFiles()) {
27
+ const editor = app().edit();
28
+
29
+ await this.updateFiles(editor);
30
+ await editor.format();
31
+ }
32
+
33
+ await this.afterInstall();
34
+
35
+ Log.info(`Plugin ${this.name} installed!`);
36
+ }
37
+
38
+ protected assertNotInstalled(): void {
39
+ if (File.contains('package.json', `"${this.getNpmPackageName()}"`)) {
40
+ Log.fail(`${this.name} is already installed!`);
41
+ }
42
+ }
43
+
44
+ protected async beforeInstall(): Promise<void> {
45
+ // Placeholder for overrides, don't place any functionality here.
46
+ }
47
+
48
+ protected async afterInstall(): Promise<void> {
49
+ // Placeholder for overrides, don't place any functionality here.
50
+ }
51
+
52
+ protected async installDependencies(): Promise<void> {
53
+ await Log.animate('Installing plugin dependencies', async () => {
54
+ await this.installNpmDependencies();
55
+ });
56
+ }
57
+
58
+ protected async updateFiles(editor: Editor): Promise<void> {
59
+ if (!this.isForDevelopment()) {
60
+ await this.updateBootstrapConfig(editor);
61
+ }
62
+ }
63
+
64
+ protected async installNpmDependencies(): Promise<void> {
65
+ const flags = this.isForDevelopment() ? '--save-dev' : '';
66
+
67
+ if (isLinkedLocalApp()) {
68
+ await Shell.run(`npm install file:${packagePath(this.getLocalPackageName())} ${flags}`);
69
+
70
+ return;
71
+ }
72
+
73
+ if (isLocalApp()) {
74
+ const packPath = packagePackPath(this.getLocalPackageName()) ?? packNotFound(this.getLocalPackageName());
75
+
76
+ await Shell.run(`npm install file:${packPath} ${flags}`);
77
+
78
+ return;
79
+ }
80
+
81
+ await Shell.run(`npm install ${this.getNpmPackageName()}@next --save-exact ${flags}`);
82
+ }
83
+
84
+ protected async updateBootstrapConfig(editor: Editor): Promise<void> {
85
+ await Log.animate('Injecting plugin in bootstrap configuration', async () => {
86
+ const mainConfig = editor.requireSourceFile('src/main.ts');
87
+ const pluginsArray = this.getBootstrapPluginsDeclaration(mainConfig);
88
+
89
+ if (!pluginsArray) {
90
+ return Log.fail(`
91
+ Could not find plugins array in bootstrap config, please add the following manually:
92
+
93
+ ${this.getBootstrapConfig()}
94
+ `);
95
+ }
96
+
97
+ mainConfig.addImportDeclaration(this.getBootstrapImport());
98
+ pluginsArray.addElement(this.getBootstrapConfig());
99
+
100
+ await editor.save(mainConfig);
101
+ });
102
+ }
103
+
104
+ protected async updateTailwindConfig(editor: Editor, options: { content: string }): Promise<void> {
105
+ await Log.animate('Updating tailwind configuration', async () => {
106
+ const tailwindConfig = editor.requireSourceFile('tailwind.config.js');
107
+ const contentArray = this.getTailwindContentArray(tailwindConfig);
108
+
109
+ if (!contentArray) {
110
+ return Log.fail(`
111
+ Could not find content array in tailwind config, please add the following manually:
112
+
113
+ ${options.content}
114
+ `);
115
+ }
116
+
117
+ contentArray.addElement(options.content);
118
+
119
+ await editor.save(tailwindConfig);
120
+ });
121
+ }
122
+
123
+ protected getBootstrapPluginsDeclaration(mainConfig: SourceFile): ArrayLiteralExpression | null {
124
+ const bootstrapAppCall = findDescendant(mainConfig, {
125
+ guard: Node.isCallExpression,
126
+ validate: (callExpression) => callExpression.getExpression().getText() === 'bootstrapApplication',
127
+ skip: SyntaxKind.ImportDeclaration,
128
+ });
129
+ const bootstrapOptions = bootstrapAppCall?.getArguments()[1];
130
+ const pluginsOption = when(bootstrapOptions, Node.isObjectLiteralExpression)?.getProperty('plugins');
131
+ const pluginsArray = when(pluginsOption, Node.isPropertyAssignment)?.getInitializer();
132
+
133
+ if (!Node.isArrayLiteralExpression(pluginsArray)) {
134
+ return null;
135
+ }
136
+
137
+ return pluginsArray;
138
+ }
139
+
140
+ protected getTailwindContentArray(tailwindConfig: SourceFile): ArrayLiteralExpression | null {
141
+ const contentAssignment = findDescendant(tailwindConfig, {
142
+ guard: Node.isPropertyAssignment,
143
+ validate: (propertyAssignment) => propertyAssignment.getName() === 'content',
144
+ skip: SyntaxKind.JSDoc,
145
+ });
146
+ const contentArray = contentAssignment?.getInitializer();
147
+
148
+ if (!Node.isArrayLiteralExpression(contentArray)) {
149
+ return null;
150
+ }
151
+
152
+ return contentArray;
153
+ }
154
+
155
+ protected getBootstrapImport(): OptionalKind<ImportDeclarationStructure> {
156
+ return {
157
+ defaultImport: this.name,
158
+ moduleSpecifier: `@aerogel/plugin-${this.name}`,
159
+ };
160
+ }
161
+
162
+ protected getNpmPackageName(): string {
163
+ return `@aerogel/${this.getLocalPackageName()}`;
164
+ }
165
+
166
+ protected getLocalPackageName(): string {
167
+ return `plugin-${this.name}`;
168
+ }
169
+
170
+ protected isForDevelopment(): boolean {
171
+ return false;
172
+ }
173
+
174
+ protected getBootstrapConfig(): string {
175
+ return `${this.name}()`;
176
+ }
177
+
178
+ }
@@ -0,0 +1,78 @@
1
+ import File from '@/lib/File';
2
+ import Log from '@/lib/Log';
3
+ import Plugin from '@/plugins/Plugin';
4
+ import Shell from '@/lib/Shell';
5
+ import { isLinkedLocalApp } from '@/lib/utils/app';
6
+ import { packagePath } from '@/lib/utils/paths';
7
+ import type { Editor } from '@/lib/Editor';
8
+
9
+ export class Solid extends Plugin {
10
+
11
+ constructor() {
12
+ super('solid');
13
+ }
14
+
15
+ protected async updateFiles(editor: Editor): Promise<void> {
16
+ await this.updateTailwindConfig(editor, {
17
+ content: isLinkedLocalApp()
18
+ ? `'${packagePath('plugin-solid')}/dist/**/*.js'`
19
+ : '\'./node_modules/@aerogel/plugin-solid/dist/**/*.js\'',
20
+ });
21
+
22
+ await this.updateNpmScripts(editor);
23
+ await this.updateGitIgnore();
24
+ await super.updateFiles(editor);
25
+ }
26
+
27
+ protected async installNpmDependencies(): Promise<void> {
28
+ await Shell.run('npm install soukai-solid@next --save-exact');
29
+ await Shell.run('npm install @solid/community-server@7 --save');
30
+ await super.installNpmDependencies();
31
+ }
32
+
33
+ protected async updateNpmScripts(editor: Editor): Promise<void> {
34
+ Log.info('Updating npm scripts...');
35
+
36
+ const packageJson = File.read('package.json');
37
+
38
+ if (!packageJson) {
39
+ return Log.fail('Could not find package.json file');
40
+ }
41
+
42
+ File.write(
43
+ 'package.json',
44
+ packageJson
45
+ .replace(
46
+ '"cy:dev": "concurrently --kill-others \\"npm run test:serve-app\\" \\"npm run cy:open\\"",',
47
+ '"cy:dev": "concurrently --kill-others ' +
48
+ '\\"npm run test:serve-app\\" \\"npm run test:serve-pod\\" \\"npm run cy:open\\"",',
49
+ )
50
+ .replace(
51
+ '"cy:test": "start-server-and-test test:serve-app http-get://localhost:5001 cy:run",',
52
+ '"cy:test": "start-server-and-test ' +
53
+ 'test:serve-app http-get://localhost:5001 test:serve-pod http-get://localhost:4000 cy:run",',
54
+ )
55
+ .replace(
56
+ '"dev": "vite",',
57
+ '"dev": "vite",\n' +
58
+ '"dev:serve-pod": "community-solid-server -c @css:config/file.json -p 4000 -f ./solid-data",',
59
+ )
60
+ .replace(
61
+ '"test:serve-app": "vite --port 5001"',
62
+ '"test:serve-app": "vite --port 5001",\n' +
63
+ '"test:serve-pod": "community-solid-server -p 4000 -l warn"',
64
+ ),
65
+ );
66
+
67
+ editor.addModifiedFile('package.json');
68
+ }
69
+
70
+ protected async updateGitIgnore(): Promise<void> {
71
+ Log.info('Updating .gitignore');
72
+
73
+ const gitignore = File.read('.gitignore') ?? '';
74
+
75
+ File.write('.gitignore', `${gitignore}/solid-data\n`);
76
+ }
77
+
78
+ }
@@ -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
 
@@ -12,6 +12,18 @@ jobs:
12
12
  node-version-file: '.nvmrc'
13
13
  - run: npm ci
14
14
  - run: npm run lint
15
- - run: npm run test:ci
16
- - run: npm run cy:test
17
15
  - run: npm run build
16
+ - run: npm run test:ci
17
+ - run: npm run cy:test-snapshots:ci
18
+ - name: Upload Cypress screenshots
19
+ uses: actions/upload-artifact@v3
20
+ if: ${{ failure() }}
21
+ with:
22
+ name: cypress_screenshots
23
+ path: cypress/screenshots
24
+ - name: Upload Cypress snapshots
25
+ uses: actions/upload-artifact@v3
26
+ if: ${{ failure() }}
27
+ with:
28
+ name: cypress_snapshots
29
+ path: cypress/snapshots
@@ -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
+ }
@@ -0,0 +1,3 @@
1
+ # <% app.name %>
2
+
3
+ App created with [AerogelJS](https://aerogel.js.org)
@@ -0,0 +1,16 @@
1
+ import install from '@aerogel/cypress/dist/plugin';
2
+ import { defineConfig } from 'cypress';
3
+
4
+ export default defineConfig({
5
+ e2e: {
6
+ baseUrl: 'http://localhost:5001',
7
+ video: false,
8
+ retries: {
9
+ runMode: 3,
10
+ openMode: 0,
11
+ },
12
+ setupNodeEvents(on) {
13
+ install(on);
14
+ },
15
+ },
16
+ });
@@ -3,10 +3,11 @@
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
- <title><% app.name %></title>
6
+ <title>{{ app.name }}</title>
7
+ {{ socialMeta() }}
7
8
  </head>
8
- <body class="h-full w-full">
9
- <div id="app" class="h-full"></div>
9
+ <body class="h-full w-full text-base font-normal leading-tight text-gray-900 antialiased">
10
+ <div id="app" class="loading h-full"></div>
10
11
  <script type="module" src="./src/main.ts"></script>
11
12
  </body>
12
13
  </html>
@@ -5,9 +5,11 @@
5
5
  "scripts": {
6
6
  "build": "vite build",
7
7
  "cy:dev": "concurrently --kill-others \"npm run test:serve-app\" \"npm run cy:open\"",
8
- "cy:open": "cypress open --e2e --browser chromium",
9
- "cy:run": "cypress run",
8
+ "cy:open": "cypress open --config-file ./cypress/cypress.config.ts --e2e --browser chromium",
9
+ "cy:run": "cypress run --config-file ./cypress/cypress.config.ts",
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,50 @@
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
+ "@iconify/json": "^2.2.134",
37
+ "@noeldemartin/eslint-config-vue": "next",
38
+ "@noeldemartin/scripts": "next",
34
39
  "@total-typescript/ts-reset": "^0.4.2",
35
40
  "@types/node": "^20.3.1",
36
41
  "autoprefixer": "^10.4.14",
37
42
  "concurrently": "^8.2.0",
38
43
  "cypress": "^12.17.0",
44
+ "eslint": "^8.40.0",
45
+ "prettier": "^2.8.8",
46
+ "prettier-eslint-cli": "^7.1.0",
47
+ "prettier-plugin-tailwindcss": "^0.2.8",
39
48
  "start-server-and-test": "^2.0.0",
49
+ "unplugin-icons": "^0.16.3",
40
50
  "unplugin-vue-components": "^0.24.1",
41
51
  "vite": "^4.3.0",
42
- "vitest": "^0.33.0"
52
+ "vitest": "^0.33.0",
53
+ "vue-tsc": "^1.8.15"
54
+ },
55
+ "eslintConfig": {
56
+ "extends": [
57
+ "@noeldemartin/eslint-config-vue"
58
+ ]
59
+ },
60
+ "prettier": {
61
+ "plugins": [
62
+ "prettier-plugin-tailwindcss"
63
+ ],
64
+ "printWidth": 120
43
65
  }
44
66
  }
@@ -1,7 +1,9 @@
1
1
  <template>
2
- <AGAppLayout>
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>
2
+ <AGAppLayout class="bg-blue-50">
3
+ <main class="flex flex-grow flex-col items-center justify-center">
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>
@@ -0,0 +1,2 @@
1
+ User-agent: *
2
+ Disallow:
@@ -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
- import './assets/styles.css';
5
+ import './assets/css/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
  };
@@ -6,6 +6,7 @@
6
6
  "strict": true,
7
7
  "jsx": "preserve",
8
8
  "noUncheckedIndexedAccess": true,
9
+ "skipLibCheck": true,
9
10
  "resolveJsonModule": true,
10
11
  "esModuleInterop": true,
11
12
  "lib": ["esnext", "dom"],