create-analog 0.2.1 → 0.2.3
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/package.json +1 -1
- package/template-angular-v15/.vscode/launch.json +3 -4
- package/template-angular-v15/README.md +2 -2
- package/template-angular-v15/angular.json +40 -2
- package/template-angular-v15/{src/index.html → index.html} +2 -2
- package/template-angular-v15/package.json +8 -7
- package/template-angular-v15/src/main.ts +1 -1
- package/template-angular-v15/tsconfig.app.json +1 -1
- package/template-angular-v15/tsconfig.spec.json +1 -1
- package/template-angular-v15/vite.config.ts +3 -9
- package/template-angular-v15/src/polyfills.ts +0 -52
package/package.json
CHANGED
|
@@ -4,17 +4,16 @@
|
|
|
4
4
|
"configurations": [
|
|
5
5
|
{
|
|
6
6
|
"name": "ng serve",
|
|
7
|
-
"type": "
|
|
7
|
+
"type": "chrome",
|
|
8
8
|
"request": "launch",
|
|
9
9
|
"preLaunchTask": "npm: start",
|
|
10
|
-
"url": "http://localhost:
|
|
10
|
+
"url": "http://localhost:5173/"
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"name": "ng test",
|
|
14
14
|
"type": "chrome",
|
|
15
15
|
"request": "launch",
|
|
16
|
-
"preLaunchTask": "npm: test"
|
|
17
|
-
"url": "http://localhost:9876/debug.html"
|
|
16
|
+
"preLaunchTask": "npm: test"
|
|
18
17
|
}
|
|
19
18
|
]
|
|
20
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Analog App
|
|
2
2
|
|
|
3
|
-
This project was generated with [Analog](https://
|
|
3
|
+
This project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular.
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ Run `yarn dev` for a dev server. Navigate to `http://localhost:5173/`. The appli
|
|
|
12
12
|
|
|
13
13
|
## Build
|
|
14
14
|
|
|
15
|
-
Run `yarn build` to build the project. The build artifacts
|
|
15
|
+
Run `yarn build` to build the client/server project. The client build artifacts are located in the `dist/client` directory. The server for the API build artifacts are located in the `dist/server` directory.
|
|
16
16
|
|
|
17
17
|
## Test
|
|
18
18
|
|
|
@@ -5,12 +5,50 @@
|
|
|
5
5
|
"projects": {
|
|
6
6
|
"my-app": {
|
|
7
7
|
"projectType": "application",
|
|
8
|
-
"schematics": {},
|
|
9
8
|
"root": "",
|
|
10
9
|
"sourceRoot": "src",
|
|
11
10
|
"prefix": "app",
|
|
12
11
|
"architect": {
|
|
13
|
-
"
|
|
12
|
+
"build": {
|
|
13
|
+
"builder": "@nrwl/vite:build",
|
|
14
|
+
"options": {
|
|
15
|
+
"configFile": "vite.config.ts",
|
|
16
|
+
"outputPath": "dist/client"
|
|
17
|
+
},
|
|
18
|
+
"defaultConfiguration": "production",
|
|
19
|
+
"configurations": {
|
|
20
|
+
"development": {
|
|
21
|
+
"mode": "development"
|
|
22
|
+
},
|
|
23
|
+
"production": {
|
|
24
|
+
"sourcemap": false,
|
|
25
|
+
"mode": "production"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"serve": {
|
|
30
|
+
"builder": "@nrwl/vite:dev-server",
|
|
31
|
+
"defaultConfiguration": "development",
|
|
32
|
+
"options": {
|
|
33
|
+
"buildTarget": "my-app:build",
|
|
34
|
+
"port": 5173
|
|
35
|
+
},
|
|
36
|
+
"configurations": {
|
|
37
|
+
"development": {
|
|
38
|
+
"buildTarget": "my-app:build:development",
|
|
39
|
+
"hmr": true
|
|
40
|
+
},
|
|
41
|
+
"production": {
|
|
42
|
+
"buildTarget": "my-app:build:production"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"test": {
|
|
47
|
+
"builder": "@nrwl/vite:test",
|
|
48
|
+
"options": {
|
|
49
|
+
"config": "vite.config.ts"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
14
52
|
}
|
|
15
53
|
}
|
|
16
54
|
}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
<base href="/">
|
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
8
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
|
9
|
-
<link rel="stylesheet" href="/styles.css" />
|
|
9
|
+
<link rel="stylesheet" href="/src/styles.css" />
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<app-root></app-root>
|
|
13
|
-
<script type="module" src="/main.ts"></script>
|
|
13
|
+
<script type="module" src="/src/main.ts"></script>
|
|
14
14
|
</body>
|
|
15
15
|
</html>
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"node": ">=16.0.0"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"dev": "
|
|
9
|
+
"dev": "ng serve",
|
|
10
10
|
"ng": "ng",
|
|
11
|
-
"start": "
|
|
12
|
-
"build": "
|
|
13
|
-
"watch": "
|
|
14
|
-
"test": "
|
|
11
|
+
"start": "ng serve",
|
|
12
|
+
"build": "ng build",
|
|
13
|
+
"watch": "ng build --watch",
|
|
14
|
+
"test": "ng test"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@analogjs/router": "latest",
|
|
@@ -32,9 +32,10 @@
|
|
|
32
32
|
"@angular-devkit/build-angular": "^15.0.0",
|
|
33
33
|
"@angular/cli": "~15.0.0",
|
|
34
34
|
"@angular/compiler-cli": "^15.0.0",
|
|
35
|
+
"@nrwl/vite": "~15.3.0",
|
|
35
36
|
"jsdom": "^20.0.0",
|
|
36
37
|
"typescript": "~4.8.4",
|
|
37
|
-
"vite": "^
|
|
38
|
-
"vitest": "^0.
|
|
38
|
+
"vite": "^4.0.3",
|
|
39
|
+
"vitest": "^0.25.8"
|
|
39
40
|
}
|
|
40
41
|
}
|
|
@@ -5,12 +5,9 @@ import analog from '@analogjs/platform';
|
|
|
5
5
|
|
|
6
6
|
// https://vitejs.dev/config/
|
|
7
7
|
export default defineConfig(({ mode }) => ({
|
|
8
|
-
|
|
9
|
-
publicDir: 'assets',
|
|
8
|
+
publicDir: 'src/assets',
|
|
10
9
|
build: {
|
|
11
|
-
|
|
12
|
-
emptyOutDir: true,
|
|
13
|
-
target: 'es2022',
|
|
10
|
+
target: ['es2020'],
|
|
14
11
|
},
|
|
15
12
|
resolve: {
|
|
16
13
|
mainFields: ['module'],
|
|
@@ -19,11 +16,8 @@ export default defineConfig(({ mode }) => ({
|
|
|
19
16
|
test: {
|
|
20
17
|
globals: true,
|
|
21
18
|
environment: 'jsdom',
|
|
22
|
-
setupFiles: ['test.ts'],
|
|
19
|
+
setupFiles: ['src/test.ts'],
|
|
23
20
|
include: ['**/*.spec.ts'],
|
|
24
|
-
cache: {
|
|
25
|
-
dir: `../node_modules/.vitest`,
|
|
26
|
-
},
|
|
27
21
|
},
|
|
28
22
|
define: {
|
|
29
23
|
'import.meta.vitest': mode !== 'production',
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file includes polyfills needed by Angular and is loaded before the app.
|
|
3
|
-
* You can add your own extra polyfills to this file.
|
|
4
|
-
*
|
|
5
|
-
* This file is divided into 2 sections:
|
|
6
|
-
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
7
|
-
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
|
8
|
-
* file.
|
|
9
|
-
*
|
|
10
|
-
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
11
|
-
* automatically update themselves. This includes recent versions of Safari, Chrome (including
|
|
12
|
-
* Opera), Edge on the desktop, and iOS and Chrome on mobile.
|
|
13
|
-
*
|
|
14
|
-
* Learn more in https://angular.io/guide/browser-support
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/***************************************************************************************************
|
|
18
|
-
* BROWSER POLYFILLS
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* By default, zone.js will patch all possible macroTask and DomEvents
|
|
23
|
-
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
|
24
|
-
* because those flags need to be set before `zone.js` being loaded, and webpack
|
|
25
|
-
* will put import in the top of bundle, so user need to create a separate file
|
|
26
|
-
* in this directory (for example: zone-flags.ts), and put the following flags
|
|
27
|
-
* into that file, and then add the following code before importing zone.js.
|
|
28
|
-
* import './zone-flags';
|
|
29
|
-
*
|
|
30
|
-
* The flags allowed in zone-flags.ts are listed here.
|
|
31
|
-
*
|
|
32
|
-
* The following flags will work for all browsers.
|
|
33
|
-
*
|
|
34
|
-
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
|
35
|
-
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
|
36
|
-
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
|
37
|
-
*
|
|
38
|
-
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
|
39
|
-
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
|
40
|
-
*
|
|
41
|
-
* (window as any).__Zone_enable_cross_context_check = true;
|
|
42
|
-
*
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
/***************************************************************************************************
|
|
46
|
-
* Zone JS is required by default for Angular itself.
|
|
47
|
-
*/
|
|
48
|
-
import 'zone.js'; // Included with Angular CLI.
|
|
49
|
-
|
|
50
|
-
/***************************************************************************************************
|
|
51
|
-
* APPLICATION IMPORTS
|
|
52
|
-
*/
|