-
-
Notifications
You must be signed in to change notification settings - Fork 260
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 v17 pre-release (#736)
- Loading branch information
1 parent
9e55b56
commit 3173f73
Showing
34 changed files
with
124 additions
and
102 deletions.
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
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
packages/create-analog/template-angular-v15/src/main.providers.ts
This file was deleted.
Oops, something went wrong.
26 changes: 0 additions & 26 deletions
26
packages/create-analog/template-angular-v15/src/main.server.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,7 @@ yarn-error.log | |
|
||
# Miscellaneous | ||
/.angular/cache | ||
/.nx/cache | ||
.sass-cache/ | ||
/connect.lock | ||
/coverage | ||
|
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
File renamed without changes.
File renamed without changes.
51 changes: 51 additions & 0 deletions
51
packages/create-analog/template-angular-v17-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,51 @@ | ||
{ | ||
"name": "my-app", | ||
"version": "0.0.0", | ||
"private": true, | ||
"engines": { | ||
"node": ">=18.13.0" | ||
}, | ||
"scripts": { | ||
"dev": "ng serve", | ||
"ng": "ng", | ||
"start": "ng serve", | ||
"build": "ng build", | ||
"watch": "ng build --watch", | ||
"test": "ng test" | ||
}, | ||
"dependencies": { | ||
"@analogjs/content": "^0.2.0", | ||
"@analogjs/router": "^0.2.0", | ||
"@angular/animations": "^17.0.0-rc.0", | ||
"@angular/common": "^17.0.0-rc.0", | ||
"@angular/compiler": "^17.0.0-rc.0", | ||
"@angular/core": "^17.0.0-rc.0", | ||
"@angular/forms": "^17.0.0-rc.0", | ||
"@angular/platform-browser": "^17.0.0-rc.0", | ||
"@angular/platform-browser-dynamic": "^17.0.0-rc.0", | ||
"@angular/platform-server": "^17.0.0-rc.0", | ||
"@angular/router": "^17.0.0-rc.0", | ||
"@nx/angular": "^17.0.0", | ||
"front-matter": "^4.0.2", | ||
"marked": "^5.0.2", | ||
"marked-gfm-heading-id": "^3.1.0", | ||
"marked-highlight": "^2.0.1", | ||
"mermaid": "^10.2.4", | ||
"prismjs": "^1.29.0", | ||
"rxjs": "~7.5.6", | ||
"tslib": "^2.4.0", | ||
"zone.js": "~0.14.0" | ||
}, | ||
"devDependencies": { | ||
"@analogjs/platform": "^0.2.0", | ||
"@angular-devkit/build-angular": "^17.0.0-rc.0", | ||
"@angular/cli": "^17.0.0-rc.0", | ||
"@angular/compiler-cli": "^17.0.0-rc.0", | ||
"@nx/vite": "~16.8.1", | ||
"nx": "^17.0.0", | ||
"jsdom": "^22.1.0", | ||
"typescript": "~5.2.0", | ||
"vite": "^4.4.8", | ||
"vitest": "^0.32.0" | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...angular-v15/src/app/app.component.spec.ts → ...-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
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
packages/create-analog/template-angular-v17-prerelease/src/app/app.config.server.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,16 @@ | ||
import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; | ||
import { | ||
provideServerRendering, | ||
ɵSERVER_CONTEXT as SERVER_CONTEXT, | ||
} from '@angular/platform-server'; | ||
|
||
import { appConfig } from './app.config'; | ||
|
||
const serverConfig: ApplicationConfig = { | ||
providers: [ | ||
provideServerRendering(), | ||
{ provide: SERVER_CONTEXT, useValue: 'ssr-analog' }, | ||
], | ||
}; | ||
|
||
export const config = mergeApplicationConfig(appConfig, serverConfig); |
12 changes: 12 additions & 0 deletions
12
packages/create-analog/template-angular-v17-prerelease/src/app/app.config.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,12 @@ | ||
import { provideHttpClient, withFetch } from '@angular/common/http'; | ||
import { ApplicationConfig } from '@angular/core'; | ||
import { provideClientHydration } from '@angular/platform-browser'; | ||
import { provideFileRouter } from '@analogjs/router'; | ||
|
||
export const appConfig: ApplicationConfig = { | ||
providers: [ | ||
provideFileRouter(), | ||
provideHttpClient(withFetch()), | ||
provideClientHydration(), | ||
], | ||
}; |
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
24 changes: 24 additions & 0 deletions
24
packages/create-analog/template-angular-v17-prerelease/src/main.server.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,24 @@ | ||
import 'zone.js/node'; | ||
import { enableProdMode } from '@angular/core'; | ||
import { bootstrapApplication } from '@angular/platform-browser'; | ||
import { renderApplication } from '@angular/platform-server'; | ||
|
||
import { config } from './app/app.config.server'; | ||
import { AppComponent } from './app/app.component'; | ||
|
||
if (import.meta.env.PROD) { | ||
enableProdMode(); | ||
} | ||
|
||
export function bootstrap() { | ||
return bootstrapApplication(AppComponent, config); | ||
} | ||
|
||
export default async function render(url: string, document: string) { | ||
const html = await renderApplication(bootstrap, { | ||
document, | ||
url, | ||
}); | ||
|
||
return html; | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/create-analog/template-angular-v17-prerelease/src/main.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,7 @@ | ||
import 'zone.js'; | ||
import { bootstrapApplication } from '@angular/platform-browser'; | ||
|
||
import { AppComponent } from './app/app.component'; | ||
import { appConfig } from './app/app.config'; | ||
|
||
bootstrapApplication(AppComponent, appConfig); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.