Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #10 from tomwanzek/upgrade-project
Browse files Browse the repository at this point in the history
Upgrade project
  • Loading branch information
tomwanzek authored Nov 24, 2016
2 parents bef182a + d13708e commit 9f0d9c0
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 48 deletions.
3 changes: 1 addition & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ root = true
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = 0
max_line_length = off
trim_trailing_whitespace = false
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

# IDEs and editors
/.idea
/.vscode
.project
.classpath
.c9/
*.launch
.settings/

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ _The running web app can be seen at:_ **[d3-ng2-demo Github Page](https://tomwan

## Explore this Project Locally

This project was generated with **[angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.15**.
This project was generated with **[angular-cli](https://github.com/angular/angular-cli) version 1.0.0-beta.21**.

### Installation

Expand Down
20 changes: 17 additions & 3 deletions angular-cli.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"project": {
"version": "1.0.0-beta.15",
"version": "1.0.0-beta.21",
"name": "d3-ng2-demo"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": "assets",
"assets": [
"assets"
],
"index": "index.html",
"main": "main.ts",
"test": "test.ts",
Expand Down Expand Up @@ -40,6 +42,18 @@
},
"defaults": {
"styleExt": "css",
"prefixInterfaces": false
"prefixInterfaces": false,
"inline": {
"style": false,
"template": false
},
"spec": {
"class": false,
"component": true,
"directive": true,
"module": false,
"pipe": true,
"service": true
}
}
}
3 changes: 2 additions & 1 deletion e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { browser, element, by } from 'protractor/globals';
import { browser, element, by } from 'protractor';

export class D3Ng2DemoPage {
navigateTo() {
Expand All @@ -15,3 +15,4 @@ export class D3Ng2DemoPage {
}

}

7 changes: 6 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ module.exports = function (config) {
preprocessors: {
'./src/test.ts': ['angular-cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
remapIstanbulReporter: {
reports: {
html: 'coverage',
Expand All @@ -27,7 +30,9 @@ module.exports = function (config) {
config: './angular-cli.json',
environment: 'dev'
},
reporters: ['progress', 'karma-remap-istanbul'],
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'karma-remap-istanbul']
: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down
35 changes: 19 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-ng2-demo",
"version": "0.1.0",
"version": "0.1.1",
"description": "An Angular 2 app which demonstrates the implementation of D3 version 4 components.",
"keywords": [
"D3",
Expand All @@ -27,35 +27,38 @@
"url": "https://github.com/tomwanzek/d3-ng2-demo"
},
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/common": "2.2.1",
"@angular/compiler": "2.2.1",
"@angular/core": "2.2.1",
"@angular/forms": "2.2.1",
"@angular/http": "2.2.1",
"@angular/platform-browser": "2.2.1",
"@angular/platform-browser-dynamic": "2.2.1",
"@angular/router": "3.2.1",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"d3-ng2-service": "1.1",
"d3-ng2-service": "^1.4.0",
"rxjs": "5.0.0-beta.12",
"ts-helpers": "^1.1.1",
"zone.js": "^0.6.23"
},
"devDependencies": {
"@types/jasmine": "^2.2.30",
"angular-cli": "1.0.0-beta.15",
"codelyzer": "~0.0.26",
"jasmine-core": "2.4.1",
"@angular/compiler-cli": "2.2.1",
"@types/jasmine": "2.5.38",
"@types/node": "^6.0.42",
"angular-cli": "1.0.0-beta.21",
"codelyzer": "~1.0.0-beta.3",
"jasmine-core": "2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-remap-istanbul": "^0.2.1",
"protractor": "4.0.5",
"protractor": "4.0.9",
"ts-node": "1.2.1",
"tslint": "3.13.0",
"typescript": "2.0.2"
"typescript": "~2.0.3",
"webdriver-manager": "10.2.5"
}
}
2 changes: 1 addition & 1 deletion src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h4>Perfect Storm</h4>
</div>
<div class="col-lg-4">
<!-- insert images -->
<img src="assets/d3-ng2-demo-screenshots.png" class="img-responsive" />
<img src="/assets/d3-ng2-demo-screenshots.png" class="img-responsive" />
</div>
<div class="col-lg-3">
<h4>Take Flight</h4>
Expand Down
34 changes: 16 additions & 18 deletions src/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ 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;
Expand All @@ -14,21 +19,14 @@ declare var require: any;
// Prevent Karma from running prematurely.
__karma__.loaded = function () {};


Promise.all([
System.import('@angular/core/testing'),
System.import('@angular/platform-browser-dynamic/testing')
])
// First, initialize the Angular testing environment.
.then(([testing, testingBrowser]) => {
testing.getTestBed().initTestEnvironment(
testingBrowser.BrowserDynamicTestingModule,
testingBrowser.platformBrowserDynamicTesting()
);
})
// Then we find all the tests.
.then(() => require.context('./', true, /\.spec\.ts/))
// And load the modules.
.then(context => context.keys().map(context))
// Finally, start Karma to run the tests.
.then(__karma__.start, __karma__.error);
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
let context = require.context('./', true, /\.spec\.ts/);
// And load the modules.
context.keys().map(context);
// Finally, start Karma to run the tests.
__karma__.start();
1 change: 1 addition & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"baseUrl": "",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
Expand Down
5 changes: 1 addition & 4 deletions src/typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
// Typings reference file, see links for more information
// https://github.com/typings/typings
// Typings reference file, you can add your own global typings here
// https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html

declare var System: any;
4 changes: 3 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
"use-life-cycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
"directive-class-suffix": true,
"templates-use-public": true,
"invoke-injectable": true
}
}

0 comments on commit 9f0d9c0

Please sign in to comment.