Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit 41d7676

Browse files
committed
webpack-version works except the semantic-ui-css stylesheets; see angular/angular-cli#1459
1 parent e89ae5c commit 41d7676

31 files changed

+144
-263
lines changed

.clang-format

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

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ trim_trailing_whitespace = true
1111

1212
[*.md]
1313
max_line_length = 0
14-
trim_trailing_whitespace = false
14+
trim_trailing_whitespace = false

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010

1111
# IDEs and editors
1212
/.idea
13-
/.vscode
13+
.project
14+
.classpath
15+
*.launch
16+
.settings/
1417

1518
# misc
1619
/.sass-cache
@@ -26,4 +29,5 @@ testem.log
2629
/e2e/*.map
2730

2831
#System Files
29-
.DS_Store
32+
.DS_Store
33+
Thumbs.db

angular-cli-build.js

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

angular-cli.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"project": {
3-
"version": "1.0.0-beta.6",
3+
"version": "1.0.0-beta.11-webpack",
44
"name": "book-monkey"
55
},
66
"apps": [

config/environment.js

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

config/karma-test-shim.js

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

config/karma.conf.js

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
// Karma configuration file, see link for more information
1+
// Karma configuration file, see link for more information
22
// 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'],
7+
frameworks: ['jasmine', 'angular-cli'],
88
plugins: [
99
require('karma-jasmine'),
10-
require('karma-chrome-launcher')
10+
require('karma-chrome-launcher'),
11+
require('karma-coverage'),
12+
require('angular-cli/plugins/karma')
1113
],
1214
customLaunchers: {
1315
// chrome setup for travis CI using chromium
@@ -17,25 +19,13 @@ module.exports = function (config) {
1719
}
1820
},
1921
files: [
20-
{ pattern: 'dist/vendor/es6-shim/es6-shim.js', included: true, watched: false },
21-
{ pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false },
22-
{ pattern: 'dist/vendor/reflect-metadata/Reflect.js', included: true, watched: false },
23-
{ pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false },
24-
{ pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false },
25-
{ pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false },
26-
{ pattern: 'dist/vendor/zone.js/dist/fake-async-test.js', included: true, watched: false },
27-
28-
{ pattern: 'config/karma-test-shim.js', included: true, watched: true },
29-
30-
// Distribution folder.
31-
{ pattern: 'dist/**/*', included: false, watched: true }
22+
{ pattern: './src/test.ts', watched: false }
3223
],
33-
exclude: [
34-
// Vendor packages might include spec files. We don't want to use those.
35-
'dist/vendor/**/*.spec.js'
36-
],
37-
preprocessors: {},
38-
reporters: ['progress'],
24+
preprocessors: {
25+
'./src/test.ts': ['angular-cli']
26+
},
27+
angularCliConfig: './angular-cli.json',
28+
reporters: ['coverage', 'progress'],
3929
port: 9876,
4030
colors: true,
4131
logLevel: config.LOG_INFO,

config/protractor.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ exports.config = {
2929
onPrepare: function() {
3030
jasmine.getEnv().addReporter(new SpecReporter());
3131
}
32-
};
32+
};

e2e/app.e2e.ts renamed to e2e/app.e2e-spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ describe('book-monkey App', function() {
55

66
beforeEach(() => {
77
page = new BookMonkeyPage();
8-
})
8+
});
99

1010
it('should display message saying app works', () => {
1111
page.navigateTo();
12-
expect(page.getParagraphText()).toEqual('book-monkey works!');
12+
expect(page.getParagraphText()).toEqual('app works!');
1313
});
1414
});

e2e/app.po.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export class BookMonkeyPage {
44
}
55

66
getParagraphText() {
7-
return element(by.css('book-monkey-app h1')).getText();
7+
return element(by.css('app-root h1')).getText();
88
}
99
}

e2e/tsconfig.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"declaration": false,
55
"emitDecoratorMetadata": true,
66
"experimentalDecorators": true,
7-
"mapRoot": "",
87
"module": "commonjs",
98
"moduleResolution": "node",
10-
"noEmitOnError": true,
11-
"noImplicitAny": false,
12-
"rootDir": ".",
9+
"outDir": "../dist/out-tsc-e2e",
1310
"sourceMap": true,
14-
"sourceRoot": "/",
15-
"target": "es5"
11+
"target": "es5",
12+
"typeRoots": [
13+
"../node_modules/@types"
14+
]
1615
}
17-
}
16+
}

e2e/typings.d.ts

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

