diff --git a/.angular-cli.json b/.angular-cli.json deleted file mode 100644 index f395bd878f2581591ba9fc398f26d532d10f4d9f..0000000000000000000000000000000000000000 --- a/.angular-cli.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "ja-lhyd" - }, - "apps": [ - { - "root": "src", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", - "prefix": "app", - "styles": [ - "styles.css" - ], - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "src/tsconfig.app.json" - }, - { - "project": "src/tsconfig.spec.json" - }, - { - "project": "e2e/tsconfig.e2e.json" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, - "defaults": { - "styleExt": "css", - "component": {} - } -} diff --git a/README.md b/README.md index 0505c17b60f17750fb9e4a8a35bc902f2ed9213c..42876c12b1070965fb143a018e0ce768df522b61 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,37 @@ -# JaLHyd +# JaLHyd : Javascript Library For Hydraulics -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.3. +## All the things to know for developping the library -## Development server +The library needs nodeJS installed and the following node packages installed globally: typescript, karma, tslint. This can be done by the command line: -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. +`npm install -g typescript karma tslint` -## Code scaffolding +Then, you can install the necessary packages of the library: +`npm install` -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`. -## Build +### For compiling the typescript code -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. +`npm build` -## Running unit tests -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). +### For compiling and testing the code with karma -## Running end-to-end tests +`npm test` -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). -Before running the tests make sure you are serving the app via `ng serve`. -## Further help +### For flagging suspicious language usage -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +`npm lint` + + +### UML visualisation + +The tsviz package can be used for drawing class diagram of the current code. + +For installing tsviz: `npm install -g tsviz` + +There's currently a bug on debian like distribution due to a wrong declaration of graphviz path in the code: https://github.com/joaompneves/tsviz/issues/5 +To work around, you can create a link to the good path: `sudo ln -s /usr/bin/dot /usr/local/bin/dot` + +For drawing the diagram: `npm viz` diff --git a/e2e/app.e2e-spec.ts b/e2e/app.e2e-spec.ts deleted file mode 100644 index 0435d1cb28d391259fff4aa5a07fb0f92be68347..0000000000000000000000000000000000000000 --- a/e2e/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { JaLHydPage } from './app.po'; - -describe('ja-lhyd App', () => { - let page: JaLHydPage; - - beforeEach(() => { - page = new JaLHydPage(); - }); - - it('should display message saying app works', () => { - page.navigateTo(); - expect(page.getParagraphText()).toEqual('app works!'); - }); -}); diff --git a/e2e/app.po.ts b/e2e/app.po.ts deleted file mode 100644 index 88fc2dfcb488d69c981fce84b42d1a3a3f4573da..0000000000000000000000000000000000000000 --- a/e2e/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class JaLHydPage { - navigateTo() { - return browser.get('/'); - } - - getParagraphText() { - return element(by.css('app-root h1')).getText(); - } -} diff --git a/e2e/tsconfig.e2e.json b/e2e/tsconfig.e2e.json deleted file mode 100644 index e2a9a2fc77952660ef72533128f890513e6ce694..0000000000000000000000000000000000000000 --- a/e2e/tsconfig.e2e.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/e2e", - "module": "commonjs", - "target": "es5", - "types": [ - "jasmine", - "node" - ] - } -} diff --git a/jalhyd_class_diagram.png b/jalhyd_class_diagram.png new file mode 100644 index 0000000000000000000000000000000000000000..5fe2266aaecfcdaaf8fcc17b5d45e0316643235b Binary files /dev/null and b/jalhyd_class_diagram.png differ diff --git a/karma.conf.js b/karma.conf.js index 84b4cd5acab29968044fc5748fa53dd97d21229d..0cd2a217a253f50dc94d4fcf5b58779c53651af8 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,44 +1,77 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/0.13/config/configuration-file.html +// Karma configuration +// Generated on Sun May 14 2017 18:49:28 GMT+0200 (CEST) module.exports = function (config) { config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) basePath: '', - frameworks: ['jasmine', '@angular/cli'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular/cli/plugins/karma') - ], - client:{ - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, + + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['jasmine', 'karma-typescript'], + + + // list of files / patterns to load in the browser files: [ - { pattern: './src/test.ts', watched: false } + { pattern: 'dist/out-tsc/**/*.spec.js', included: false } ], + + + // list of files to exclude + exclude: [ + ], + + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { - './src/test.ts': ['@angular/cli'] + 'src/**/*.spec.ts': ['karma-typescript'] }, - mime: { - 'text/x-typescript': ['ts','tsx'] - }, - coverageIstanbulReporter: { - reports: [ 'html', 'lcovonly' ], - fixWebpackSourcePaths: true - }, - angularCli: { - environment: 'dev' + + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: ['progress', 'karma-typescript'], + + // https://github.com/monounity/karma-typescript/blob/master/cookbook.md#user-content-importing-es2015-aka-es6-modules + karmaTypescriptConfig: { + bundlerOptions: { + transforms: [require("karma-typescript-es6-transform")()] + } }, - reporters: config.angularCli && config.angularCli.codeCoverage - ? ['progress', 'coverage-istanbul'] - : ['progress', 'kjhtml'], + + + // web server port port: 9876, + + + // enable / disable colors in the output (reporters and logs) colors: true, + + + // level of logging + // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG logLevel: config.LOG_INFO, + + + // enable / disable watching file and executing tests whenever any file changes autoWatch: true, + + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher browsers: ['Chrome'], - singleRun: false - }); -}; + + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultaneous + concurrency: Infinity + }) +} diff --git a/package.json b/package.json index 0ff00c32e6cfb289ba48e5b647f24885ac7a2dfe..c1f0a0b9481d803e268019291ff3364849159442 100644 --- a/package.json +++ b/package.json @@ -1,44 +1,27 @@ { - "name": "ja-lhyd", - "version": "0.0.0", + "name": "jalhyd", + "version": "0.0.1", "license": "MIT", "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" + "build": "tsc --p src/tsconfig.app.json", + "test": "./node_modules/karma/bin/karma start", + "lint": "./node_modules/tslint/bin/tslint", + "viz": "tsviz -recursive src/ jalhyd_class_diagram.png" }, "private": true, - "dependencies": { - "@angular/common": "^4.0.0", - "@angular/compiler": "^4.0.0", - "@angular/core": "^4.0.0", - "@angular/forms": "^4.0.0", - "@angular/http": "^4.0.0", - "@angular/platform-browser": "^4.0.0", - "@angular/platform-browser-dynamic": "^4.0.0", - "@angular/router": "^4.0.0", - "core-js": "^2.4.1", - "rxjs": "^5.1.0", - "zone.js": "^0.8.4" - }, + "dependencies": {}, "devDependencies": { - "@angular/cli": "1.0.3", - "@angular/compiler-cli": "^4.0.0", "@types/jasmine": "2.5.38", "@types/node": "~6.0.60", - "codelyzer": "~2.0.0", "jasmine-core": "~2.5.2", "jasmine-spec-reporter": "~3.2.0", "karma": "~1.4.1", "karma-chrome-launcher": "~2.1.1", - "karma-cli": "~1.0.1", + "karma-coverage-istanbul-reporter": "^0.2.0", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", - "karma-coverage-istanbul-reporter": "^0.2.0", - "protractor": "~5.1.0", + "karma-typescript": "^3.0.1", + "karma-typescript-es6-transform": "^1.0.0", "ts-node": "~2.0.0", "tslint": "~4.5.0", "typescript": "~2.2.0" diff --git a/protractor.conf.js b/protractor.conf.js deleted file mode 100644 index 1c5e1e5a44ea4887043440f2c6cae3e7f797cb6d..0000000000000000000000000000000000000000 --- a/protractor.conf.js +++ /dev/null @@ -1,30 +0,0 @@ -// Protractor configuration file, see link for more information -// https://github.com/angular/protractor/blob/master/lib/config.ts - -const { SpecReporter } = require('jasmine-spec-reporter'); - -exports.config = { - allScriptsTimeout: 11000, - specs: [ - './e2e/**/*.e2e-spec.ts' - ], - capabilities: { - 'browserName': 'chrome' - }, - directConnect: true, - baseUrl: 'http://localhost:4200/', - framework: 'jasmine', - jasmineNodeOpts: { - showColors: true, - defaultTimeoutInterval: 30000, - print: function() {} - }, - beforeLaunch: function() { - require('ts-node').register({ - project: 'e2e/tsconfig.e2e.json' - }); - }, - onPrepare() { - jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); - } -}; diff --git a/src/app/app.component.css b/src/app/app.component.css deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/app/app.component.html b/src/app/app.component.html deleted file mode 100644 index b6931b538a2c5989bfedffeef51a11abadd6df58..0000000000000000000000000000000000000000 --- a/src/app/app.component.html +++ /dev/null @@ -1,3 +0,0 @@ -<h1> - {{title}} -</h1> diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts deleted file mode 100644 index c740bcd745ed906aff93b9a3d3bdda3a2a2272b5..0000000000000000000000000000000000000000 --- a/src/app/app.component.spec.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { TestBed, async } from '@angular/core/testing'; - -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - })); - - it('should create the app', async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app).toBeTruthy(); - })); - - it(`should have as title 'app works!'`, async(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.debugElement.componentInstance; - expect(app.title).toEqual('app works!'); - })); - - it('should render title in a h1 tag', async(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('app works!'); - })); -}); diff --git a/src/app/app.component.ts b/src/app/app.component.ts deleted file mode 100644 index ff63e050488720c0766df3a354191d53d1af2ca5..0000000000000000000000000000000000000000 --- a/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'app works!'; -} diff --git a/src/app/app.module.ts b/src/app/app.module.ts deleted file mode 100644 index 67ae49119baa632d3c92a74364eddb6a32cbdd8e..0000000000000000000000000000000000000000 --- a/src/app/app.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { HttpModule } from '@angular/http'; - -import { AppComponent } from './app.component'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - FormsModule, - HttpModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/src/assets/.gitkeep b/src/assets/.gitkeep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/base.spec.ts b/src/base.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..10316147254cceeb012ae5bd7b662c23eacbe3fb --- /dev/null +++ b/src/base.spec.ts @@ -0,0 +1,24 @@ +import { Nub, Result } from "base"; + +class NubTest extends Nub { + Equation(): Result { + let res: Result = new Result(); + res.varCalc = this.v["A"] + this.v["B"]; + return res; + } +} +let nub = new NubTest({ "A": 1, "B": 2, "C": null }); +let res = new Result; + +describe('Class Nub: ', () => { + beforeEach(() => { + nub.sVarsEq = ["C"]; + res.varCalc = 3; + }); + describe('Calc(): ', () => { + it('should return a result', () => { + expect(nub.Calc("C")).toBe(res); + }); + }); +}); + diff --git a/src/base.ts b/src/base.ts new file mode 100644 index 0000000000000000000000000000000000000000..584799be05a883708bd49ae6f7c8c69cd4acb12e --- /dev/null +++ b/src/base.ts @@ -0,0 +1,93 @@ + + +/** + * Résultat de calcul comprenant la valeur du résultat et des calculs annexes (flag, calculs intermédiaires...) + */ +export class Result { + public varCalc: number; + public extraVar: {}; /** @todo Comment définit-on un objet dont on ne connait pas le nom des clés mais dont on connait le type ? */ +} + +/** + * Série de valeurs à calculer définie par le nom de la variable à sérier et le vecteur de valeur + */ +export class Serie { + public name: string; + public values: number[]; + + constructor(name: string, values: number[]) { + this.name = name; + this.values = values; + } +} + + +export interface IParametres { + [key: string]: number; +} + + + +/** + * Classe abstraite de Noeud de calcul : classe de base pour tous les calculs + */ +export abstract class Nub { + /// Nom des variables calculées par la méthode Equation + private _varsEq: string[]; + + public v: IParametres; + + constructor(parametres: IParametres) { + this.v = parametres; + } + + + /** + * Formule utilisée pour le calcul analytique (solution directe ou méthode de résolution spécifique) + */ + abstract Equation(sVarCalc: string): Result; + + + /** + * Calcul d'une équation quelque soit l'inconnue à calculer + */ + Calc(sVarCalc: string): Result { + for(let sVarEq of this._varsEq) { + if(sVarCalc == sVarEq) { + return this.Equation(sVarCalc); + } + } + return this.Solve(sVarCalc); + } + + + CalcSerie(svarCalc: string, serie: Serie): Result[] { + /** @todo faire une boucle pour appeler this.Calc avec chaque valeur de serie.values + * + */ + let results = [new (Result)]; + return results; + } + + get sVarsEq(): string[] { + return this._varsEq; + } + + set sVarsEq(sVarsEq: string[]) { + this._varsEq = sVarsEq; + } + + AddVarEq(sVarEq: string) { + this._varsEq.push(sVarEq); + } + + + /** + * Résoud l'équation par une méthode numérique + */ + Solve(sVarCalc: string): Result { + let res: Result; + /** @todo Résolution par méthode numérique (dichotomie...) */ + return res; + } +} diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts deleted file mode 100644 index 3612073bc31cd4c1f5d6cbb00318521e9a61bd8a..0000000000000000000000000000000000000000 --- a/src/environments/environment.prod.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const environment = { - production: true -}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts deleted file mode 100644 index b7f639aecac5c903f5449c7d14846f92b0a9b342..0000000000000000000000000000000000000000 --- a/src/environments/environment.ts +++ /dev/null @@ -1,8 +0,0 @@ -// The file contents for the current environment will overwrite these during build. -// The build system defaults to the dev environment which uses `environment.ts`, but if you do -// `ng build --env=prod` then `environment.prod.ts` will be used instead. -// The list of which env maps to which file can be found in `.angular-cli.json`. - -export const environment = { - production: false -}; diff --git a/src/favicon.ico b/src/favicon.ico deleted file mode 100644 index 8081c7ceaf2be08bf59010158c586170d9d2d517..0000000000000000000000000000000000000000 Binary files a/src/favicon.ico and /dev/null differ diff --git a/src/index.html b/src/index.html deleted file mode 100644 index 12cbbb4aa1568adf7f565df0a7b8a25285e0f12d..0000000000000000000000000000000000000000 --- a/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ -<!doctype html> -<html> -<head> - <meta charset="utf-8"> - <title>JaLHyd</title> - <base href="/"> - - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="icon" type="image/x-icon" href="favicon.ico"> -</head> -<body> - <app-root>Loading...</app-root> -</body> -</html> diff --git a/src/lechaptcalmon.ts b/src/lechaptcalmon.ts new file mode 100644 index 0000000000000000000000000000000000000000..8827a3dd02c70f7b8f3c67f0f800b7fd8d56fd02 --- /dev/null +++ b/src/lechaptcalmon.ts @@ -0,0 +1,53 @@ +import { Nub, Result, IParametres } from "base"; + + +interface IParamLechaptCalmon extends IParametres { + /** Débit */ + Q: number; + /** Diamètre */ + D: number; + /** Perte de charge */ + J: number; + /** Longueur de la conduite */ + Lg: number; + /** Paramètre de rugosité L */ + L: number; + /** Paramètre de rugosité M */ + M: number; + /** Paramètre de rugosité N */ + N: number; +} + + +class LechaptCalmon extends Nub { + + + constructor(parametres: IParamLechaptCalmon) { + super(parametres); + this.AddVarEq("Q"); + this.AddVarEq("D"); + this.AddVarEq("J"); + this.AddVarEq("Lg"); + + } + + Equation(sVarCalc: string): Result { + let res: Result; + + switch (sVarCalc) { + case "Q": + res.varCalc = Math.pow((((this.v.J * Math.pow(this.v.D, this.v.N)) / this.v.L) * (1000 / this.v.Lg)), 1 / this.v.M); + break; + case "D": + res.varCalc = Math.pow((((this.v.L * Math.pow(this.v.Q, this.v.M)) / this.v.J) * (this.v.Lg / 1000)), 1 / this.v.N); + break; + case "J": + res.varCalc = ((this.v.L * Math.pow(this.v.Q, this.v.M)) / Math.pow(this.v.D, this.v.N)) * (this.v.Lg / 1000); + break; + case "Lg": + res.varCalc = ((this.v.J * Math.pow(this.v.D, this.v.N)) / (this.v.L * Math.pow(this.v.Q, this.v.M))) * 1000; + } + + return res; + } +} \ No newline at end of file diff --git a/src/main.ts b/src/main.ts deleted file mode 100644 index a9ca1caf8ceebeb432bbf02b6a2b18378653fbd0..0000000000000000000000000000000000000000 --- a/src/main.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; - -if (environment.production) { - enableProdMode(); -} - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/src/polyfills.ts b/src/polyfills.ts deleted file mode 100644 index bc94e7a6d48c3d1944ca11eee55155f0db91535b..0000000000000000000000000000000000000000 --- a/src/polyfills.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * This file includes polyfills needed by Angular and is loaded before the app. - * You can add your own extra polyfills to this file. - * - * This file is divided into 2 sections: - * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. - * 2. Application imports. Files imported after ZoneJS that should be loaded before your main - * file. - * - * The current setup is for so-called "evergreen" browsers; the last versions of browsers that - * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), - * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. - * - * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html - */ - -/*************************************************************************************************** - * BROWSER POLYFILLS - */ - -/** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/set'; - -/** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. - -/** IE10 and IE11 requires the following to support `@angular/animation`. */ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - -/** Evergreen browsers require these. **/ -import 'core-js/es6/reflect'; -import 'core-js/es7/reflect'; - - -/** ALL Firefox browsers require the following to support `@angular/animation`. **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - - -/*************************************************************************************************** - * Zone JS is required by Angular itself. - */ -import 'zone.js/dist/zone'; // Included with Angular CLI. - - - -/*************************************************************************************************** - * APPLICATION IMPORTS - */ - -/** - * Date, currency, decimal and percent pipes. - * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 - */ -// import 'intl'; // Run `npm install --save intl`. -/** - * Need to import at least one locale-data with intl. - */ -// import 'intl/locale-data/jsonp/en'; diff --git a/src/styles.css b/src/styles.css deleted file mode 100644 index 90d4ee0072ce3fc41812f8af910219f9eea3c3de..0000000000000000000000000000000000000000 --- a/src/styles.css +++ /dev/null @@ -1 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ diff --git a/src/test.ts b/src/test.ts deleted file mode 100644 index 9bf72267e9b1ada4f46ff6a7729ef5f272f7c947..0000000000000000000000000000000000000000 --- a/src/test.ts +++ /dev/null @@ -1,32 +0,0 @@ -// This file is required by karma.conf.js and loads recursively all the .spec and framework files - -import 'zone.js/dist/long-stack-trace-zone'; -import 'zone.js/dist/proxy.js'; -import 'zone.js/dist/sync-test'; -import 'zone.js/dist/jasmine-patch'; -import 'zone.js/dist/async-test'; -import 'zone.js/dist/fake-async-test'; -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any. -declare var __karma__: any; -declare var require: any; - -// Prevent Karma from running prematurely. -__karma__.loaded = function () {}; - -// First, initialize the Angular testing environment. -getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() -); -// Then we find all the tests. -const context = require.context('./', true, /\.spec\.ts$/); -// And load the modules. -context.keys().map(context); -// Finally, start Karma to run the tests. -__karma__.start(); diff --git a/src/typings.d.ts b/src/typings.d.ts deleted file mode 100644 index ef5c7bd620579296a1290b1a0b04c96d72e57bc6..0000000000000000000000000000000000000000 --- a/src/typings.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* SystemJS module definition */ -declare var module: NodeModule; -interface NodeModule { - id: string; -}