Skip to content

Commit 5c8ed1a

Browse files
committed
Add angular ionic
1 parent fb444e5 commit 5c8ed1a

35 files changed

+19897
-0
lines changed

angular-ionic/.browserslistrc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.dev/reference/versions#browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
Chrome >=107
12+
Firefox >=106
13+
Edge >=107
14+
Safari >=16.1
15+
iOS >=16.1

angular-ionic/.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

angular-ionic/.eslintrc.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["projects/**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts"],
7+
"parserOptions": {
8+
"project": ["tsconfig.json"],
9+
"createDefaultProgram": true
10+
},
11+
"extends": [
12+
"plugin:@angular-eslint/recommended",
13+
"plugin:@angular-eslint/template/process-inline-templates"
14+
],
15+
"rules": {
16+
"@angular-eslint/component-class-suffix": [
17+
"error",
18+
{
19+
"suffixes": ["Page", "Component"]
20+
}
21+
],
22+
"@angular-eslint/component-selector": [
23+
"error",
24+
{
25+
"type": "element",
26+
"prefix": "app",
27+
"style": "kebab-case"
28+
}
29+
],
30+
"@angular-eslint/directive-selector": [
31+
"error",
32+
{
33+
"type": "attribute",
34+
"prefix": "app",
35+
"style": "camelCase"
36+
}
37+
]
38+
}
39+
},
40+
{
41+
"files": ["*.html"],
42+
"extends": ["plugin:@angular-eslint/template/recommended"],
43+
"rules": {}
44+
}
45+
]
46+
}

