-
-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(create-analog): add template for Angular v16 pre-release (#296)
- Loading branch information
1 parent
4a1f2b3
commit f7748b1
Showing
29 changed files
with
596 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
packages/create-analog/template-angular-v16-prerelease/.editorconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.ts] | ||
quote_type = single | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
4 changes: 4 additions & 0 deletions
4
packages/create-analog/template-angular-v16-prerelease/.vscode/extensions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846 | ||
"recommendations": ["angular.ng-template"] | ||
} |
19 changes: 19 additions & 0 deletions
19
packages/create-analog/template-angular-v16-prerelease/.vscode/launch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "ng serve", | ||
"type": "chrome", | ||
"request": "launch", | ||
"preLaunchTask": "npm: start", | ||
"url": "http://localhost:5173/" | ||
}, | ||
{ | ||
"name": "ng test", | ||
"type": "chrome", | ||
"request": "launch", | ||
"preLaunchTask": "npm: test" | ||
} | ||
] | ||
} |
42 changes: 42 additions & 0 deletions
42
packages/create-analog/template-angular-v16-prerelease/.vscode/tasks.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558 | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "start", | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "typescript", | ||
"pattern": "$tsc", | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": { | ||
"regexp": "(.*?)" | ||
}, | ||
"endsPattern": { | ||
"regexp": "bundle generation complete" | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "test", | ||
"isBackground": true, | ||
"problemMatcher": { | ||
"owner": "typescript", | ||
"pattern": "$tsc", | ||
"background": { | ||
"activeOnStart": true, | ||
"beginsPattern": { | ||
"regexp": "(.*?)" | ||
}, | ||
"endsPattern": { | ||
"regexp": "bundle generation complete" | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} |
26 changes: 26 additions & 0 deletions
26
packages/create-analog/template-angular-v16-prerelease/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Analog App | ||
|
||
This project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular. | ||
|
||
## Setup | ||
|
||
Run `yarn` to install the application dependencies. | ||
|
||
## Development | ||
|
||
Run `yarn dev` for a dev server. Navigate to `http://localhost:5173/`. The application will automatically reload if you change any of the source files. | ||
|
||
## Build | ||
|
||
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. | ||
|
||
## Test | ||
|
||
Run `yarn test` to run unit tests with [Vitest](https://vitest.dev). | ||
|
||
## Community | ||
|
||
- Join the [Discord](https://discord.gg/mKC2Ec48U5) | ||
- Visit and Star the [GitHub Repo](https://github.com/analogjs/analog) | ||
- Visit the [Website](https://analogjs.org/) | ||
- Follow us on [Twitter](https://twitter.com/analogjs) |
42 changes: 42 additions & 0 deletions
42
packages/create-analog/template-angular-v16-prerelease/_gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# Compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
/bazel-out | ||
|
||
# Node | ||
/node_modules | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# IDEs and editors | ||
.idea/ | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# Visual Studio Code | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
.history/* | ||
|
||
# Miscellaneous | ||
/.angular/cache | ||
.sass-cache/ | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
testem.log | ||
/typings | ||
|
||
# System files | ||
.DS_Store | ||
Thumbs.db |
55 changes: 55 additions & 0 deletions
55
packages/create-analog/template-angular-v16-prerelease/angular.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"my-app": { | ||
"projectType": "application", | ||
"root": "", | ||
"sourceRoot": "src", | ||
"prefix": "app", | ||
"architect": { | ||
"build": { | ||
"builder": "@nrwl/vite:build", | ||
"options": { | ||
"configFile": "vite.config.ts", | ||
"outputPath": "dist/client" | ||
}, | ||
"defaultConfiguration": "production", | ||
"configurations": { | ||
"development": { | ||
"mode": "development" | ||
}, | ||
"production": { | ||
"sourcemap": false, | ||
"mode": "production" | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"builder": "@nrwl/vite:dev-server", | ||
"defaultConfiguration": "development", | ||
"options": { | ||
"buildTarget": "my-app:build", | ||
"port": 5173 | ||
}, | ||
"configurations": { | ||
"development": { | ||
"buildTarget": "my-app:build:development", | ||
"hmr": true | ||
}, | ||
"production": { | ||
"buildTarget": "my-app:build:production" | ||
} | ||
} | ||
}, | ||
"test": { | ||
"builder": "@nrwl/vite:test", | ||
"options": { | ||
"config": "vite.config.ts" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/create-analog/template-angular-v16-prerelease/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>MyApp</title> | ||
<base href="/"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="icon" type="image/x-icon" href="/src/favicon.ico"> | ||
<link rel="stylesheet" href="/src/styles.css" /> | ||
</head> | ||
<body> | ||
<app-root></app-root> | ||
<script type="module" src="/src/main.ts"></script> | ||
</body> | ||
</html> |
48 changes: 48 additions & 0 deletions
48
packages/create-analog/template-angular-v16-prerelease/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "my-app", | ||
"version": "0.0.0", | ||
"private": true, | ||
"engines": { | ||
"node": ">=16.0.0" | ||
}, | ||
"scripts": { | ||
"dev": "ng serve", | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"watch": "ng build --watch", | ||
"test": "ng test" | ||
}, | ||
"dependencies": { | ||
"@analogjs/content": "latest", | ||
"@analogjs/router": "latest", | ||
"@angular/animations": "^16.0.0-next.0", | ||
"@angular/common": "^16.0.0-next.0", | ||
"@angular/compiler": "^16.0.0-next.0", | ||
"@angular/core": "^16.0.0-next.0", | ||
"@angular/forms": "^16.0.0-next.0", | ||
"@angular/platform-browser": "^16.0.0-next.0", | ||
"@angular/platform-browser-dynamic": "^16.0.0-next.0", | ||
"@angular/platform-server": "^16.0.0-next.0", | ||
"@angular/router": "^16.0.0-next.0", | ||
"@nrwl/angular": "^15.7.0", | ||
"front-matter": "^4.0.2", | ||
"marked": "^4.2.12", | ||
"prismjs": "^1.29.0", | ||
"rxjs": "~7.5.6", | ||
"tslib": "^2.4.0", | ||
"zone.js": "~0.13.0" | ||
}, | ||
"devDependencies": { | ||
"@analogjs/platform": "latest", | ||
"@angular-devkit/build-angular": "^16.0.0-next.0", | ||
"@angular/cli": "~16.0.0-next.0", | ||
"@angular/compiler-cli": "^16.0.0-next.0", | ||
"@nrwl/vite": "^15.7.0", | ||
"nx": "^15.7.0", | ||
"jsdom": "^20.0.0", | ||
"typescript": "~5.0.2", | ||
"vite": "^4.0.3", | ||
"vitest": "^0.25.8" | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/create-analog/template-angular-v16-prerelease/src/app/app.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { AppComponent } from './app.component'; | ||
|
||
describe('AppComponent', () => { | ||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [RouterTestingModule, AppComponent], | ||
}).compileComponents(); | ||
}); | ||
|
||
it('should create the app', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
packages/create-analog/template-angular-v16-prerelease/src/app/app.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { Component } from '@angular/core'; | ||
import { RouterOutlet } from '@angular/router'; | ||
|
||
@Component({ | ||
selector: 'app-root', | ||
standalone: true, | ||
imports: [RouterOutlet], | ||
template: ` <router-outlet></router-outlet> `, | ||
styles: [ | ||
` | ||
:host { | ||
max-width: 1280px; | ||
margin: 0 auto; | ||
padding: 2rem; | ||
text-align: center; | ||
} | ||
`, | ||
], | ||
}) | ||
export class AppComponent {} |
62 changes: 62 additions & 0 deletions
62
packages/create-analog/template-angular-v16-prerelease/src/app/pages/index.page.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-home', | ||
standalone: true, | ||
template: ` | ||
<div> | ||
<a href="https://vitejs.dev" target="_blank"> | ||
<img src="/vite.svg" class="logo" alt="Vite logo" /> | ||
</a> | ||
<a href="https://angular.io/" target="_blank"> | ||
<img | ||
alt="Angular Logo" | ||
class="logo angular" | ||
src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==" | ||
/> | ||
</a> | ||
</div> | ||
<h1>Vite + Angular</h1> | ||
<div class="card"> | ||
<button type="button" (click)="increment()">Count {{ count }}</button> | ||
</div> | ||
<p> | ||
Check out | ||
<a href="https://github.com/analogjs/analog#readme" target="_blank" | ||
>Analog</a | ||
>, the fullstack meta-framework for Angular powered by Vite! | ||
</p> | ||
<p class="read-the-docs"> | ||
Click on the Vite and Angular logos to learn more. | ||
</p> | ||
`, | ||
styles: [ | ||
` | ||
.logo { | ||
height: 6em; | ||
padding: 1.5em; | ||
will-change: filter; | ||
} | ||
.logo:hover { | ||
filter: drop-shadow(0 0 2em #646cffaa); | ||
} | ||
.logo.angular:hover { | ||
filter: drop-shadow(0 0 2em #42b883aa); | ||
} | ||
.read-the-docs { | ||
color: #888; | ||
} | ||
`, | ||
], | ||
}) | ||
export default class HomeComponent { | ||
count = 0; | ||
|
||
increment() { | ||
this.count++; | ||
} | ||
} |
Empty file.
Oops, something went wrong.