create-analog 0.1.2 → 0.1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-analog",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Brandon Roberts",
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
3
  "version": 1,
4
- "cli": {
5
- "packageManager": "yarn"
6
- },
7
4
  "newProjectRoot": "projects",
8
5
  "projects": {
9
6
  "my-app": {
@@ -6,30 +6,55 @@ import { RouterModule } from '@angular/router';
6
6
  standalone: true,
7
7
  imports: [RouterModule],
8
8
  template: `
9
- <!--The content below is only a placeholder and can be replaced.-->
10
- <div style="text-align:center" class="content">
11
- <h1>
12
- Welcome to {{title}}!
13
- </h1>
14
- <span style="display: block">{{ title }} app is running!</span>
15
- <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
9
+ <div>
10
+ <a href="https://vitejs.dev" target="_blank">
11
+ <img src="/vite.svg" class="logo" alt="Vite logo" />
12
+ </a>
13
+ <a href="https://angular.io/" target="_blank">
14
+ <img alt="Angular Logo" class="logo angular" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
15
+ </a>
16
16
  </div>
17
- <h2>Here are some links to help you start: </h2>
18
- <ul>
19
- <li>
20
- <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
21
- </li>
22
- <li>
23
- <h2><a target="_blank" rel="noopener" href="https://angular.io/cli">CLI Documentation</a></h2>
24
- </li>
25
- <li>
26
- <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
27
- </li>
28
- </ul>
17
+
18
+ <h1>Vite + Angular</h1>
19
+
20
+ <div class="card">
21
+ <button type="button" (click)="increment()">Count {{ count }}</button>
22
+ </div>
23
+
24
+ <p class="read-the-docs">
25
+ Click on the Vite and Angular logos to learn more.
26
+ </p>
27
+
29
28
  <router-outlet></router-outlet>
30
29
  `,
31
- styles: []
30
+ styles: [`
31
+ :host {
32
+ max-width: 1280px;
33
+ margin: 0 auto;
34
+ padding: 2rem;
35
+ text-align: center;
36
+ }
37
+
38
+ .logo {
39
+ height: 6em;
40
+ padding: 1.5em;
41
+ will-change: filter;
42
+ }
43
+ .logo:hover {
44
+ filter: drop-shadow(0 0 2em #646cffaa);
45
+ }
46
+ .logo.angular:hover {
47
+ filter: drop-shadow(0 0 2em #42b883aa);
48
+ }
49
+ .read-the-docs {
50
+ color: #888;
51
+ }
52
+ `]
32
53
  })
33
54
  export class AppComponent {
34
- title = 'my-app';
55
+ count = 0;
56
+
57
+ increment() {
58
+ this.count++;
59
+ }
35
60
  }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
@@ -6,6 +6,7 @@
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
10
  </head>
10
11
  <body>
11
12
  <app-root></app-root>
@@ -1 +1,76 @@
1
1
  /* You can add global styles to this file, and also import other style files */
2
+ /* You can add global styles to this file, and also import other style files */
3
+ :root {
4
+ font-family: Inter, Avenir, Helvetica, Arial, sans-serif;
5
+ font-size: 16px;
6
+ line-height: 24px;
7
+ font-weight: 400;
8
+
9
+ color-scheme: light dark;
10
+ color: rgba(255, 255, 255, 0.87);
11
+ background-color: #242424;
12
+
13
+ font-synthesis: none;
14
+ text-rendering: optimizeLegibility;
15
+ -webkit-font-smoothing: antialiased;
16
+ -moz-osx-font-smoothing: grayscale;
17
+ -webkit-text-size-adjust: 100%;
18
+ }
19
+
20
+ a {
21
+ font-weight: 500;
22
+ color: #646cff;
23
+ text-decoration: inherit;
24
+ }
25
+ a:hover {
26
+ color: #535bf2;
27
+ }
28
+
29
+ body {
30
+ margin: 0;
31
+ display: flex;
32
+ place-items: center;
33
+ min-width: 320px;
34
+ min-height: 100vh;
35
+ }
36
+
37
+ h1 {
38
+ font-size: 3.2em;
39
+ line-height: 1.1;
40
+ }
41
+
42
+ button {
43
+ border-radius: 8px;
44
+ border: 1px solid transparent;
45
+ padding: 0.6em 1.2em;
46
+ font-size: 1em;
47
+ font-weight: 500;
48
+ font-family: inherit;
49
+ background-color: #1a1a1a;
50
+ cursor: pointer;
51
+ transition: border-color 0.25s;
52
+ }
53
+ button:hover {
54
+ border-color: #646cff;
55
+ }
56
+ button:focus,
57
+ button:focus-visible {
58
+ outline: 4px auto -webkit-focus-ring-color;
59
+ }
60
+
61
+ .card {
62
+ padding: 2em;
63
+ }
64
+
65
+ @media (prefers-color-scheme: light) {
66
+ :root {
67
+ color: #213547;
68
+ background-color: #ffffff;
69
+ }
70
+ a:hover {
71
+ color: #747bff;
72
+ }
73
+ button {
74
+ background-color: #f9f9f9;
75
+ }
76
+ }
@@ -4,12 +4,11 @@ import angular from '@analogjs/vite-plugin-angular';
4
4
  // https://vitejs.dev/config/
5
5
  export default defineConfig({
6
6
  root: 'src',
7
- optimizeDeps: {
8
- exclude: ['rxjs']
9
- },
7
+ publicDir: 'assets',
10
8
  build: {
11
- outDir: `dist/my-app`,
12
- emptyOutDir: true
9
+ outDir: `../dist/my-app`,
10
+ emptyOutDir: true,
11
+ target: 'es2020'
13
12
  },
14
13
  resolve: {
15
14
  mainFields: ['module'],