package.json

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
"license": "MIT",
55
"angular-cli": {},
66
"scripts": {
7-
"start": "ng server",
8-
"ng": "ng",
9-
"postinstall": "typings install",
7+
"start": "ng serve",
108
"lint": "tslint \"src/**/*.ts\"",
119
"test": "ng test",
1210
"pree2e": "webdriver-manager update",
@@ -22,29 +20,28 @@
2220
"@angular/platform-browser": "2.0.0-rc.4",
2321
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
2422
"@angular/router": "3.0.0-beta.2",
25-
"es6-shim": "0.35.1",
23+
"core-js": "^2.4.0",
2624
"reflect-metadata": "0.1.3",
2725
"rxjs": "5.0.0-beta.6",
28-
"semantic-ui-css": "2.1.8",
29-
"systemjs": "0.19.26",
26+
"semantic-ui-css": "2.2.2",
27+
"ts-helpers": "^1.1.1",
3028
"zone.js": "0.6.12"
3129
},
3230
"devDependencies": {
33-
"angular-cli": "1.0.0-beta.10",
34-
"angular-cli-ghpages": "*",
31+
"@types/jasmine": "^2.2.30",
32+
"@types/protractor": "^1.5.16",
33+
"angular-cli": "1.0.0-beta.11-webpack",
3534
"book-monkey2-api": "*",
36-
"codelyzer": "0.0.20",
37-
"ember-cli-inject-live-reload": "1.4.0",
38-
"exists-sync": "0.0.3",
35+
"codelyzer": "0.0.26",
3936
"jasmine-core": "2.4.1",
4037
"jasmine-spec-reporter": "2.5.0",
4138
"karma": "0.13.22",
4239
"karma-chrome-launcher": "0.2.3",
40+
"karma-coverage": "^1.0.0",
4341
"karma-jasmine": "0.3.8",
4442
"protractor": "3.3.0",
45-
"ts-node": "0.5.5",
46-
"tslint": "3.11.0",
47-
"typescript": "1.8.10",
48-
"typings": "0.8.1"
43+
"ts-node": "1.2.1",
44+
"tslint": "3.13.0",
45+
"typescript": "^2.0.0"
4946
}
5047
}

src/app/app.component.css

Whitespace-only changes.

src/app/app.component.spec.ts

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,20 @@
11
/*
2-
import {
3-
beforeEachProviders,
4-
describe,
5-
expect,
6-
it,
7-
inject
8-
} from '@angular/core/testing';
9-
import { AppComponent } from '../app/book-monkey.component';
10-
11-
beforeEachProviders(() => [AppComponent]);
2+
import { addProviders, async, inject } from '@angular/core/testing';
3+
import { AppComponent } from './app.component';
124
135
describe('App: BookMonkey', () => {
6+
beforeEach(() => {
7+
addProviders([AppComponent]);
8+
});
9+
1410
it('should create the app',
15-
inject([AppComponent], (app: AppComponent) => {
16-
expect(app).toBeTruthy();
17-
}));
11+
inject([AppComponent], (app: AppComponent) => {
12+
expect(app).toBeTruthy();
13+
}));
1814
19-
it('should have as title \'book-monkey works!\'',
20-
inject([AppComponent], (app: AppComponent) => {
21-
expect(app.title).toEqual('book-monkey works!');
22-
}));
15+
it('should have as title \'app works!\'',
16+
inject([AppComponent], (app: AppComponent) => {
17+
expect(app.title).toEqual('app works!');
18+
}));
2319
});
2420
*/

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { Component } from '@angular/core';
22
import { ROUTER_DIRECTIVES } from '@angular/router';
33

44
@Component({
5-
moduleId: module.id,
65
selector: 'app-root',
76
templateUrl: 'app.component.html',
7+
styleUrls: ['app.component.css'],
88
directives: [ROUTER_DIRECTIVES]
99
})
1010
export class AppComponent { }

src/app/environment.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

src/app/environments/environment.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// The file for the current environment will overwrite this one during build.
2+
// Different environments can be found in ./environment.{dev|prod}.ts, and
3+
// you can create your own and use it with the --env flag.
4+
// The build system defaults to the dev environment.
5+
6+
export const environment = {
7+
production: false
8+
};

src/app/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from './environment';
1+
export * from './environments/environment';
22
export * from './app.component';
33
export * from './app.routes';
44

src/app/snippets/typings.d.ts

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

src/index.html

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,13 @@
55
<title>BookMonkey</title>
66
<base href="/">
77

8-
{{#unless environment.production}}
9-
<script src="/ember-cli-live-reload.js" type="text/javascript"></script>
10-
{{/unless}}
118
<meta name="viewport" content="width=device-width, initial-scale=1">
129
<link rel="icon" type="image/x-icon" href="favicon.ico">
13-
<link rel="stylesheet" href="vendor/semantic-ui-css/semantic.min.css">
10+
<style>
11+
@import '../../../node_modules/semantic-ui-css/semantic.min.css';
12+
</style>
1413
</head>
1514
<body>
1615
<app-root>Loading...</app-root>
17-
{{#each scripts.polyfills}}<script src="{{.}}"></script>{{/each}}
18-
<script>
19-
System.import('system-config.js').then(function () {
20-
System.import('main');
21-
}).catch(console.error.bind(console));
22-
</script>
2316
</body>
24-
</html>
17+
</html>

0 commit comments

Comments
 (0)