1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

stub out angular app with webpack 4

This commit is contained in:
Kyle Spearrin
2018-06-04 23:10:41 -04:00
parent 425029783b
commit bf796fe80c
16 changed files with 8486 additions and 7132 deletions

View File

@@ -0,0 +1,24 @@
import { NgModule } from '@angular/core';
import {
RouterModule,
Routes,
} from '@angular/router';
import { VaultComponent } from './vault/vault.component';
const routes: Routes = [
{ path: '', redirectTo: '/vault', pathMatch: 'full' },
{
path: 'vault',
component: VaultComponent,
},
];
@NgModule({
imports: [RouterModule.forRoot(routes, {
useHash: true,
/*enableTracing: true,*/
})],
exports: [RouterModule],
})
export class AppRoutingModule { }

21
src/app/app.component.ts Normal file
View File

@@ -0,0 +1,21 @@
import {
ToasterConfig,
ToasterContainerComponent,
} from 'angular2-toaster';
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
import {
Component,
} from '@angular/core';
import { Router } from '@angular/router';
@Component({
selector: 'app-root',
styles: [],
template: `
<router-outlet></router-outlet>`,
})
export class AppComponent {
constructor() {
}
}

32
src/app/app.module.ts Normal file
View File

@@ -0,0 +1,32 @@
import 'core-js';
import 'zone.js/dist/zone';
import { AppRoutingModule } from './app-routing.module';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { AppComponent } from './app.component';
import { VaultComponent } from './vault/vault.component';
@NgModule({
imports: [
BrowserModule,
BrowserAnimationsModule,
FormsModule,
AppRoutingModule,
],
declarations: [
AppComponent,
VaultComponent,
],
entryComponents: [
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule { }

11
src/app/main.ts Normal file
View File

@@ -0,0 +1,11 @@
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
// tslint:disable-next-line
require('../scss/styles.scss');
import { AppModule } from './app.module';
// enableProdMode(); // TODO: if production
platformBrowserDynamic().bootstrapModule(AppModule);

View File

@@ -0,0 +1 @@
<b>The vault!!</b>

View File

@@ -0,0 +1,11 @@
import {
Component,
} from '@angular/core';
@Component({
selector: 'app-vault',
templateUrl: 'vault.component.html',
})
export class VaultComponent {
}

3
src/global.d.ts vendored Normal file
View File

@@ -0,0 +1,3 @@
declare function escape(s: string): string;
declare function unescape(s: string): string;
declare var require: any;

View File

@@ -5,7 +5,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="theme-color" content="#3c8dbc">
<base href="/" />
<base href="" />
<title page-title>Bitwarden Web Vault</title>
@@ -17,7 +17,9 @@
</head>
<body>
<app-root>
Loading...
</app-root>
</body>
</html>

3
src/scss/styles.scss Normal file
View File

@@ -0,0 +1,3 @@
body {
background-color: gray;
}