Skip to content

Commit 37d9931

Browse files
committed
Add analog starter
1 parent a481384 commit 37d9931

30 files changed

+30582
-0
lines changed

analog/starter/.editorconfig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false

analog/starter/.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
/.nx/cache
34+
/.nx/workspace-data
35+
.sass-cache/
36+
/connect.lock
37+
/coverage
38+
/libpeerconnection.log
39+
testem.log
40+
/typings
41+
42+
# System files
43+
.DS_Store
44+
Thumbs.db
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template", "analogjs.vscode-analog"]
4+
}

analog/starter/.vscode/launch.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:5173/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test"
17+
}
18+
]
19+
}

analog/starter/.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

analog/starter/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# starter
2+
3+
This project was generated with [Analog](https://analogjs.org), the fullstack meta-framework for Angular.
4+
5+
## Setup
6+
7+
Run `npm install` to install the application dependencies.
8+
9+
## Development
10+
11+
Run `npm start` for a dev server. Navigate to `http://localhost:5173/`. The application automatically reloads if you change any of the source files.
12+
13+
## Build
14+
15+
Run `npm run build` to build the client/server project. The client build artifacts are located in the `dist/analog/public` directory. The server for the API build artifacts are located in the `dist/analog/server` directory.
16+
17+
## Test
18+
19+
Run `npm run test` to run unit tests with [Vitest](https://vitest.dev).
20+
21+
## Community
22+
23+
- Visit and Star the [GitHub Repo](https://github.com/analogjs/analog)
24+
- Join the [Discord](https://chat.analogjs.org)
25+
- Follow us on [Twitter](https://twitter.com/analogjs)
26+
- Become a [Sponsor](https://github.com/sponsors/brandonroberts)

analog/starter/angular.json

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"my-app": {
7+
"projectType": "application",
8+
"root": ".",
9+
"sourceRoot": "src",
10+
"prefix": "app",
11+
"architect": {
12+
"build": {
13+
"builder": "@analogjs/platform:vite",
14+
"options": {
15+
"configFile": "vite.config.ts",
16+
"main": "src/main.ts",
17+
"outputPath": "dist/client",
18+
"tsConfig": "tsconfig.app.json"
19+
},
20+
"defaultConfiguration": "production",
21+
"configurations": {
22+
"development": {
23+
"mode": "development"
24+
},
25+
"production": {
26+
"sourcemap": false,
27+
"mode": "production"
28+
}
29+
}
30+
},
31+
"serve": {
32+
"builder": "@analogjs/platform:vite-dev-server",
33+
"defaultConfiguration": "development",
34+
"options": {
35+
"buildTarget": "my-app:build",
36+
"port": 5173
37+
},
38+
"configurations": {
39+
"development": {
40+
"buildTarget": "my-app:build:development",
41+
"hmr": true
42+
},
43+
"production": {
44+
"buildTarget": "my-app:build:production"
45+
}
46+
}
47+
},
48+
"test": {
49+
"builder": "@analogjs/vitest-angular:test"
50+
}
51+
}
52+
}
53+
},
54+
"cli": {
55+
"analytics": false
56+
}
57+
}

analog/starter/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>starter</title>
6+
<base href="/" />
7+
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
9+
<link rel="stylesheet" href="/src/styles.css" />
10+
</head>
11+
<body>
12+
<app-root></app-root>
13+
<script type="module" src="/src/main.ts"></script>
14+
</body>
15+
</html>

0 commit comments

Comments
 (0)