-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from ndsev/angular-clean
Angular Transition
- Loading branch information
Showing
45 changed files
with
25,544 additions
and
685 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ ci/emsdk/ | |
.idea | ||
cmake-build-debug-wsl | ||
clion-build-* | ||
static/libs | ||
static | ||
.angular | ||
node_modules |
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 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 @@ | ||
0.4.0 |
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,145 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"erdblick": { | ||
"projectType": "application", | ||
"schematics": { | ||
"@schematics/angular:component": { | ||
"style": "scss" | ||
} | ||
}, | ||
"root": "", | ||
"sourceRoot": "erdblick_app", | ||
"prefix": "app", | ||
"architect": { | ||
"build": { | ||
"builder": "@angular-builders/custom-webpack:browser", | ||
"options": { | ||
"outputPath": "static", | ||
"index": "erdblick_app/index.html", | ||
"main": "erdblick_app/main.ts", | ||
"polyfills": [ | ||
"zone.js" | ||
], | ||
"tsConfig": "tsconfig.app.json", | ||
"assets": [ | ||
{ | ||
"glob": "**/*", | ||
"input": "node_modules/cesium/Build/Cesium/Workers", | ||
"output": "/bundle/cesium/Workers" | ||
}, | ||
{ | ||
"glob": "**/*", | ||
"input": "node_modules/cesium/Build/Cesium/ThirdParty", | ||
"output": "/bundle/cesium/ThirdParty" | ||
}, | ||
{ | ||
"glob": "**/*", | ||
"input": "node_modules/cesium/Build/Cesium/Assets", | ||
"output": "/bundle/cesium/Assets" | ||
}, | ||
{ | ||
"glob": "**/*", | ||
"input": "node_modules/cesium/Build/Cesium/Widgets", | ||
"output": "/bundle/cesium/Widgets" | ||
}, | ||
{ | ||
"glob": "**/*", | ||
"input": "styles", | ||
"output": "/bundle/styles" | ||
}, | ||
{ | ||
"glob": "**/*", | ||
"input": "images", | ||
"output": "/bundle/images" | ||
}, | ||
{ | ||
"glob": "VERSION", | ||
"input": ".", | ||
"output": "/bundle/" | ||
} | ||
], | ||
"styles": [ | ||
"node_modules/primeng/resources/themes/lara-light-blue/theme.css", | ||
"node_modules/primeng/resources/primeng.min.css", | ||
"node_modules/cesium/Build/Cesium/Widgets/widgets.css", | ||
"erdblick_app/styles.scss" | ||
], | ||
"scripts": [ | ||
|
||
], | ||
"customWebpackConfig": { | ||
"path": "./webpack.config.js" | ||
} | ||
}, | ||
"configurations": { | ||
"production": { | ||
"budgets": [ | ||
{ | ||
"type": "initial", | ||
"maximumWarning": "500kb", | ||
"maximumError": "60mb" | ||
}, | ||
{ | ||
"type": "anyComponentStyle", | ||
"maximumWarning": "2kb", | ||
"maximumError": "4kb" | ||
} | ||
], | ||
"outputHashing": "all" | ||
}, | ||
"development": { | ||
"buildOptimizer": false, | ||
"optimization": { | ||
"scripts": false, | ||
"styles": false, | ||
"fonts": false | ||
}, | ||
"vendorChunk": true, | ||
"extractLicenses": false, | ||
"sourceMap": true, | ||
"namedChunks": true | ||
} | ||
}, | ||
"defaultConfiguration": "development" | ||
}, | ||
"serve": { | ||
"builder": "@angular-builders/custom-webpack:dev-server", | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "erdblick:build:production" | ||
}, | ||
"development": { | ||
"browserTarget": "erdblick:build:development" | ||
} | ||
}, | ||
"defaultConfiguration": "development" | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-builders/custom-webpack:extract-i18n", | ||
"options": { | ||
"browserTarget": "erdblick:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-builders/custom-webpack:karma", | ||
"options": { | ||
"polyfills": [ | ||
"zone.js", | ||
"zone.js/testing" | ||
], | ||
"tsConfig": "tsconfig.spec.json", | ||
"assets": [ | ||
], | ||
"styles": [ | ||
"erdblick_app/styles.scss" | ||
], | ||
"scripts": [] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
SOURCE_LOC=$1 | ||
if [ -z $SOURCE_LOC ]; then | ||
echo "No source location supplied." | ||
exit 1 | ||
fi | ||
|
||
echo "Using source dir @ $SOURCE_LOC." | ||
cd "$SOURCE_LOC" || exit 1 | ||
|
||
echo "Collecting npm modules." | ||
npm install | ||
|
||
echo "Patching erblick-core TS definitions." | ||
if grep -q "export default libErdblickCore" "$SOURCE_LOC/build/libs/core/erdblick-core.d.ts"; then | ||
echo "! The TS definitions are already patched. !" | ||
else | ||
printf "\ndeclare var libErdblickCore: any; \nexport default libErdblickCore; \n" >> "$SOURCE_LOC/build/libs/core/erdblick-core.d.ts" | ||
fi | ||
|
||
echo "Building Angular distribution files." | ||
npm run build -- -c production | ||
|
||
exit 0 |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,10 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
|
||
const routes: Routes = []; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forRoot(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class AppRoutingModule { } |
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,35 @@ | ||
import { TestBed } from '@angular/core/testing'; | ||
import { RouterTestingModule } from '@angular/router/testing'; | ||
import { AppComponent } from './app.component'; | ||
|
||
describe('AppComponent', () => { | ||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [ | ||
RouterTestingModule | ||
], | ||
declarations: [ | ||
AppComponent | ||
], | ||
}).compileComponents(); | ||
}); | ||
|
||
it('should create the app', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app).toBeTruthy(); | ||
}); | ||
|
||
it(`should have as title 'erdblick'`, () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
const app = fixture.componentInstance; | ||
expect(app.title).toEqual('erdblick'); | ||
}); | ||
|
||
it('should render title', () => { | ||
const fixture = TestBed.createComponent(AppComponent); | ||
fixture.detectChanges(); | ||
const compiled = fixture.nativeElement as HTMLElement; | ||
expect(compiled.querySelector('.content span')?.textContent).toContain('erdblick app is running!'); | ||
}); | ||
}); |
Oops, something went wrong.