angular-ionic/.gitignore

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Specifies intentionally untracked files to ignore when using Git
2+
# http://git-scm.com/docs/gitignore
3+
4+
*~
5+
*.sw[mnpcod]
6+
.tmp
7+
*.tmp
8+
*.tmp.*
9+
UserInterfaceState.xcuserstate
10+
$RECYCLE.BIN/
11+
12+
*.log
13+
log.txt
14+
15+
16+
/.sourcemaps
17+
/.versions
18+
/coverage
19+
20+
# Ionic
21+
/.ionic
22+
/www
23+
/platforms
24+
/plugins
25+
26+
# Compiled output
27+
/dist
28+
/tmp
29+
/out-tsc
30+
/bazel-out
31+
32+
# Node
33+
/node_modules
34+
npm-debug.log
35+
yarn-error.log
36+
37+
# IDEs and editors
38+
.idea/
39+
.project
40+
.classpath
41+
.c9/
42+
*.launch
43+
.settings/
44+
*.sublime-project
45+
*.sublime-workspace
46+
47+
# Visual Studio Code
48+
.vscode/*
49+
!.vscode/settings.json
50+
!.vscode/tasks.json
51+
!.vscode/launch.json
52+
!.vscode/extensions.json
53+
.history/*
54+
55+
56+
# Miscellaneous
57+
/.angular
58+
/.angular/cache
59+
.sass-cache/
60+
/.nx
61+
/.nx/cache
62+
/connect.lock
63+
/coverage
64+
/libpeerconnection.log
65+
testem.log
66+
/typings
67+
68+
# System files
69+
.DS_Store
70+
Thumbs.db

angular-ionic/angular.json

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
{
2+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
4+
"newProjectRoot": "projects",
5+
"projects": {
6+
"app": {
7+
"projectType": "application",
8+
"schematics": {
9+
"@ionic/angular-toolkit:page": {
10+
"styleext": "scss",
11+
"standalone": true
12+
}
13+
},
14+
"root": "",
15+
"sourceRoot": "src",
16+
"prefix": "app",
17+
"architect": {
18+
"build": {
19+
"builder": "@angular-devkit/build-angular:application",
20+
"options": {
21+
"outputPath": {
22+
"base": "www",
23+
"browser": ""
24+
},
25+
"index": "src/index.html",
26+
"polyfills": [
27+
"src/polyfills.ts"
28+
],
29+
"tsConfig": "tsconfig.app.json",
30+
"inlineStyleLanguage": "scss",
31+
"assets": [
32+
{
33+
"glob": "**/*",
34+
"input": "src/assets",
35+
"output": "assets"
36+
}
37+
],
38+
"styles": ["src/global.scss", "src/theme/variables.scss"],
39+
"scripts": [],
40+
"browser": "src/main.ts"
41+
},
42+
"configurations": {
43+
"production": {
44+
"budgets": [
45+
{
46+
"type": "initial",
47+
"maximumWarning": "2mb",
48+
"maximumError": "5mb"
49+
},
50+
{
51+
"type": "anyComponentStyle",
52+
"maximumWarning": "2kb",
53+
"maximumError": "4kb"
54+
}
55+
],
56+
"fileReplacements": [
57+
{
58+
"replace": "src/environments/environment.ts",
59+
"with": "src/environments/environment.prod.ts"
60+
}
61+
],
62+
"outputHashing": "all"
63+
},
64+
"development": {
65+
"optimization": false,
66+
"extractLicenses": false,
67+
"sourceMap": true,
68+
"namedChunks": true
69+
},
70+
"ci": {
71+
"progress": false
72+
}
73+
},
74+
"defaultConfiguration": "production"
75+
},
76+
"serve": {
77+
"builder": "@angular-devkit/build-angular:dev-server",
78+
"configurations": {
79+
"production": {
80+
"buildTarget": "app:build:production"
81+
},
82+
"development": {
83+
"buildTarget": "app:build:development"
84+
},
85+
"ci": {
86+
"progress": false
87+
}
88+
},
89+
"defaultConfiguration": "development"
90+
},
91+
"extract-i18n": {
92+
"builder": "@angular-devkit/build-angular:extract-i18n",
93+
"options": {
94+
"buildTarget": "app:build"
95+
}
96+
},
97+
"test": {
98+
"builder": "@angular-devkit/build-angular:karma",
99+
"options": {
100+
"main": "src/test.ts",
101+
"polyfills": "src/polyfills.ts",
102+
"tsConfig": "tsconfig.spec.json",
103+
"karmaConfig": "karma.conf.js",
104+
"inlineStyleLanguage": "scss",
105+
"assets": [
106+
{
107+
"glob": "**/*",
108+
"input": "src/assets",
109+
"output": "assets"
110+
}
111+
],
112+
"styles": ["src/global.scss", "src/theme/variables.scss"],
113+
"scripts": []
114+
},
115+
"configurations": {
116+
"ci": {
117+
"progress": false,
118+
"watch": false
119+
}
120+
}
121+
},
122+
"lint": {
123+
"builder": "@angular-eslint/builder:lint",
124+
"options": {
125+
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
126+
}
127+
}
128+
}
129+
}
130+
},
131+
"cli": {
132+
"schematicCollections": ["@ionic/angular-toolkit"]
133+
},
134+
"schematics": {
135+
"@ionic/angular-toolkit:component": {
136+
"styleext": "scss"
137+
},
138+
"@ionic/angular-toolkit:page": {
139+
"styleext": "scss"
140+
},
141+
"@angular-eslint/schematics:application": {
142+
"setParserOptionsProject": true
143+
},
144+
"@angular-eslint/schematics:library": {
145+
"setParserOptionsProject": true
146+
}
147+
}
148+
}

angular-ionic/capacitor.config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import type { CapacitorConfig } from '@capacitor/cli';
2+
3+
const config: CapacitorConfig = {
4+
appId: 'io.ionic.starter',
5+
appName: 'angular-ionic',
6+
webDir: 'www'
7+
};
8+
9+
export default config;

angular-ionic/ionic.config.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "angular-ionic",
3+
"integrations": {
4+
"capacitor": {}
5+
},
6+
"type": "angular-standalone"
7+
}

angular-ionic/karma.conf.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client: {
16+
jasmine: {
17+
// you can add configuration options for Jasmine here
18+
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
19+
// for example, you can disable the random execution with `random: false`
20+
// or set a specific seed with `seed: 4321`
21+
},
22+
clearContext: false // leave Jasmine Spec Runner output visible in browser
23+
},
24+
jasmineHtmlReporter: {
25+
suppressAll: true // removes the duplicated traces
26+
},
27+
coverageReporter: {
28+
dir: require('path').join(__dirname, './coverage/app'),
29+
subdir: '.',
30+
reporters: [
31+
{ type: 'html' },
32+
{ type: 'text-summary' }
33+
]
34+
},
35+
reporters: ['progress', 'kjhtml'],
36+
port: 9876,
37+
colors: true,
38+
logLevel: config.LOG_INFO,
39+
autoWatch: true,
40+
browsers: ['Chrome'],
41+
singleRun: false,
42+
restartOnFileChange: true
43+
});
44+
};

0 commit comments

Comments
 (0)