Skip to content

Commit 979d3fc

Browse files
committed
- Fixing the dependency versions
- Fixing the configuration files to work with the newer dependency versions - Added a .travis.yml file to automatically run tests
1 parent 49d3588 commit 979d3fc

File tree

7 files changed

+91
-72
lines changed

7 files changed

+91
-72
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sudo: false
2+
dist: trusty
3+
4+
language: node_js
5+
6+
node_js:
7+
- "7"
8+
- "6"
9+
- "4"

package.json

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
{
22
"name": "ng2-wizard",
3-
"version": "0.0.0",
3+
"version": "1.0.0",
44
"license": "MIT",
5-
"angular-cli": {},
5+
"description": "An angular 2 module containing a wizard component and its supporting components and directives",
6+
"homepage": "https://github.com/madoar/ng2-wizard",
7+
"author": {
8+
"name": "Marc Arndt",
9+
"email": "[email protected]"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/madoar/ng2-wizard"
14+
},
15+
"bugs": {
16+
"url": "https://github.com/madoar/ng2-wizard"
17+
},
18+
"keywords": [
19+
"angular2",
20+
"angular 2",
21+
"ng2",
22+
"typescript",
23+
"wizard",
24+
"component"
25+
],
626
"scripts": {
727
"lint": "tslint --force \"src/**/*.ts\"",
828
"pretest": "npm run lint",
@@ -11,12 +31,11 @@
1131
"test-watch": "karma start --no-single-run --auto-watch",
1232
"build": "rimraf dist && ngc -p src/tsconfig.aot.json && gulp"
1333
},
14-
"private": true,
34+
"private": false,
1535
"dependencies": {
1636
"@angular/common": "^2.3.1",
1737
"@angular/compiler": "^2.3.1",
1838
"@angular/core": "^2.3.1",
19-
"@angular/forms": "^2.3.1",
2039
"@angular/http": "^2.3.1",
2140
"@angular/platform-browser": "^2.3.1",
2241
"@angular/platform-browser-dynamic": "^2.3.1",
@@ -27,25 +46,23 @@
2746
"zone.js": "^0.7.2"
2847
},
2948
"devDependencies": {
30-
"@angular-cli/ast-tools": "^1.0.9",
3149
"@angular/compiler-cli": "^2.3.1",
3250
"@angularclass/hmr": "^1.0.1",
3351
"@angularclass/hmr-loader": "^3.0.2",
34-
"@ngtools/webpack": "^1.1.6",
52+
"@ngtools/webpack": "^1.2.8",
3553
"@types/jasmine": "^2.2.29",
3654
"@types/node": "^6.0.38",
3755
"@types/selenium-webdriver": "2.53.33",
38-
"angular-router-loader": "^0.4.0",
39-
"angular2-template-loader": "^0.6.0",
56+
"angular-router-loader": "^0.5.0",
57+
"angular2-template-loader": "^0.6.1",
4058
"autoprefixer": "^6.3.2",
41-
"awesome-typescript-loader": "^2.2.4",
42-
"codelyzer": "1.0.0-beta.3",
59+
"awesome-typescript-loader": "^3.0.3",
60+
"codelyzer": "2.0.0-beta.4",
4361
"copy-webpack-plugin": "^4.0.0",
4462
"css-loader": "^0.25.0",
4563
"extract-text-webpack-plugin": "^2.0.0-beta.4",
4664
"file-loader": "^0.9.0",
4765
"gulp": "^3.9.1",
48-
"gulp-clean": "^0.3.2",
4966
"gulp-less": "^3.3.0",
5067
"html-loader": "^0.4.0",
5168
"html-webpack-plugin": "^2.8.1",
@@ -65,7 +82,6 @@
6582
"less": "^2.7.1",
6683
"less-loader": "^2.2.3",
6784
"node-sass": "^3.4.2",
68-
"null-loader": "0.1.1",
6985
"phantomjs-prebuilt": "^2.1.4",
7086
"postcss-loader": "^1.1.0",
7187
"protractor": "^4.0.10",
@@ -74,17 +90,16 @@
7490
"remap-istanbul": "^0.6.4",
7591
"rimraf": "^2.5.1",
7692
"sass-loader": "^4.0.0",
77-
"shelljs": "^0.7.0",
7893
"style-loader": "^0.13.0",
7994
"to-string-loader": "^1.1.5",
80-
"ts-helpers": "^1.1.1",
81-
"tslint": "^3.15.1",
82-
"tslint-loader": "^2.1.5",
83-
"typedoc": "^0.5.1",
84-
"typescript": "2.0.6",
95+
"ts-helpers": "^1.1.2",
96+
"tslint": "^4.4.2",
97+
"tslint-loader": "^3.3.0",
98+
"typescript": "2.1.5",
8599
"url-loader": "^0.5.6",
86-
"webpack": "^2.1.0-beta.28",
87-
"webpack-dev-server": "2.1.0-beta.9"
100+
"webpack": "^2.2.0",
101+
"webpack-dev-server": "2.3.0",
102+
"typings": "^2.1.0"
88103
},
89104
"files": [
90105
"dist"

src/components/components/wizard-step.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ export class WizardStepComponent {
3434
* All steps previous to the currently selected step must be completed.
3535
* @type {boolean}
3636
*/
37-
public completed: boolean = false;
37+
public completed = false;
3838

3939
/**
4040
* True if this step is currently selected and therefore currently visible to the user.
4141
* Always one step is selected at any time.
4242
* @type {boolean}
4343
*/
44-
public selected: boolean = false;
44+
public selected = false;
4545

4646
/**
4747
* True if this step is optional.
4848
* @type {boolean}
4949
*/
50-
public optional: boolean = false;
50+
public optional = false;
5151

5252
constructor() { }
5353
}

src/polyfills.ts

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
1-
// This file includes polyfills needed by Angular 2 and is loaded before
2-
// the app. You can add your own extra polyfills to this file.
3-
import 'core-js/es6/symbol';
4-
import 'core-js/es6/object';
5-
import 'core-js/es6/function';
6-
import 'core-js/es6/parse-int';
7-
import 'core-js/es6/parse-float';
8-
import 'core-js/es6/number';
9-
import 'core-js/es6/math';
10-
import 'core-js/es6/string';
11-
import 'core-js/es6/date';
12-
import 'core-js/es6/array';
13-
import 'core-js/es6/regexp';
14-
import 'core-js/es6/map';
15-
import 'core-js/es6/set';
16-
import 'core-js/es6/reflect';
17-
1+
import 'core-js/es6';
182
import 'core-js/es7/reflect';
19-
import 'zone.js/dist/zone';
3+
require('zone.js/dist/zone');
4+
5+
if (process.env.ENV === 'production') {
6+
// Production
7+
} else {
8+
// Development and test
9+
Error['stackTraceLimit'] = Infinity;
10+
require('zone.js/dist/long-stack-trace-zone');
11+
}

src/vendor.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Created by marc on 07.02.17.
3+
*/
4+
5+
// Angular
6+
import '@angular/platform-browser';
7+
import '@angular/platform-browser-dynamic';
8+
import '@angular/core';
9+
import '@angular/common';
10+
import '@angular/http';
11+
import '@angular/router';
12+
13+
// RxJS
14+
import 'rxjs';
15+
16+
// Other vendors for example jQuery, Lodash or Bootstrap
17+
// You can import js, ts, css, sass, ...

tslint.json

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"spaces"
1717
],
1818
"label-position": true,
19-
"label-undefined": true,
2019
"max-line-length": [
2120
true,
2221
140
@@ -39,7 +38,6 @@
3938
],
4039
"no-construct": true,
4140
"no-debugger": true,
42-
"no-duplicate-key": true,
4341
"no-duplicate-variable": true,
4442
"no-empty": false,
4543
"no-eval": true,
@@ -49,8 +47,6 @@
4947
"no-switch-case-fall-through": true,
5048
"no-trailing-whitespace": true,
5149
"no-unused-expression": true,
52-
"no-unused-variable": true,
53-
"no-unreachable": true,
5450
"no-use-before-declare": true,
5551
"no-var-keyword": true,
5652
"object-literal-sort-keys": false,
@@ -92,11 +88,6 @@
9288
"check-separator",
9389
"check-type"
9490
],
95-
96-
"directive-selector-name": [true, "camelCase"],
97-
"component-selector-name": [true, "kebab-case"],
98-
"directive-selector-type": [true, "attribute"],
99-
"component-selector-type": [true, "element"],
10091
"use-input-property-decorator": true,
10192
"use-output-property-decorator": true,
10293
"use-host-property-decorator": true,
@@ -106,8 +97,6 @@
10697
"use-pipe-transform-interface": true,
10798
"component-class-suffix": true,
10899
"directive-class-suffix": true,
109-
"directive-selector-prefix": [true, "my"],
110-
"component-selector-prefix": [true, "my"],
111100
"pipe-naming": [true, "camelCase", "my"]
112101
}
113102
}

