Skip to content

Commit 162059e

Browse files
Ed MoralesEd Morales
Ed Morales
authored and
Ed Morales
committed
Merge branch 'release/v0.5.0'
2 parents 796b30c + 2523578 commit 162059e

File tree

123 files changed

+2038
-772
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2038
-772
lines changed

.travis.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: node_js
2+
3+
node_js:
4+
- "5.4"
5+
6+
addons:
7+
firefox: "latest"
8+
9+
before_script:
10+
- export DISPLAY=:99.0
11+
- sh -e /etc/init.d/xvfb start
12+
13+
install:
14+
- npm install
15+
- ./node_modules/.bin/ng build
16+
17+
script:
18+
- ./node_modules/.bin/tslint -c ./tslint.json ./src/**/*.ts -e ./src/**/typings.d.ts
19+
- ./node_modules/.bin/karma start ./config/karma.travis.conf.js

README.md

+20-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
1-
# Teradata Web Platform
1+
## Covalent: UI Platform based on Angular-Material 2.0
22

3-
The Teradata Web Platform is a reusable platform for building web applications with common standards and tooling. It is based on Angular 2 and Material Design.
3+
[![Build Status](https://travis-ci.org/Teradata/covalent.svg?branch=develop)](https://travis-ci.org/Teradata/covalent)
4+
[![npm version](https://badge.fury.io/js/%40covalent%2Fcore.svg)](https://badge.fury.io/js/%40covalent%2Fcore)
5+
[![Join the chat at https://gitter.im/Teradata/covalent](https://badges.gitter.im/Teradata/covalent.svg)](https://gitter.im/Teradata/covalent?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
6+
7+
<img alt="Covalent" src="https://cdn.rawgit.com/Teradata/covalent/develop/src/app/assets/icons/covalent.svg" width="150">
8+
9+
Covalent is a reusable UI platform from Teradata for building web applications with common standards and tooling. It is based on Angular 2 and Material Design.
410

511
**Vision: To build an atomic, reusable component platform for Teradata to consume, while collaborating in an open source model.**
612

13+
## Setup
14+
15+
* Ensure you have Node 4.4 and NPM 3+ installed.
16+
* Install Angular CLI `npm i -g [email protected]`
17+
* Install TSLint and Typescript `npm install -g tslint typescript`
18+
* Install Protractor for e2e testing `npm install -g protractor`
19+
* Install Node packages `npm i`
20+
* Update Webdriver `webdriver-manager update` and `./node_modules/.bin/webdriver-manager update`
21+
* Run local build `ng serve`
22+
23+
---
24+
725
* [Contributing Guidelines](docs/CONTRIBUTING.md)
826
* [Developer Guide](docs/DEVELOPER_GUIDE.md)
927
* [Releasing](docs/RELEASE.md)

angular-cli.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"project": {
3-
"version": "0.4.0",
3+
"version": "1.0.0",
44
"name": "covalent"
55
},
66
"apps": [

build.conf.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module.exports = {
44
paths: {
55
packagejson: [
6-
'src/**/**/package.json',
6+
'src/**/**/package.json'
77
],
88
tsfiles: [
99
'src/typings.d.ts',

config/karma-test-shim.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ __karma__.loaded = function () {
77

88
var distPath = '/base/dist/';
99
var appPath = distPath + 'app/';
10+
var platformPath = distPath + 'platform/';
1011

1112
function isJsFile(path) {
1213
return path.slice(-3) == '.js';
@@ -16,13 +17,13 @@ function isSpecFile(path) {
1617
return path.slice(-8) == '.spec.js';
1718
}
1819

19-
function isAppFile(path) {
20-
return isJsFile(path) && (path.substr(0, appPath.length) == appPath);
20+
function isAppOrPlatformFile(path) {
21+
return isJsFile(path) && ((path.substr(0, appPath.length) == appPath) || (path.substr(0, platformPath.length) == platformPath));
2122
}
2223

2324
var allSpecFiles = Object.keys(window.__karma__.files)
2425
.filter(isSpecFile)
25-
.filter(isAppFile);
26+
.filter(isAppOrPlatformFile);
2627

2728
// Load our SystemJS configuration.
2829
System.config({
@@ -48,15 +49,17 @@ System.import('system-config.js').then(function() {
4849
testing.setBaseTestProviders(testingBrowser.TEST_BROWSER_DYNAMIC_PLATFORM_PROVIDERS,
4950
testingBrowser.TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS
5051
);
51-
testing.beforeEachProviders(function(){
52-
return [
52+
testing.beforeEach(function(){
53+
testing.addProviders([
5354
testingRouter.ROUTER_DIRECTIVES,
5455
testingRouter.RouterOutletMap,
5556
testingHttp.HTTP_PROVIDERS,
5657
testingForms.disableDeprecatedForms(),
5758
testingForms.provideForms(),
58-
testingIcon.MdIconRegistry
59-
];
59+
testingIcon.MdIconRegistry,
60+
{ provide: testingRouter.Router, useValue: {} },
61+
{ provide: testingRouter.ActivatedRoute, useValue: {} },
62+
]);
6063
});
6164
});
6265
}).then(function() {

config/karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = function (config) {
44
frameworks: ['jasmine'],
55
plugins: [
66
require('karma-jasmine'),
7-
require('karma-phantomjs-launcher')
7+
require('karma-firefox-launcher')
88
],
99
customLaunchers: {
1010
// chrome setup for travis CI using chromium
@@ -36,7 +36,7 @@ module.exports = function (config) {
3636
colors: true,
3737
logLevel: config.LOG_INFO,
3838
autoWatch: true,
39-
browsers: ['PhantomJS'],
39+
browsers: ['Firefox'],
4040
singleRun: false
4141
});
4242
};

config/karma.travis.conf.js

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = function (config) {
2+
config.set({
3+
basePath: '..',
4+
frameworks: ['jasmine'],
5+
plugins: [
6+
require('karma-jasmine'),
7+
require('karma-firefox-launcher')
8+
],
9+
files: [
10+
{ pattern: 'dist/vendor/es6-shim/es6-shim.js', included: true, watched: false },
11+
{ pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false },
12+
{ pattern: 'dist/vendor/reflect-metadata/Reflect.js', included: true, watched: false },
13+
{ pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false },
14+
{ pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false },
15+
{ pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false },
16+
17+
{ pattern: 'config/karma-test-shim.js', included: true, watched: true },
18+
19+
// Distribution folder.
20+
{ pattern: 'dist/**/*', included: false, watched: true }
21+
],
22+
exclude: [
23+
// Vendor packages might include spec files. We don't want to use those.
24+
'dist/vendor/**/*.spec.js'
25+
],
26+
preprocessors: {},
27+
reporters: ['progress'],
28+
port: 9876,
29+
colors: true,
30+
logLevel: config.LOG_INFO,
31+
browsers: ['Firefox'],
32+
singleRun: true
33+
});
34+
};

docs/DEVELOPER_GUIDE.md

-11
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
# Developer Guide for the Platform
22

3-
* [Setup](#setup)
43
* [Source Structure](#source-structure)
54
* [Adding a new platform component](#adding-a-new-platform-component)
65
* [Adding a new documentation component](#adding-a-new-documentation-component)
76

8-
## Setup
9-
10-
* Ensure you have Node 4.4 and NPM 3+ installed.
11-
* Install Angular CLI `npm i -g [email protected]`
12-
* Install TSLint and Typescript `npm install -g tslint typescript`
13-
* Install Protractor for e2e testing `npm install -g protractor`
14-
* Install Node packages `npm i`
15-
* Update Webdriver `webdriver-manager update` and `./node_modules/.bin/webdriver-manager update`
16-
* Run local build `ng serve`
17-
187
## Source Structure
198

209
The source has two parts, the platform and a documentation app.

docs/RELEASE.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Execute `npm test` to test the code with `tslint` and `karma`, provided the code
1616

1717
#### Bump Version
1818

19-
First, double check what kind of release is going to be published. It varies if its a `dev`, `patch`, `minor` or `major` release.
20-
Execute `npm run bump-[dev|patch|minor|major]` to bump the release.
19+
First, double check what kind of release is going to be published. It varies if its a `dev`, `patch`, `minor`, `major` or `[version]` release.
20+
Execute `npm run bump-[dev|patch|minor|major]` to bump the release or execute `gulp bump-version --ver [version]`.
2121
NOTE: Caution when using this command, since it will change the version on every module's package.json within `src/platform`.
2222

2323
#### Build
@@ -32,7 +32,7 @@ Execute `npm run build` to build the code you want to release.
3232

3333
#### Release
3434

35-
Execute `npm run release` to publish to NPM. At the moment it goes into every package within `deploy/platform` that has a `package.json` file and publishes into [public NPM registry](https://www.npmjs.com/).
35+
Execute `npm run publish` to publish to NPM. At the moment it goes into every package within `deploy/platform` that has a `package.json` file and publishes into [public NPM registry](https://www.npmjs.com/).
3636
It will fail to publish if you try to upload a version that already exists in the registry. Use wisely.
3737

3838
NOTE: Tagging version and merging to master/develop would have to be done manually.
@@ -44,9 +44,9 @@ NOTE: Tagging version and merging to master/develop would have to be done manual
4444

4545
#### Start Release
4646

47-
Execute `npm run start-release -- [version] [bump]` to start the automatic release process. The steps executed are:
47+
Execute `npm run start-release -- [version]` to start the automatic release process. The steps executed are:
4848
1. Creating a `release/[version]` branch using `git flow release`.
49-
2. Bumping its version to a [bump] release and commiting bumped version files.
49+
2. Bumping its version to [version] release and commiting bumped version files.
5050
3. Publishing `release/[version]` branch into repository.
5151
4. Executes `npm run test`.
5252

e2e/index.e2e.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
describe('hello, protractor', function () {
2-
describe('index', function () {
1+
describe('hello, protractor', function(): void {
2+
describe('index', function(): void {
33
browser.get('/');
4-
it('should have a title', function () {
5-
expect(browser.getTitle()).toBe('Teradata');
4+
it('should have a title', function(): void {
5+
expect(browser.getTitle()).toBe('Teradata Covalent - Angular Material Design UI Platform');
66
});
77
});
88
});

package.json

+36-31
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "covalent",
3-
"version": "0.4.0",
3+
"version": "0.5.0",
44
"private": true,
55
"description": "Teradata UI Platform built on Angular Material 2",
66
"keywords": [
@@ -13,7 +13,8 @@
1313
"e2e-test": "protractor ./config/protractor.conf.js",
1414
"tslint": "tslint -c ./tslint.json \"./src/**/*.ts\" -e \"./src/**/typings.d.ts\"",
1515
"typings": "typings install --global",
16-
"postinstall": "npm run typings",
16+
"postinstall": "npm run typings && webdriver-manager update",
17+
"webdriver-update": "bash ./node_modules/.bin/webdriver-manager update",
1718
"pretest": "rm -rf ./dist && ng build",
1819
"test": "karma start ./config/karma.conf.js",
1920
"bump-dev": "gulp bump-version",
@@ -47,61 +48,65 @@
4748
"Jeremy Wilken <[email protected]>"
4849
],
4950
"dependencies": {
50-
"@angular/common": "2.0.0-rc.3",
51-
"@angular/compiler": "2.0.0-rc.3",
52-
"@angular/core": "2.0.0-rc.3",
53-
"@angular/forms": "0.1.1",
54-
"@angular/http": "2.0.0-rc.3",
55-
"@angular/platform-browser": "2.0.0-rc.3",
56-
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
57-
"@angular/router": "3.0.0-alpha.8",
58-
"@angular2-material/button": "2.0.0-alpha.6",
59-
"@angular2-material/card": "2.0.0-alpha.6",
60-
"@angular2-material/checkbox": "2.0.0-alpha.6",
61-
"@angular2-material/core": "2.0.0-alpha.6",
62-
"@angular2-material/icon": "2.0.0-alpha.6",
63-
"@angular2-material/input": "2.0.0-alpha.6",
64-
"@angular2-material/list": "2.0.0-alpha.6",
65-
"@angular2-material/progress-bar": "2.0.0-alpha.6",
66-
"@angular2-material/progress-circle": "2.0.0-alpha.6",
67-
"@angular2-material/radio": "2.0.0-alpha.6",
68-
"@angular2-material/sidenav": "2.0.0-alpha.6",
69-
"@angular2-material/tabs": "2.0.0-alpha.6",
70-
"@angular2-material/toolbar": "2.0.0-alpha.6",
71-
"@angular2-material/grid-list": "2.0.0-alpha.6",
72-
"@angular2-material/slide-toggle": "2.0.0-alpha.6",
51+
"@angular/common": "2.0.0-rc.4",
52+
"@angular/compiler": "2.0.0-rc.4",
53+
"@angular/core": "2.0.0-rc.4",
54+
"@angular/forms": "0.2.0",
55+
"@angular/http": "2.0.0-rc.4",
56+
"@angular/platform-browser": "2.0.0-rc.4",
57+
"@angular/platform-browser-dynamic": "2.0.0-rc.4",
58+
"@angular/router": "3.0.0-beta.2",
59+
"@angular2-material/button": "2.0.0-alpha.6-2",
60+
"@angular2-material/card": "2.0.0-alpha.6-2",
61+
"@angular2-material/checkbox": "2.0.0-alpha.6-2",
62+
"@angular2-material/core": "2.0.0-alpha.6-2",
63+
"@angular2-material/icon": "2.0.0-alpha.6-2",
64+
"@angular2-material/input": "2.0.0-alpha.6-2",
65+
"@angular2-material/list": "2.0.0-alpha.6-2",
66+
"@angular2-material/menu": "2.0.0-alpha.6-2",
67+
"@angular2-material/progress-bar": "2.0.0-alpha.6-2",
68+
"@angular2-material/progress-circle": "2.0.0-alpha.6-2",
69+
"@angular2-material/radio": "2.0.0-alpha.6-2",
70+
"@angular2-material/sidenav": "2.0.0-alpha.6-2",
71+
"@angular2-material/tabs": "2.0.0-alpha.6-2",
72+
"@angular2-material/toolbar": "2.0.0-alpha.6-2",
73+
"@angular2-material/grid-list": "2.0.0-alpha.6-2",
74+
"@angular2-material/slide-toggle": "2.0.0-alpha.6-2",
7375
"es6-shim": "0.35.1",
7476
"reflect-metadata": "^0.1.3",
7577
"rxjs": "5.0.0-beta.6",
76-
"systemjs": "0.19.27",
78+
"systemjs": "0.19.31",
7779
"zone.js": "^0.6.12",
7880
"showdown": "1.4.2"
7981
},
8082
"devDependencies": {
8183
"angular-cli": "1.0.0-beta.8",
82-
"codelyzer": "0.0.23",
84+
"codelyzer": "0.0.25",
8385
"del": "2.2.0",
8486
"ember-cli-inject-live-reload": "1.4.0",
8587
"gulp": "3.9.1",
8688
"gulp-bump": "2.1.0",
8789
"gulp-help": "1.6.1",
90+
"gulp-if": "2.0.1",
8891
"gulp-sass": "2.3.2",
8992
"gulp-sourcemaps": "1.6.0",
9093
"gulp-typescript": "2.13.6",
9194
"gulp-util": "3.0.7",
9295
"jasmine-core": "2.4.1",
9396
"jasmine-spec-reporter": "2.4.0",
94-
"karma": "0.13.22",
97+
"karma": "^1.1.1",
98+
"karma-firefox-launcher": "1.0.0",
9599
"karma-jasmine": "1.0.2",
96-
"karma-phantomjs-launcher": "1.0.0",
100+
"karma-phantomjs-launcher": "1.0.1",
97101
"merge2": "1.0.2",
98102
"minimist": "1.2.0",
99103
"node-sass": "3.8.0",
100104
"phantomjs-prebuilt": "2.1.7",
101-
"protractor": "3.3.0",
105+
"protractor": "4.0.0",
102106
"require-dir": "0.3.0",
107+
"semver": "5.2.0",
103108
"ts-node": "0.9.3",
104-
"tslint": "3.11.0",
109+
"tslint": "^3.13.0",
105110
"typescript": "^1.8.10",
106111
"typings": "1.3.1"
107112
}

scripts/bump-version.js

+14-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
var gulp = require('gulp-help')(require('gulp'));
44
var bump = require('gulp-bump');
5+
var gulpif = require('gulp-if');
56
var util = require('gulp-util');
7+
var semver = require('semver');
8+
var merge = require('merge2');
69
var config = require('../build.conf');
710

811
var minimist = require('minimist');
@@ -16,13 +19,20 @@ var options = minimist(process.argv.slice(2), knownOptions);
1619

1720
gulp.task('bump-version', function(){
1821
var verTypes = ['major', 'minor', 'patch', 'prerelease'];
19-
if(verTypes.indexOf(options.ver) < 0){
22+
var isVerType = verTypes.indexOf(options.ver) > -1;
23+
if(!isVerType && !semver.valid(options.ver)){
2024
throw new util.PluginError({
2125
plugin: 'bump-version',
2226
message: '--ver selected as input is not supported.'
2327
});
2428
};
25-
return gulp.src(config.paths.packagejson)
26-
.pipe(bump({type: options.ver}))
27-
.pipe(gulp.dest('src/'));
29+
var mainPackageJson = gulp.src('package.json')
30+
.pipe(gulpif(isVerType, bump({type: options.ver}), bump({version: options.ver})))
31+
.pipe(gulp.dest('.'));
32+
33+
var platformPackageJsons = gulp.src(config.paths.packagejson)
34+
.pipe(gulpif(isVerType, bump({type: options.ver}), bump({version: options.ver})))
35+
.pipe(gulp.dest('src/'))
36+
37+
return merge(mainPackageJson, platformPackageJsons);
2838
});

scripts/finish-release

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ version=$1
33

44
set -e
55

6-
echo "Finished release $version"
7-
git flow release finish ${version}
6+
echo "Finished release v$version"
7+
git flow release finish v$version
88

9-
echo "Pushed tag $version to main repo"
9+
echo "Pushed tag v$version to main repo"
1010
git push --tags
1111

1212
echo "Pushing changes into develop"

0 commit comments

Comments
 (0)