Skip to content

Commit aa2e400

Browse files
committed
Merge branch 'feature/upgrate-to-ionic5'
2 parents 227a75e + 8cc1ff1 commit aa2e400

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+12713
-10713
lines changed

.browserslistrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.

.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

.eslintrc.json

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

.gitignore

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,31 @@
33

44
*~
55
*.sw[mnpcod]
6-
*.log
6+
.tmp
77
*.tmp
88
*.tmp.*
9-
log.txt
109
*.sublime-project
1110
*.sublime-workspace
12-
.vscode/
13-
npm-debug.log*
14-
15-
.idea/
16-
.ionic/
17-
.sourcemaps/
18-
.sass-cache/
19-
.tmp/
20-
.versions/
21-
coverage/
22-
www/
23-
dist/
24-
node_modules
25-
tmp/
26-
temp/
27-
platforms/
28-
plugins/
29-
plugins/android.json
30-
plugins/ios.json
31-
$RECYCLE.BIN/
32-
3311
.DS_Store
3412
Thumbs.db
3513
UserInterfaceState.xcuserstate
14+
$RECYCLE.BIN/
15+
16+
*.log
17+
log.txt
18+
npm-debug.log*
19+
20+
/.idea
21+
/.ionic
22+
/.sass-cache
23+
/.sourcemaps
24+
/.versions
25+
/.vscode
26+
/coverage
27+
/dist
28+
/node_modules
29+
/platforms
30+
/plugins
31+
/www
32+
/ios
33+
/android

CONTRIBUTING.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
* The source code for the demo app [`/src`](src).
44
* You'll find the library's source in [`/projects/ionic-header-parallax/src`](projects/ionic-header-parallax/src).
5-
* Run:
6-
1. `$ npm run watch` to build the library in watch mode,
7-
2. then `$ npm run link:library` to install modules,
8-
3. and then run `$ npm start` to start the demo app.
5+
6+
## Run
7+
Do `npm start` to build and launch the app in watch mode,

angular.json

Lines changed: 27 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"build": {
1515
"builder": "@angular-devkit/build-angular:browser",
1616
"options": {
17-
"outputPath": "dist/demo",
17+
"outputPath": "www",
1818
"index": "src/index.html",
1919
"main": "src/main.ts",
2020
"polyfills": "src/polyfills.ts",
@@ -31,15 +31,15 @@
3131
"output": "./svg"
3232
}
3333
],
34-
"styles": [
35-
{
36-
"input": "src/theme/variables.scss"
37-
},
38-
{
39-
"input": "src/global.scss"
40-
}
41-
],
42-
"scripts": []
34+
"styles": ["src/theme/variables.scss", "src/global.scss"],
35+
"scripts": [],
36+
"aot": false,
37+
"vendorChunk": true,
38+
"extractLicenses": false,
39+
"buildOptimizer": false,
40+
"sourceMap": true,
41+
"optimization": false,
42+
"namedChunks": true
4343
},
4444
"configurations": {
4545
"production": {
@@ -52,7 +52,6 @@
5252
"optimization": true,
5353
"outputHashing": "all",
5454
"sourceMap": false,
55-
"extractCss": true,
5655
"namedChunks": false,
5756
"aot": true,
5857
"extractLicenses": true,
@@ -121,15 +120,11 @@
121120
}
122121
},
123122
"lint": {
124-
"builder": "@angular-devkit/build-angular:tslint",
123+
"builder": "@angular-eslint/builder:lint",
125124
"options": {
126-
"tsConfig": [
127-
"tsconfig.app.json",
128-
"tsconfig.spec.json",
129-
"e2e/tsconfig.json"
130-
],
131-
"exclude": [
132-
"**/node_modules/**"
125+
"lintFilePatterns": [
126+
"src/**/*.ts",
127+
"src/**/*.html"
133128
]
134129
}
135130
},
@@ -171,10 +166,6 @@
171166
"devServerTarget": "app:serve:production"
172167
}
173168
}
174-
},
175-
"deploy": {
176-
"builder": "angular-cli-ghpages:deploy",
177-
"options": {}
178169
}
179170
}
180171
},
@@ -185,11 +176,19 @@
185176
"prefix": "lib",
186177
"architect": {
187178
"build": {
188-
"builder": "@angular-devkit/build-ng-packagr:build",
179+
"builder": "@angular-devkit/build-angular:ng-packagr",
189180
"options": {
190-
"tsConfig": "projects/ionic-header-parallax/tsconfig.lib.json",
191181
"project": "projects/ionic-header-parallax/ng-package.json"
192-
}
182+
},
183+
"configurations": {
184+
"production": {
185+
"tsConfig": "projects/ionic-header-parallax/tsconfig.lib.prod.json"
186+
},
187+
"development": {
188+
"tsConfig": "projects/ionic-header-parallax/tsconfig.lib.json"
189+
}
190+
},
191+
"defaultConfiguration": "production"
193192
},
194193
"test": {
195194
"builder": "@angular-devkit/build-angular:karma",
@@ -198,23 +197,12 @@
198197
"tsConfig": "projects/ionic-header-parallax/tsconfig.spec.json",
199198
"karmaConfig": "projects/ionic-header-parallax/karma.conf.js"
200199
}
201-
},
202-
"lint": {
203-
"builder": "@angular-devkit/build-angular:tslint",
204-
"options": {
205-
"tsConfig": [
206-
"projects/ionic-header-parallax/tsconfig.lib.json",
207-
"projects/ionic-header-parallax/tsconfig.spec.json"
208-
],
209-
"exclude": [
210-
"**/node_modules/**"
211-
]
212-
}
213200
}
214201
}
215202
}
216203
},
217204
"cli": {
205+
"analytics": false,
218206
"defaultCollection": "@ionic/angular-toolkit"
219207
},
220208
"schematics": {
@@ -225,4 +213,4 @@
225213
"styleext": "scss"
226214
}
227215
}
228-
}
216+
}

browserslist

Lines changed: 0 additions & 12 deletions
This file was deleted.

capacitor.config.ts

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

e2e/protractor.conf.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1+
// @ts-check
12
// Protractor configuration file, see link for more information
23
// https://github.com/angular/protractor/blob/master/lib/config.ts
34

4-
const { SpecReporter } = require('jasmine-spec-reporter');
5+
const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter');
56

7+
/**
8+
* @type { import("protractor").Config }
9+
*/
610
exports.config = {
711
allScriptsTimeout: 11000,
812
specs: [
913
'./src/**/*.e2e-spec.ts'
1014
],
1115
capabilities: {
12-
'browserName': 'chrome'
16+
browserName: 'chrome'
1317
},
1418
directConnect: true,
19+
SELENIUM_PROMISE_MANAGER: false,
1520
baseUrl: 'http://localhost:4200/',
1621
framework: 'jasmine',
1722
jasmineNodeOpts: {
@@ -23,6 +28,10 @@ exports.config = {
2328
require('ts-node').register({
2429
project: require('path').join(__dirname, './tsconfig.json')
2530
});
26-
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
31+
jasmine.getEnv().addReporter(new SpecReporter({
32+
spec: {
33+
displayStacktrace: StacktraceOption.PRETTY
34+
}
35+
}));
2736
}
2837
};

e2e/src/app.e2e-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ describe('new App', () => {
99

1010
it('should be blank', () => {
1111
page.navigateTo();
12-
expect(page.getParagraphText()).toContain('The world is your oyster.');
12+
expect(page.getParagraphText()).toContain('Start with Ionic UI Components');
1313
});
1414
});

0 commit comments

Comments
 (0)