webpack.config.js

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,11 @@ module.exports = function makeWebpackConfig() {
4646
* Entry
4747
* Reference: http://webpack.github.io/docs/configuration.html#entry
4848
*/
49-
config.entry = isTest ? {} : {
50-
'polyfills': './src/polyfills.ts',
51-
'vendor': './src/vendor.ts',
52-
'app': './src/main.ts' // our angular app
53-
};
54-
55-
/**
56-
* Output
57-
* Reference: http://webpack.github.io/docs/configuration.html#output
58-
*/
59-
config.output = isTest ? {} : {
60-
path: root('dist'),
61-
publicPath: isProd ? '/' : 'http://localhost:8080/',
62-
filename: isProd ? 'js/[name].[hash].js' : 'js/[name].js',
63-
chunkFilename: isProd ? '[id].[hash].chunk.js' : '[id].chunk.js'
64-
};
49+
config.entry = {
50+
'polyfills': './src/polyfills.ts',
51+
'vendor': './src/vendor.ts',
52+
'app': './src/index.ts' // our angular app
53+
};
6554

6655
/**
6756
* Resolve
@@ -108,15 +97,23 @@ module.exports = function makeWebpackConfig() {
10897

10998

11099
// all less required in src/app files will be merged in js files
111-
{test: /\.less$/, exclude: root('src', 'style'), loader: ['to-string-loader', 'css-loader', 'postcss-loader', 'less-loader']},
100+
{
101+
test: /\.less$/,
102+
exclude: root('src', 'style'),
103+
loader: ['to-string-loader', 'css-loader', 'postcss-loader', 'less-loader']
104+
},
112105

113106

114107
// all scss required in src/app files will be merged in js files
115-
{test: /\.(scss|sass)$/, exclude: root('src', 'style'), loader: ['to-string-loader', 'css-loader', 'postcss-loader', 'sass-loader']},
108+
{
109+
test: /\.(scss|sass)$/,
110+
exclude: root('src', 'style'),
111+
loader: ['to-string-loader', 'css-loader', 'postcss-loader', 'sass-loader']
112+
},
116113

117114
// support for .html as raw text
118115
// todo: change the loader to something that adds a hash to images
119-
{test: /\.html$/, loader: 'raw-loader', exclude: root('src', 'public')}
116+
{test: /\.html$/, loader: 'raw-loader', exclude: root('src', 'public')}
120117
]
121118
};
122119

@@ -233,7 +230,7 @@ module.exports = function makeWebpackConfig() {
233230

234231
// Reference: http://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
235232
// Minify all javascript, switch loaders to minimizing mode
236-
new webpack.optimize.UglifyJsPlugin({sourceMap: true, mangle: { keep_fnames: true }}),
233+
new webpack.optimize.UglifyJsPlugin({sourceMap: true, mangle: {keep_fnames: true}}),
237234

238235
// Copy assets from the public folder
239236
// Reference: https://github.com/kevlened/copy-webpack-plugin

0 commit comments

Comments
 (0)