Skip to content

Commit 71f38ef

Browse files
Revert "Updated Angular App To Angular 10"
1 parent d0e2036 commit 71f38ef

28 files changed

+9869
-10825
lines changed

.env

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ PREFIX=dist
99

1010
setup_release: create_release associate_commits upload_sourcemaps
1111

12-
1312
create_release:
1413
sentry-cli releases -o $(SENTRY_ORG) new -p $(SENTRY_PROJECT) $(VERSION)
1514

16-
1715
associate_commits:
18-
-sentry-cli releases -o $(SENTRY_ORG) -p $(SENTRY_PROJECT) set-commits --local $(VERSION)
16+
sentry-cli releases -o $(SENTRY_ORG) -p $(SENTRY_PROJECT) set-commits --auto $(VERSION)
1917

2018
upload_sourcemaps:
2119
sentry-cli releases -o $(SENTRY_ORG) -p $(SENTRY_PROJECT) files \
2220
$(VERSION) upload-sourcemaps --url-prefix "~/" --rewrite --validate $(PREFIX)
2321

24-
create_env:
25-
@echo "version=${VERSION}" > .env
22+
reference_release:
23+
sed -i -e "s/release: .*/\release: \"${VERSION}\"/g" src/app/app.module.ts

README.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@ https://docs.sentry.io/platforms/javascript/angular/
1414

1515
The following command is defined in [package.json](https://github.com/sentry-demos/angular/blob/master/package.json#L12-L13) and will build, create release, upload source maps and deploy:
1616

17-
`npm run deploy`
18-
19-
note: predeploy runs as part of deploy where create_env is used
20-
21-
note: a .env file must be made in order to store the relative variable value provided by the Sentry CLI
22-
23-
24-
25-
17+
`npm run deploy`
2618

2719
## GIF
2820
![Alt Text](angular-demo.gif)

angular.json

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

config-env.ts

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

e2e/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AngularPage } from './app.po';
2+
3+
describe('angular App', function() {
4+
let page: AngularPage;
5+
6+
beforeEach(() => {
7+
page = new AngularPage();
8+
});
9+
10+
it('should display message saying app works', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('app works!');
13+
});
14+
});

e2e/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, element, by } from 'protractor';
2+
3+
export class AngularPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/src/app.po.ts

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

e2e/tsconfig.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
/* To learn more about this file see: https://angular.io/config/tsconfig. */
21
{
3-
"extends": "../tsconfig.base.json",
2+
"compileOnSave": false,
43
"compilerOptions": {
5-
"outDir": "../out-tsc/e2e",
4+
"declaration": false,
5+
"emitDecoratorMetadata": true,
6+
"experimentalDecorators": true,
67
"module": "commonjs",
7-
"target": "es2018",
8-
"types": [
9-
"jasmine",
10-
"jasminewd2",
11-
"node"
8+
"moduleResolution": "node",
9+
"outDir": "../dist/out-tsc-e2e",
10+
"sourceMap": true,
11+
"target": "es5",
12+
"typeRoots": [
13+
"../node_modules/@types"
1214
]
1315
}
1416
}

karma.conf.js

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,43 @@
11
// Karma configuration file, see link for more information
2-
// https://karma-runner.github.io/1.0/config/configuration-file.html
2+
// https://karma-runner.github.io/0.13/config/configuration-file.html
33

44
module.exports = function (config) {
55
config.set({
66
basePath: '',
7-
frameworks: ['jasmine', '@angular-devkit/build-angular'],
7+
frameworks: ['jasmine', 'angular-cli'],
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
11-
require('karma-jasmine-html-reporter'),
12-
require('karma-coverage-istanbul-reporter'),
13-
require('@angular-devkit/build-angular/plugins/karma')
11+
require('karma-remap-istanbul'),
12+
require('angular-cli/plugins/karma')
1413
],
15-
client: {
16-
clearContext: false // leave Jasmine Spec Runner output visible in browser
14+
files: [
15+
{ pattern: './src/test.ts', watched: false }
16+
],
17+
preprocessors: {
18+
'./src/test.ts': ['angular-cli']
19+
},
20+
mime: {
21+
'text/x-typescript': ['ts','tsx']
22+
},
23+
remapIstanbulReporter: {
24+
reports: {
25+
html: 'coverage',
26+
lcovonly: './coverage/coverage.lcov'
27+
}
1728
},
18-
coverageIstanbulReporter: {
19-
dir: require('path').join(__dirname, './coverage/angular-project'),
20-
reports: ['html', 'lcovonly', 'text-summary'],
21-
fixWebpackSourcePaths: true
29+
angularCli: {
30+
config: './angular-cli.json',
31+
environment: 'dev'
2232
},
23-
reporters: ['progress', 'kjhtml'],
33+
reporters: config.angularCli && config.angularCli.codeCoverage
34+
? ['progress', 'karma-remap-istanbul']
35+
: ['progress'],
2436
port: 9876,
2537
colors: true,
2638
logLevel: config.LOG_INFO,
2739
autoWatch: true,
2840
browsers: ['Chrome'],
29-
singleRun: false,
30-
restartOnFileChange: true
41+
singleRun: false
3142
});
3243
};

0 commit comments

Comments
 (0)