From 0a272b0867c58b72bdea6cb524fe9037597500e4 Mon Sep 17 00:00:00 2001 From: Richa Vyas Date: Fri, 30 Sep 2016 22:26:42 +0530 Subject: [PATCH] feature(webpack): latest angular-cli builds (#86) * angular-cli latest deployed with rc.7 * css files added * dependencies updated * moduling added based on latest router * updated with webpack 15 * README updated * updated README.md and e2e setup * removed unused code and dependencies * re-added basic unit test, fixed karma setup, and updated travis setup * added to see if fixes build issue # angular-cli/1930 * run chrome in travis * make ng test run once so travis can finish * included spec.ts files for intellisense * fixed highlight dependency using require() and not linting for that line * checking if require affects dependency CI * fixed back * udpate(material): checkbox text * udpate(app-sass): hint & icon button * update(home): add repo links in toolbar --- .travis.yml | 6 +- README.md | 6 +- angular-cli-build.js | 29 ----- angular-cli.json | 35 ++++-- config/environment.js | 10 -- config/karma-test-shim.js | 55 -------- config/karma.conf.js | 46 ------- config/karma.travis.conf.js | 38 ------ e2e/index.e2e.ts | 2 + e2e/tsconfig.json | 15 +-- e2e/typings.d.ts | 1 - karma.conf.js | 49 ++++++++ package.json | 105 +++++++--------- .../protractor.conf.js => protractor.conf.js | 9 +- src/app/app.component.scss | 26 ++++ src/app/app.component.ts | 3 +- src/app/assets/icons/github.svg | 6 + .../components/chips/chips.component.ts | 3 +- .../components/components.component.ts | 3 +- .../expansion-panel.component.ts | 5 +- .../file-upload/file-upload.component.ts | 15 ++- .../highlight/highlight.component.ts | 3 +- .../components/http/http.component.ts | 15 ++- .../json-formatter.component.ts | 3 +- .../components/loading/loading.component.ts | 3 +- .../components/markdown/markdown.component.ts | 3 +- .../components/media/media.component.ts | 7 +- .../components/overview/overview.component.ts | 3 +- .../components/pipes/pipes.component.ts | 3 +- .../components/steps/steps.component.ts | 3 +- .../docs/angular-2/angular-2.component.ts | 3 +- .../angular-material.component.ts | 3 +- .../docs/build-tasks/build-tasks.component.ts | 3 +- .../docs/creating/creating.component.ts | 3 +- .../docs/deployment/deployment.component.ts | 3 +- src/app/components/docs/docs.component.ts | 3 +- .../components/docs/icons/icons.component.ts | 3 +- .../docs/mock-data/mock-data.component.ts | 3 +- .../docs/overview/overview.component.ts | 3 +- .../docs/testing/testing.component.ts | 3 +- .../components/docs/theme/theme.component.ts | 3 +- src/app/components/home/home.component.html | 12 +- src/app/components/home/home.component.ts | 3 +- .../layouts/card-over/card-over.component.ts | 3 +- .../components/layouts/layouts.component.ts | 3 +- .../manage-list/manage-list.component.ts | 3 +- .../layouts/nav-list/nav-list.component.ts | 3 +- .../layouts/nav-view/nav-view.component.ts | 3 +- .../layouts/overview/overview.component.ts | 3 +- .../style-guide/cards/cards.component.ts | 3 +- .../style-guide/colors/colors.component.ts | 3 +- .../iconography/iconography.component.ts | 3 +- .../style-guide/logo/logo.component.ts | 3 +- .../material-components.component.html | 4 +- .../material-components.component.ts | 3 +- .../product-icons/product-icons.component.ts | 3 +- .../resources/resources.component.ts | 3 +- .../style-guide/style-guide.component.ts | 3 +- .../typography/typography.component.ts | 3 +- .../utility-styles.component.ts | 3 +- src/app/index.ts | 1 - .../environments}/environment.prod.ts | 2 +- .../environments/environment.ts | 2 +- src/index.html | 28 +---- src/main.ts | 9 +- .../autocomplete/autocomplete.component.ts | 3 +- src/platform/chips/chip.component.ts | 3 +- src/platform/chips/chips.component.ts | 3 +- .../expansion-panel.component.ts | 6 +- .../layout-card-over.component.ts | 3 +- .../layout-manage-list.component.ts | 3 +- .../layout-nav-list.component.ts | 3 +- .../layout/layout-nav/layout-nav.component.ts | 3 +- src/platform/core/layout/layout.component.ts | 3 +- .../core/loading/loading.component.ts | 3 +- src/platform/core/steps/step.component.ts | 8 +- src/platform/core/steps/steps.component.ts | 7 +- .../file-upload/file-upload.component.ts | 6 +- src/platform/highlight/highlight.component.ts | 8 +- .../json-formatter.component.ts | 4 +- src/platform/markdown/markdown.component.ts | 3 +- src/polyfills.ts | 21 ++++ src/styles.css | 1 + src/system-config.ts | 117 ------------------ src/test.ts | 33 +++++ src/tsconfig.json | 26 ++-- src/typings.d.ts | 7 +- tsconfig.json | 7 -- typings.json | 11 -- 89 files changed, 351 insertions(+), 593 deletions(-) delete mode 100644 angular-cli-build.js delete mode 100644 config/environment.js delete mode 100644 config/karma-test-shim.js delete mode 100644 config/karma.conf.js delete mode 100644 config/karma.travis.conf.js delete mode 100644 e2e/typings.d.ts create mode 100644 karma.conf.js rename config/protractor.conf.js => protractor.conf.js (70%) create mode 100644 src/app/assets/icons/github.svg rename {config => src/environments}/environment.prod.ts (61%) rename config/environment.dev.ts => src/environments/environment.ts (60%) create mode 100644 src/polyfills.ts create mode 100644 src/styles.css delete mode 100644 src/system-config.ts create mode 100644 src/test.ts delete mode 100644 tsconfig.json delete mode 100644 typings.json diff --git a/.travis.yml b/.travis.yml index 1a433b9211..6d3491926d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,14 +4,16 @@ node_js: addons: firefox: latest before_script: +- export CHROME_BIN=chromium-browser - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start install: +- npm i process-nextick-args util-deprecate - npm install - "./node_modules/.bin/ng build" script: -- "./node_modules/.bin/tslint -c ./tslint.json ./src/**/*.ts -e ./src/**/typings.d.ts" -- "./node_modules/.bin/karma start ./config/karma.travis.conf.js" +- npm run tslint +- "./node_modules/.bin/ng test --watch=false" notifications: slack: secure: pkXQL5AZiSBh1yWjilrcA7KbcJjC4xxjhd0SAwogJCQgyEf/i8/CfR1ZXiZYsIBJT6HTI7UMdJzwP6TiY/zih6Mq8PqUg38NUsvGyznILkbksMQJieWrg1r+1ideplPJFX7qdXwrOcxvSVoEFIGha26X0Fglq3kXSBHpPR9U0lDCoUxLUO35txQ/iji85Na4hjQnmtBEQkqaJogA0hRdcSLIKxwScgSrb4UU2PXEaIS9Zpr2SOG/RTOMkrrSMOD7bgocZbhAbk3c5shPZNj51gpEN+692Qxp4kQ/nfT10Hu5ATLaFCM5v04+w0D3ZJLA46LpU47qP0ALy6O9d16pGUcxJGbWaMZpV53vV9jIl9y2ahaqN1h1J9BcLIOzJvaQy92km8F7a3l7cN8gWSUZjs5Hd+gPFQH9Flcydmq26e8Maa1tQDF5R3GIdaCw4qkuJYbl4ToE59wtiPQ6M7xVKqNK4Qypu1YNsKOoLG/tZRFvp4771vgWcR5Lu/DqJJ9SAB0jsdrOXpe+0DmdrLBwhoZv2D9FTce+clDHIJ7ObPEc/UKw8rtWAA5iCPCEJ0sPl+WZwOS3ZFp4QmMC+5mzffMUiX6HBnzxiyOZvYGJD/jTy1yA1Cmt4RJYrOPM73csI1ELs5tj4tvqBNJQ8daIenfkg7u42IJfByDGIsJz8to= diff --git a/README.md b/README.md index dff6a0bef0..0d26cf1919 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ Covalent is a reusable UI platform from Teradata for building web applications w ## Setup * Ensure you have Node 4.4 and NPM 3+ installed. -* Install Angular CLI `npm i -g angular-cli@1.0.0-beta.10` -* Install Typescript 2.0 `npm i -g typescript@2.0.2` -* Install TSLint and Typings `npm install -g tslint typings` +* Install Angular CLI `npm i -g angular-cli@1.0.0-beta.15` +* Install Typescript 2.0 `npm i -g typescript` +* Install TSLint `npm install -g tslint` * Install Protractor for e2e testing `npm install -g protractor` * Install Node packages `npm i` * Update Webdriver `webdriver-manager update` and `./node_modules/.bin/webdriver-manager update` diff --git a/angular-cli-build.js b/angular-cli-build.js deleted file mode 100644 index ce90fca760..0000000000 --- a/angular-cli-build.js +++ /dev/null @@ -1,29 +0,0 @@ -/* global require, module */ - -var Angular2App = require('angular-cli/lib/broccoli/angular2-app'); - -module.exports = function(defaults) { - return new Angular2App(defaults, { - vendorNpmFiles: [ - 'systemjs/dist/system-polyfills.js', - 'systemjs/dist/system.src.js', - 'zone.js/dist/*.js', - 'core-js/client/core.js', - 'rxjs/**/*.js', - 'hammerjs/*.min.js', - '@angular/**/*.js', - '@angular2-material/**/*.+(js|css)', - 'showdown/dist/showdown.js', - 'highlight.js/lib/**' - ], - polyfills: [ - 'vendor/core-js/client/core.js', - 'vendor/systemjs/dist/system.src.js', - 'vendor/zone.js/dist/zone.js', - 'vendor/hammerjs/hammer.min.js', - '@angular2-material/**/*.css', - 'vendor/showdown/dist/showdown.js', - 'vendor/highlight.js/lib/**' - ] - }); -}; diff --git a/angular-cli.json b/angular-cli.json index a50933d1d5..1e79fe693d 100644 --- a/angular-cli.json +++ b/angular-cli.json @@ -5,26 +5,47 @@ }, "apps": [ { - "main": "src/main.ts", - "tsconfig": "src/tsconfig.json" + "root": "src", + "outDir": "dist", + "assets": "assets", + "index": "index.html", + "main": "main.ts", + "test": "test.ts", + "tsconfig": "tsconfig.json", + "prefix": "app", + "mobile": false, + "styles": [ + "styles.css", + "platform/core/styles/platform.scss", + "../node_modules/@angular2-material/core/style/core.css", + "../node_modules/@angular2-material/core/overlay/overlay.css" + ], + "scripts": [ + "../node_modules/hammerjs/hammer.min.js", + "../node_modules/showdown/dist/showdown.js" + ], + "environments": { + "source": "environments/environment.ts", + "dev": "environments/environment.ts", + "prod": "environments/environment.prod.ts" + } } ], "addons": [], "packages": [], "e2e": { "protractor": { - "config": "config/protractor.conf.js" + "config": "./protractor.conf.js" } }, "test": { "karma": { - "config": "config/karma.conf.js" + "config": "./karma.conf.js" } }, "defaults": { - "prefix": "docs", - "sourceDir": "src", - "styleExt": "css", + "styleExt": "scss", + "prefixInterfaces": false, "lazyRoutePrefix": "+" } } diff --git a/config/environment.js b/config/environment.js deleted file mode 100644 index 4fa28880da..0000000000 --- a/config/environment.js +++ /dev/null @@ -1,10 +0,0 @@ -/* jshint node: true */ - -module.exports = function(environment) { - return { - environment: environment, - baseURL: '/', - locationType: 'auto' - }; -}; - diff --git a/config/karma-test-shim.js b/config/karma-test-shim.js deleted file mode 100644 index 81fa4d8acb..0000000000 --- a/config/karma-test-shim.js +++ /dev/null @@ -1,55 +0,0 @@ -/*global jasmine, __karma__, window*/ -Error.stackTraceLimit = Infinity; -jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; - -__karma__.loaded = function () { -}; - -var distPath = '/base/dist/'; -var appPath = distPath + 'app/'; -var platformPath = distPath + 'platform/'; - -function isJsFile(path) { - return path.slice(-3) == '.js'; -} - -function isSpecFile(path) { - return path.slice(-8) == '.spec.js'; -} - -function isAppOrPlatformFile(path) { - return isJsFile(path) && ((path.substr(0, appPath.length) == appPath) || (path.substr(0, platformPath.length) == platformPath)); -} - -var allSpecFiles = Object.keys(window.__karma__.files) - .filter(isSpecFile) - .filter(isAppOrPlatformFile); - -// Load our SystemJS configuration. -System.config({ - baseURL: distPath -}); - -System.import('system-config.js').then(function() { - // Load and configure the TestComponentBuilder. - return Promise.all([ - System.import('@angular/core/testing'), - System.import('@angular/platform-browser-dynamic/testing') - ]).then(function (providers) { - var testing = providers[0]; - var testingBrowser = providers[1]; - - testing.TestBed.initTestEnvironment( - testingBrowser.BrowserDynamicTestingModule, - testingBrowser.platformBrowserDynamicTesting()); - }); -}).then(function() { - // Finally, load all spec files. - // This will run the tests directly. - return Promise.all( - allSpecFiles.map(function (moduleName) { - return System.import(moduleName).then(function(module) { - return module; - }); - })); -}).then(__karma__.start, __karma__.error); \ No newline at end of file diff --git a/config/karma.conf.js b/config/karma.conf.js deleted file mode 100644 index d0dd30e126..0000000000 --- a/config/karma.conf.js +++ /dev/null @@ -1,46 +0,0 @@ -module.exports = function (config) { - config.set({ - basePath: '..', - frameworks: ['jasmine'], - plugins: [ - require('karma-jasmine'), - require('karma-firefox-launcher') - ], - customLaunchers: { - // chrome setup for travis CI using chromium - Chrome_travis_ci: { - base: 'Chrome', - flags: ['--no-sandbox'] - } - }, - files: [ - { pattern: 'dist/vendor/core-js/client/core.js', included: true, watched: false}, - { pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false}, - { pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/proxy.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/sync-test.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/jasmine-patch.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/fake-async-test.js', included: true, watched: false}, - { pattern: 'dist/vendor/hammerjs/hammer.min.js', included: true, watched: false}, - - { pattern: 'config/karma-test-shim.js', included: true, watched: true }, - - // Distribution folder. - { pattern: 'dist/**/*', included: false, watched: true } - ], - exclude: [ - // Vendor packages might include spec files. We don't want to use those. - 'dist/vendor/**/*.spec.js' - ], - preprocessors: {}, - reporters: ['progress'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Firefox'], - singleRun: false - }); -}; diff --git a/config/karma.travis.conf.js b/config/karma.travis.conf.js deleted file mode 100644 index 5e4b04454c..0000000000 --- a/config/karma.travis.conf.js +++ /dev/null @@ -1,38 +0,0 @@ -module.exports = function (config) { - config.set({ - basePath: '..', - frameworks: ['jasmine'], - plugins: [ - require('karma-jasmine'), - require('karma-firefox-launcher') - ], - files: [ - { pattern: 'dist/vendor/core-js/client/core.js', included: true, watched: false}, - { pattern: 'dist/vendor/systemjs/dist/system-polyfills.js', included: true, watched: false}, - { pattern: 'dist/vendor/systemjs/dist/system.src.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/zone.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/proxy.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/sync-test.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/jasmine-patch.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/async-test.js', included: true, watched: false}, - { pattern: 'dist/vendor/zone.js/dist/fake-async-test.js', included: true, watched: false}, - { pattern: 'dist/vendor/hammerjs/hammer.min.js', included: true, watched: false}, - - { pattern: 'config/karma-test-shim.js', included: true, watched: true }, - - // Distribution folder. - { pattern: 'dist/**/*', included: false, watched: true } - ], - exclude: [ - // Vendor packages might include spec files. We don't want to use those. - 'dist/vendor/**/*.spec.js' - ], - preprocessors: {}, - reporters: ['progress'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - browsers: ['Firefox'], - singleRun: true - }); -}; diff --git a/e2e/index.e2e.ts b/e2e/index.e2e.ts index 12dfdaf878..d35588e885 100644 --- a/e2e/index.e2e.ts +++ b/e2e/index.e2e.ts @@ -1,3 +1,5 @@ +import { browser } from 'protractor/globals'; + describe('hello, protractor', function(): void { describe('index', function(): void { browser.get('/'); diff --git a/e2e/tsconfig.json b/e2e/tsconfig.json index a3baff0bca..656bdb14ff 100644 --- a/e2e/tsconfig.json +++ b/e2e/tsconfig.json @@ -6,16 +6,11 @@ "experimentalDecorators": true, "module": "commonjs", "moduleResolution": "node", - "noEmitOnError": true, - "noImplicitAny": false, - "outDir": "../dist/e2e", - "rootDir": ".", + "outDir": "../dist/out-tsc-e2e", "sourceMap": true, "target": "es5", - "inlineSources": true - }, - - "files": [ - "./typings.d.ts" - ] + "typeRoots": [ + "../node_modules/@types" + ] + } } diff --git a/e2e/typings.d.ts b/e2e/typings.d.ts deleted file mode 100644 index eebc2728b8..0000000000 --- a/e2e/typings.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000000..f7d18105f7 --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,49 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/0.13/config/configuration-file.html + +module.exports = function (config) { + var configuration = { + basePath: '.', + frameworks: ['jasmine', 'angular-cli'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-remap-istanbul'), + require('angular-cli/plugins/karma') + ], + customLaunchers: { + // chrome setup for travis CI using chromium + Chrome_travis_ci: { + base: 'Chrome', + flags: ['--no-sandbox'] + } + }, + files: [ + { pattern: './src/test.ts', watched: false } + ], + preprocessors: { + './src/test.ts': ['angular-cli'] + }, + remapIstanbulReporter: { + reports: { + html: 'coverage', + lcovonly: './coverage/coverage.lcov' + } + }, + angularCli: { + config: './angular-cli.json', + environment: 'dev' + }, + reporters: ['progress', 'karma-remap-istanbul'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: false + }; + if (process.env.TRAVIS) { + configuration.browsers = ['Chrome_travis_ci']; + } + config.set(configuration); +}; diff --git a/package.json b/package.json index 1580749332..1db1370bde 100644 --- a/package.json +++ b/package.json @@ -10,14 +10,13 @@ ], "scripts": { "e2e": "protractor", - "e2e-test": "protractor ./config/protractor.conf.js", - "tslint": "tslint -c ./tslint.json \"./src/**/*.ts\" -e \"./src/**/typings.d.ts\"", - "typings": "typings install --global", - "postinstall": "npm run typings && webdriver-manager update", + "e2e-test": "protractor ./protractor.conf.js", + "tslint": "tslint -c ./tslint.json \"./src/**/*.ts\" -e \"./src/**/typings.d.ts\" -e \"./src/environments/**\"", + "postinstall": "webdriver-manager update", "webdriver-update": "bash ./node_modules/.bin/webdriver-manager update", "pretest": "rm -rf ./dist && ng build", "test": "npm run karma", - "karma": "karma start ./config/karma.conf.js --single-run", + "karma": "karma start ./karma.conf.js --single-run", "bump-dev": "gulp bump-version", "bump-patch": "gulp bump-version --ver patch", "bump-minor": "gulp bump-version --ver minor", @@ -49,57 +48,50 @@ "Jeremy Wilken " ], "dependencies": { - "@angular/common": "^2.0.0-rc.7", - "@angular/compiler": "^2.0.0-rc.7", - "@angular/core": "^2.0.0-rc.7", - "@angular/forms": "^2.0.0-rc.7", - "@angular/http": "^2.0.0-rc.7", - "@angular/platform-browser": "^2.0.0-rc.7", - "@angular/platform-browser-dynamic": "^2.0.0-rc.7", - "@angular/platform-server": "^2.0.0-rc.7", - "@angular/router": "^3.0.0-rc.3", - "@angular2-material/button": "^2.0.0-alpha.8-1", - "@angular2-material/button-toggle": "^2.0.0-alpha.8-1", - "@angular2-material/card": "^2.0.0-alpha.8-1", - "@angular2-material/checkbox": "^2.0.0-alpha.8-1", - "@angular2-material/core": "^2.0.0-alpha.8-1", - "@angular2-material/grid-list": "^2.0.0-alpha.8-1", - "@angular2-material/icon": "^2.0.0-alpha.8-1", - "@angular2-material/input": "^2.0.0-alpha.8-1", - "@angular2-material/list": "^2.0.0-alpha.8-1", - "@angular2-material/menu": "^2.0.0-alpha.8-1", - "@angular2-material/progress-bar": "^2.0.0-alpha.8-1", - "@angular2-material/progress-circle": "^2.0.0-alpha.8-1", - "@angular2-material/radio": "^2.0.0-alpha.8-1", - "@angular2-material/sidenav": "^2.0.0-alpha.8-1", - "@angular2-material/slider": "^2.0.0-alpha.8-1", - "@angular2-material/slide-toggle": "^2.0.0-alpha.8-1", - "@angular2-material/tabs": "^2.0.0-alpha.8-1", - "@angular2-material/toolbar": "^2.0.0-alpha.8-1", - "@angular2-material/tooltip": "^2.0.0-alpha.8-1", + "@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/platform-server": "^2.0.0", + "@angular/router": "^3.0.0", + "@angular2-material/button": "^2.0.0-alpha.8-2", + "@angular2-material/button-toggle": "^2.0.0-alpha.8-2", + "@angular2-material/card": "^2.0.0-alpha.8-2", + "@angular2-material/checkbox": "^2.0.0-alpha.8-2", + "@angular2-material/core": "^2.0.0-alpha.8-2", + "@angular2-material/grid-list": "^2.0.0-alpha.8-2", + "@angular2-material/icon": "^2.0.0-alpha.8-2", + "@angular2-material/input": "^2.0.0-alpha.8-2", + "@angular2-material/list": "^2.0.0-alpha.8-2", + "@angular2-material/menu": "^2.0.0-alpha.8-2", + "@angular2-material/progress-bar": "^2.0.0-alpha.8-2", + "@angular2-material/progress-circle": "^2.0.0-alpha.8-2", + "@angular2-material/radio": "^2.0.0-alpha.8-2", + "@angular2-material/sidenav": "^2.0.0-alpha.8-2", + "@angular2-material/slide-toggle": "^2.0.0-alpha.8-2", + "@angular2-material/slider": "^2.0.0-alpha.8-2", + "@angular2-material/tabs": "^2.0.0-alpha.8-2", + "@angular2-material/toolbar": "^2.0.0-alpha.8-2", + "@angular2-material/tooltip": "^2.0.0-alpha.8-2", "core-js": "^2.4.1", - "rxjs": "5.0.0-beta.12", - "systemjs": "0.19.31", - "zone.js": "0.6.21", "hammerjs": "^2.0.8", "highlight.js": "9.6.0", - "showdown": "1.4.2" + "rxjs": "5.0.0-beta.12", + "showdown": "1.4.2", + "zone.js": "0.6.21" }, "devDependencies": { "@angular/compiler-cli": "0.6.1", - "@types/glob": "^5.0.29", - "@types/gulp": "^3.8.29", "@types/hammerjs": "^2.0.30", "@types/jasmine": "^2.2.31", - "@types/merge2": "0.0.28", - "@types/minimist": "^1.1.28", "@types/node": "^6.0.34", - "@types/protractor": "^1.5.11-alpha", - "@types/run-sequence": "0.0.27", - "@types/selenium-webdriver": "^2.44.20-alpha", - "angular-cli": "1.0.0-beta.10", - "codelyzer": "0.0.28", - "del": "2.2.0", + "@types/selenium-webdriver": "^2.52.0", + "angular-cli": "1.0.0-beta.15", + "codelyzer": "~0.0.26", + "awesome-typescript-loader": "^2.2.4", "ember-cli-inject-live-reload": "1.4.0", "glob": "^6.0.4", "gulp": "3.9.1", @@ -111,25 +103,24 @@ "gulp-typescript": "2.13.6", "gulp-util": "3.0.7", "jasmine-core": "^2.4.1", - "jasmine-spec-reporter": "2.4.0", - "karma": "^1.1.1", - "karma-chrome-launcher": "^1.0.1", + "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", "karma-firefox-launcher": "^1.0.0", - "karma-jasmine": "1.0.2", "karma-phantomjs-launcher": "1.0.1", - "merge2": "1.0.2", - "minimist": "1.2.0", "node-sass": "3.8.0", "phantomjs-prebuilt": "2.1.7", "protractor": "4.0.7", - "require-dir": "0.3.0", "rollup": "^0.35.9", "rollup-plugin-commonjs": "4.1.0", "rollup-plugin-node-resolve": "2.0.0", + "sass-loader": "^4.0.2", "semver": "5.2.0", - "ts-node": "0.9.3", + "ts-node": "1.2.1", "tslint": "^3.15.1", - "typescript": "^2.0.2", - "typings": "1.3.3" + "typescript": "2.0.2" } } diff --git a/config/protractor.conf.js b/protractor.conf.js similarity index 70% rename from config/protractor.conf.js rename to protractor.conf.js index 6a42ddae16..d18cc5908a 100644 --- a/config/protractor.conf.js +++ b/protractor.conf.js @@ -1,10 +1,13 @@ +// Protractor configuration file, see link for more information +// https://github.com/angular/protractor/blob/master/docs/referenceConf.js + /*global jasmine */ var SpecReporter = require('jasmine-spec-reporter'); exports.config = { - allScriptsTimeout: 15000, + allScriptsTimeout: 11000, specs: [ - '../e2e/**/*.e2e.ts' + './e2e/**/*.e2e.ts' ], capabilities: { 'browserName': 'chrome' @@ -14,7 +17,7 @@ exports.config = { framework: 'jasmine', jasmineNodeOpts: { showColors: true, - defaultTimeoutInterval: 40000, + defaultTimeoutInterval: 30000, print: function() {} }, useAllAngular2AppRoots: true, diff --git a/src/app/app.component.scss b/src/app/app.component.scss index ff6a53a451..cab7278adc 100644 --- a/src/app/app.component.scss +++ b/src/app/app.component.scss @@ -143,4 +143,30 @@ $md-warn: #C62828; } } } + a[md-icon-button] { + line-height: 36px; + } + .md-tab-label { + flex-grow: 1; + } + /* md-hint styles were missing from material2 */ + md-hint { + position: absolute; + font-size: 75%; + bottom: -0.5em; + + &.md-right { + right: 0; + } + + [dir='rtl'] & { + right: 0; + left: auto; + + &.md-right { + right: auto; + left: 0; + } + } + } } \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index c5856fefd2..93dcf1706d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,10 +1,9 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-covalent', - styleUrls: ['app.component.css'], templateUrl: 'app.component.html', + styleUrls: ['app.component.scss'], }) export class DocsAppComponent { diff --git a/src/app/assets/icons/github.svg b/src/app/assets/icons/github.svg new file mode 100644 index 0000000000..f3271048a3 --- /dev/null +++ b/src/app/assets/icons/github.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/app/components/components/chips/chips.component.ts b/src/app/components/components/chips/chips.component.ts index 53c6d6b047..23c8820e4b 100644 --- a/src/app/components/components/chips/chips.component.ts +++ b/src/app/components/components/chips/chips.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'chips-demo', - styleUrls: ['chips.component.css'], + styleUrls: ['chips.component.scss'], templateUrl: 'chips.component.html', }) export class ChipsDemoComponent { diff --git a/src/app/components/components/components.component.ts b/src/app/components/components/components.component.ts index a051d179f5..e239435098 100644 --- a/src/app/components/components/components.component.ts +++ b/src/app/components/components/components.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'app-components', - styleUrls: ['components.component.css'], + styleUrls: ['components.component.scss'], templateUrl: 'components.component.html', }) export class ComponentsComponent { diff --git a/src/app/components/components/expansion-panel/expansion-panel.component.ts b/src/app/components/components/expansion-panel/expansion-panel.component.ts index 977bfb84dc..8d98f0cdc7 100644 --- a/src/app/components/components/expansion-panel/expansion-panel.component.ts +++ b/src/app/components/components/expansion-panel/expansion-panel.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'expansion-panel-demo', - styleUrls: ['expansion-panel.component.css'], + styleUrls: ['expansion-panel.component.scss'], templateUrl: 'expansion-panel.component.html', }) export class ExpansionPanelDemoComponent { @@ -21,7 +20,7 @@ export class ExpansionPanelDemoComponent { name: 'expand?', type: 'boolean', }, { - description: `Hides icon and disables header, blocks click event and sets [TdExpansionPanelComponent] + description: `Hides icon and disables header, blocks click event and sets [TdExpansionPanelComponent] to collapse if "true".`, name: 'disabled?', type: 'boolean', diff --git a/src/app/components/components/file-upload/file-upload.component.ts b/src/app/components/components/file-upload/file-upload.component.ts index e60916a536..51e3174889 100644 --- a/src/app/components/components/file-upload/file-upload.component.ts +++ b/src/app/components/components/file-upload/file-upload.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'file-upload-demo', - styleUrls: ['file-upload.component.css'], + styleUrls: ['file-upload.component.scss'], templateUrl: 'file-upload.component.html', }) export class FileUploadDemoComponent { @@ -13,7 +12,7 @@ export class FileUploadDemoComponent { name: 'multiple?', type: 'boolean', }, { - description: `Sets files accepted when opening the file browser dialog. + description: `Sets files accepted when opening the file browser dialog. Same as "accept" attribute in element.`, name: 'accept?', type: 'string', @@ -40,19 +39,19 @@ export class FileUploadDemoComponent { }]; selectDirectiveAttrs: Object[] = [{ - description: `Sets whether multiple files can be selected at once in host element, or just a single file. + description: `Sets whether multiple files can be selected at once in host element, or just a single file. Can also be "multiple" native attribute.`, name: 'multiple?', type: 'boolean', }, { - description: `Event emitted when a file or files are selected in host [HTMLInputElement]. + description: `Event emitted when a file or files are selected in host [HTMLInputElement]. Emits a [FileList | File] object. Alternative to not use [(ngModel)].`, name: 'fileSelect?', type: 'function($event)', }]; dropDirectiveAttrs: Object[] = [{ - description: `Sets whether multiple files can be dropped at once in host element, or just a single file. + description: `Sets whether multiple files can be dropped at once in host element, or just a single file. Can also be "multiple" native attribute.`, name: 'multiple?', type: 'boolean', @@ -61,14 +60,14 @@ export class FileUploadDemoComponent { name: 'disabled?', type: 'boolean', }, { - description: `Event emitted when a file or files are dropped in host element after being validated. + description: `Event emitted when a file or files are dropped in host element after being validated. Emits a [FileList | File] object.`, name: 'fileDrop?', type: 'function($event)', }]; uploadServiceMethods: Object[] = [{ - description: `Uses underlying [XMLHttpRequest] to upload a file to a url. + description: `Uses underlying [XMLHttpRequest] to upload a file to a url. Will be depricated when angular2 fixes [Http] to allow [FormData] as body.`, name: 'upload', type: 'function(IUploadOptions)', diff --git a/src/app/components/components/highlight/highlight.component.ts b/src/app/components/components/highlight/highlight.component.ts index 25b535c986..ad3d4ee972 100644 --- a/src/app/components/components/highlight/highlight.component.ts +++ b/src/app/components/components/highlight/highlight.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'highlight-demo', - styleUrls: ['highlight.component.css'], + styleUrls: ['highlight.component.scss'], templateUrl: 'highlight.component.html', }) export class HighlightDemoComponent { diff --git a/src/app/components/components/http/http.component.ts b/src/app/components/components/http/http.component.ts index d580348fd6..fb7562ae54 100644 --- a/src/app/components/components/http/http.component.ts +++ b/src/app/components/components/http/http.component.ts @@ -1,40 +1,39 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'http-demo', - styleUrls: [ 'http.component.css' ], + styleUrls: [ 'http.component.scss' ], templateUrl: 'http.component.html', }) export class HttpDemoComponent { interceptorServiceMethods: Object[] = [{ - description: `Uses underlying ng2 [http] to request a DELETE method to a URL, + description: `Uses underlying ng2 [http] to request a DELETE method to a URL, executing the interceptors as part of the request pipeline.`, name: 'delete', type: 'function(url: string, options: RequestOptionsArgs)', }, { - description: `Uses underlying ng2 [http] to request a GET method to a URL, + description: `Uses underlying ng2 [http] to request a GET method to a URL, executing the interceptors as part of the request pipeline.`, name: 'get', type: 'function(url: string, options: RequestOptionsArgs)', }, { - description: `Uses underlying ng2 [http] to request a HEAD method to a URL, + description: `Uses underlying ng2 [http] to request a HEAD method to a URL, executing the interceptors as part of the request pipeline.`, name: 'head', type: 'function(url: string, options: RequestOptionsArgs)', }, { - description: `Uses underlying ng2 [http] to request a PATCH method to a URL, + description: `Uses underlying ng2 [http] to request a PATCH method to a URL, executing the interceptors as part of the request pipeline.`, name: 'patch', type: 'function(url: string, data: any, options: RequestOptionsArgs)', }, { - description: `Uses underlying ng2 [http] to request a POST method to a URL, + description: `Uses underlying ng2 [http] to request a POST method to a URL, executing the interceptors as part of the request pipeline.`, name: 'post', type: 'function(url: string, data: any, options: RequestOptionsArgs)', }, { - description: `Uses underlying ng2 [http] to request a PUT method to a URL, + description: `Uses underlying ng2 [http] to request a PUT method to a URL, executing the interceptors as part of the request pipeline.`, name: 'put', type: 'function(url: string, data: any, options: RequestOptionsArgs)', diff --git a/src/app/components/components/json-formatter/json-formatter.component.ts b/src/app/components/components/json-formatter/json-formatter.component.ts index 0afba9cd94..37c294f9ef 100644 --- a/src/app/components/components/json-formatter/json-formatter.component.ts +++ b/src/app/components/components/json-formatter/json-formatter.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'json-formatter-demo', - styleUrls: ['json-formatter.component.css'], + styleUrls: ['json-formatter.component.scss'], templateUrl: 'json-formatter.component.html', }) export class JsonFormatterDemoComponent { diff --git a/src/app/components/components/loading/loading.component.ts b/src/app/components/components/loading/loading.component.ts index f77f78fc7c..56965f55a9 100644 --- a/src/app/components/components/loading/loading.component.ts +++ b/src/app/components/components/loading/loading.component.ts @@ -3,9 +3,8 @@ import { Component, ViewContainerRef, AfterViewInit } from '@angular/core'; import { TdLoadingService, ILoadingOptions, LoadingType, LoadingMode } from '../../../../platform/core'; @Component({ - moduleId: module.id, selector: 'loading-demo', - styleUrls: [ 'loading.component.css' ], + styleUrls: [ 'loading.component.scss' ], templateUrl: 'loading.component.html', }) export class LoadingDemoComponent implements AfterViewInit { diff --git a/src/app/components/components/markdown/markdown.component.ts b/src/app/components/components/markdown/markdown.component.ts index 54f4788486..51f8c19824 100644 --- a/src/app/components/components/markdown/markdown.component.ts +++ b/src/app/components/components/markdown/markdown.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'markdown-demo', - styleUrls: ['markdown.component.css'], + styleUrls: ['markdown.component.scss'], templateUrl: 'markdown.component.html', }) export class MarkdownDemoComponent { diff --git a/src/app/components/components/media/media.component.ts b/src/app/components/components/media/media.component.ts index 694a3f5675..221cc3542a 100644 --- a/src/app/components/components/media/media.component.ts +++ b/src/app/components/components/media/media.component.ts @@ -4,9 +4,8 @@ import { Subscription } from 'rxjs/Subscription'; import { TdMediaService } from '../../../../platform/core'; @Component({ - moduleId: module.id, selector: 'media-demo', - styleUrls: [ 'media.component.css' ], + styleUrls: [ 'media.component.scss' ], templateUrl: 'media.component.html', }) export class MediaDemoComponent implements OnInit, OnDestroy { @@ -58,12 +57,12 @@ export class MediaDemoComponent implements OnInit, OnDestroy { }]; mediaServiceMethods: Object[] = [{ - description: `Used to evaluate whether a given media query is true or false given the + description: `Used to evaluate whether a given media query is true or false given the current device's screen / window size.`, name: 'query', type: 'function(query: string)', }, { - description: `Registers a media query and returns an [Observable] that will re-evaluate and + description: `Registers a media query and returns an [Observable] that will re-evaluate and return if the given media query matches on window resize.`, name: 'registerQuery', type: 'function(query: string)', diff --git a/src/app/components/components/overview/overview.component.ts b/src/app/components/components/overview/overview.component.ts index 33f32b3f39..b5bb3b10e4 100644 --- a/src/app/components/components/overview/overview.component.ts +++ b/src/app/components/components/overview/overview.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'components-overview', - styleUrls: ['overview.component.css'], + styleUrls: ['overview.component.scss'], templateUrl: 'overview.component.html', }) export class ComponentsOverviewComponent { diff --git a/src/app/components/components/pipes/pipes.component.ts b/src/app/components/components/pipes/pipes.component.ts index b142c4792c..3871ed7634 100644 --- a/src/app/components/components/pipes/pipes.component.ts +++ b/src/app/components/components/pipes/pipes.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'pipes-demo', - styleUrls: [ 'pipes.component.css' ], + styleUrls: [ 'pipes.component.scss' ], templateUrl: 'pipes.component.html', }) export class PipesComponent { diff --git a/src/app/components/components/steps/steps.component.ts b/src/app/components/components/steps/steps.component.ts index 325eab372a..8b5e260125 100644 --- a/src/app/components/components/steps/steps.component.ts +++ b/src/app/components/components/steps/steps.component.ts @@ -3,9 +3,8 @@ import { Component } from '@angular/core'; import { StepState, IStepChangeEvent } from '../../../../platform/core'; @Component({ - moduleId: module.id, selector: 'steps-demo', - styleUrls: [ 'steps.component.css' ], + styleUrls: [ 'steps.component.scss' ], templateUrl: 'steps.component.html', }) export class StepsDemoComponent { diff --git a/src/app/components/docs/angular-2/angular-2.component.ts b/src/app/components/docs/angular-2/angular-2.component.ts index bf519cf312..f7310c3bf9 100644 --- a/src/app/components/docs/angular-2/angular-2.component.ts +++ b/src/app/components/docs/angular-2/angular-2.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-angular-2', - styleUrls: ['angular-2.component.css'], + styleUrls: ['angular-2.component.scss'], templateUrl: 'angular-2.component.html', }) export class Angular2Component { diff --git a/src/app/components/docs/angular-material/angular-material.component.ts b/src/app/components/docs/angular-material/angular-material.component.ts index 3e16c07e34..c75c353fe3 100644 --- a/src/app/components/docs/angular-material/angular-material.component.ts +++ b/src/app/components/docs/angular-material/angular-material.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-angular-material', - styleUrls: ['angular-material.component.css'], + styleUrls: ['angular-material.component.scss'], templateUrl: 'angular-material.component.html', }) export class AngularMaterialComponent { diff --git a/src/app/components/docs/build-tasks/build-tasks.component.ts b/src/app/components/docs/build-tasks/build-tasks.component.ts index 0f7370bb96..06a7c42bf3 100644 --- a/src/app/components/docs/build-tasks/build-tasks.component.ts +++ b/src/app/components/docs/build-tasks/build-tasks.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-build-tasks', - styleUrls: ['build-tasks.component.css'], + styleUrls: ['build-tasks.component.scss'], templateUrl: 'build-tasks.component.html', }) export class BuildTasksComponent { diff --git a/src/app/components/docs/creating/creating.component.ts b/src/app/components/docs/creating/creating.component.ts index 78145a6dc4..60d4b89025 100644 --- a/src/app/components/docs/creating/creating.component.ts +++ b/src/app/components/docs/creating/creating.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-creating', - styleUrls: ['creating.component.css'], + styleUrls: ['creating.component.scss'], templateUrl: 'creating.component.html', }) export class CreatingComponent { diff --git a/src/app/components/docs/deployment/deployment.component.ts b/src/app/components/docs/deployment/deployment.component.ts index 9020e66d45..ab6bab4587 100644 --- a/src/app/components/docs/deployment/deployment.component.ts +++ b/src/app/components/docs/deployment/deployment.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-deployment', - styleUrls: ['deployment.component.css'], + styleUrls: ['deployment.component.scss'], templateUrl: 'deployment.component.html', }) export class DeploymentComponent { diff --git a/src/app/components/docs/docs.component.ts b/src/app/components/docs/docs.component.ts index 493fe41d68..cfca406e3d 100644 --- a/src/app/components/docs/docs.component.ts +++ b/src/app/components/docs/docs.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'app-docs', - styleUrls: ['docs.component.css'], + styleUrls: ['docs.component.scss'], templateUrl: 'docs.component.html', }) export class DocsComponent { diff --git a/src/app/components/docs/icons/icons.component.ts b/src/app/components/docs/icons/icons.component.ts index daf3cc5e46..a85252be60 100644 --- a/src/app/components/docs/icons/icons.component.ts +++ b/src/app/components/docs/icons/icons.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-icons', - styleUrls: ['icons.component.css'], + styleUrls: ['icons.component.scss'], templateUrl: 'icons.component.html', }) export class IconsComponent { diff --git a/src/app/components/docs/mock-data/mock-data.component.ts b/src/app/components/docs/mock-data/mock-data.component.ts index 9d4e440f3c..a7d8b16d1f 100644 --- a/src/app/components/docs/mock-data/mock-data.component.ts +++ b/src/app/components/docs/mock-data/mock-data.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-mock-data', - styleUrls: ['mock-data.component.css'], + styleUrls: ['mock-data.component.scss'], templateUrl: 'mock-data.component.html', }) export class MockDataComponent { diff --git a/src/app/components/docs/overview/overview.component.ts b/src/app/components/docs/overview/overview.component.ts index d8b8d7f112..40bf09b4cc 100644 --- a/src/app/components/docs/overview/overview.component.ts +++ b/src/app/components/docs/overview/overview.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-overview', - styleUrls: ['overview.component.css'], + styleUrls: ['overview.component.scss'], templateUrl: 'overview.component.html', }) export class DocsOverviewComponent { diff --git a/src/app/components/docs/testing/testing.component.ts b/src/app/components/docs/testing/testing.component.ts index 96a7a01b67..16ad1f2e2a 100644 --- a/src/app/components/docs/testing/testing.component.ts +++ b/src/app/components/docs/testing/testing.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-testing', - styleUrls: ['testing.component.css'], + styleUrls: ['testing.component.scss'], templateUrl: 'testing.component.html', }) export class TestingComponent { diff --git a/src/app/components/docs/theme/theme.component.ts b/src/app/components/docs/theme/theme.component.ts index d78b627005..c621316e4a 100644 --- a/src/app/components/docs/theme/theme.component.ts +++ b/src/app/components/docs/theme/theme.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'docs-theme', templateUrl: 'theme.component.html', - styleUrls: ['theme.component.css'], + styleUrls: ['theme.component.scss'], }) export class ThemeComponent {} diff --git a/src/app/components/home/home.component.html b/src/app/components/home/home.component.html index e4c49caa4e..4c0afa8fcf 100644 --- a/src/app/components/home/home.component.html +++ b/src/app/components/home/home.component.html @@ -1,4 +1,10 @@ - + +
+ Covalent + + flash_on + +
@@ -37,8 +43,8 @@

{{item.title}}

- Contact Teradata UX - Report Bug or Request Feature + Gitter Chat + Bug or Feature Request

FAQs

diff --git a/src/app/components/home/home.component.ts b/src/app/components/home/home.component.ts index cc7ef69812..b7c8da8b36 100644 --- a/src/app/components/home/home.component.ts +++ b/src/app/components/home/home.component.ts @@ -1,10 +1,9 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'app-home', - styleUrls: ['home.component.css'], templateUrl: 'home.component.html', + styleUrls: ['home.component.scss'], }) export class HomeComponent { diff --git a/src/app/components/layouts/card-over/card-over.component.ts b/src/app/components/layouts/card-over/card-over.component.ts index 1d354dfe90..0599837f96 100644 --- a/src/app/components/layouts/card-over/card-over.component.ts +++ b/src/app/components/layouts/card-over/card-over.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'layouts-card-over', - styleUrls: ['card-over.component.css'], + styleUrls: ['card-over.component.scss'], templateUrl: 'card-over.component.html', }) export class CardOverComponent { diff --git a/src/app/components/layouts/layouts.component.ts b/src/app/components/layouts/layouts.component.ts index 6c8c5801d7..6c1937ace0 100644 --- a/src/app/components/layouts/layouts.component.ts +++ b/src/app/components/layouts/layouts.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'app-layouts', - styleUrls: ['layouts.component.css'], + styleUrls: ['layouts.component.scss'], templateUrl: 'layouts.component.html', }) export class LayoutsComponent { diff --git a/src/app/components/layouts/manage-list/manage-list.component.ts b/src/app/components/layouts/manage-list/manage-list.component.ts index 547e65ca8d..0394b88ad4 100644 --- a/src/app/components/layouts/manage-list/manage-list.component.ts +++ b/src/app/components/layouts/manage-list/manage-list.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'layouts-manage-list', - styleUrls: ['manage-list.component.css'], + styleUrls: ['manage-list.component.scss'], templateUrl: 'manage-list.component.html', }) export class ManageListComponent { diff --git a/src/app/components/layouts/nav-list/nav-list.component.ts b/src/app/components/layouts/nav-list/nav-list.component.ts index b7fe9aec40..598766775d 100644 --- a/src/app/components/layouts/nav-list/nav-list.component.ts +++ b/src/app/components/layouts/nav-list/nav-list.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'layouts-nav-list', - styleUrls: ['nav-list.component.css'], + styleUrls: ['nav-list.component.scss'], templateUrl: 'nav-list.component.html', }) export class NavListComponent { diff --git a/src/app/components/layouts/nav-view/nav-view.component.ts b/src/app/components/layouts/nav-view/nav-view.component.ts index 6915b6c506..f7e25e4147 100644 --- a/src/app/components/layouts/nav-view/nav-view.component.ts +++ b/src/app/components/layouts/nav-view/nav-view.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'layouts-nav-view', - styleUrls: ['nav-view.component.css'], + styleUrls: ['nav-view.component.scss'], templateUrl: 'nav-view.component.html', }) export class NavViewComponent { diff --git a/src/app/components/layouts/overview/overview.component.ts b/src/app/components/layouts/overview/overview.component.ts index 94cef3b023..b6ee36cca1 100644 --- a/src/app/components/layouts/overview/overview.component.ts +++ b/src/app/components/layouts/overview/overview.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'layouts-overview', - styleUrls: ['overview.component.css'], + styleUrls: ['overview.component.scss'], templateUrl: 'overview.component.html', }) export class LayoutsOverviewComponent { diff --git a/src/app/components/style-guide/cards/cards.component.ts b/src/app/components/style-guide/cards/cards.component.ts index ed655aadfd..e45a18f9f8 100644 --- a/src/app/components/style-guide/cards/cards.component.ts +++ b/src/app/components/style-guide/cards/cards.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'design-patterns-cards', - styleUrls: ['cards.component.css'], + styleUrls: ['cards.component.scss'], templateUrl: 'cards.component.html', }) export class CardsComponent { diff --git a/src/app/components/style-guide/colors/colors.component.ts b/src/app/components/style-guide/colors/colors.component.ts index 0eb1447867..df579f6934 100644 --- a/src/app/components/style-guide/colors/colors.component.ts +++ b/src/app/components/style-guide/colors/colors.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'style-guide-colors', - styleUrls: ['colors.component.css'], + styleUrls: ['colors.component.scss'], templateUrl: 'colors.component.html', }) export class ColorsComponent { diff --git a/src/app/components/style-guide/iconography/iconography.component.ts b/src/app/components/style-guide/iconography/iconography.component.ts index bee5f60043..8e3346a72e 100644 --- a/src/app/components/style-guide/iconography/iconography.component.ts +++ b/src/app/components/style-guide/iconography/iconography.component.ts @@ -1,9 +1,8 @@ import { Component, OnInit } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'style-guide-iconography', - styleUrls: ['iconography.component.css'], + styleUrls: ['iconography.component.scss'], templateUrl: 'iconography.component.html', }) export class IconographyComponent implements OnInit { diff --git a/src/app/components/style-guide/logo/logo.component.ts b/src/app/components/style-guide/logo/logo.component.ts index d87cc4b478..2cf0c236fb 100644 --- a/src/app/components/style-guide/logo/logo.component.ts +++ b/src/app/components/style-guide/logo/logo.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'style-guide-logo', - styleUrls: ['logo.component.css'], + styleUrls: ['logo.component.scss'], templateUrl: 'logo.component.html', }) export class LogoComponent { diff --git a/src/app/components/style-guide/material-components/material-components.component.html b/src/app/components/style-guide/material-components/material-components.component.html index ccba5455dc..5ded7b83d9 100644 --- a/src/app/components/style-guide/material-components/material-components.component.html +++ b/src/app/components/style-guide/material-components/material-components.component.html @@ -161,8 +161,8 @@

Basic Usage

Usage within Forms

- - I have read and agree to the terms of service. + + I agree to the terms
diff --git a/src/app/components/style-guide/material-components/material-components.component.ts b/src/app/components/style-guide/material-components/material-components.component.ts index b6ae2052d2..c48826d33e 100644 --- a/src/app/components/style-guide/material-components/material-components.component.ts +++ b/src/app/components/style-guide/material-components/material-components.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'design-patterns-material-components', - styleUrls: ['material-components.component.css'], + styleUrls: ['material-components.component.scss'], templateUrl: 'material-components.component.html', }) export class MaterialComponentsComponent { diff --git a/src/app/components/style-guide/product-icons/product-icons.component.ts b/src/app/components/style-guide/product-icons/product-icons.component.ts index 1148927415..1ed2a89d15 100644 --- a/src/app/components/style-guide/product-icons/product-icons.component.ts +++ b/src/app/components/style-guide/product-icons/product-icons.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'style-guide-product-icons', - styleUrls: ['product-icons.component.css'], + styleUrls: ['product-icons.component.scss'], templateUrl: 'product-icons.component.html', }) export class ProductIconsComponent { diff --git a/src/app/components/style-guide/resources/resources.component.ts b/src/app/components/style-guide/resources/resources.component.ts index 7af678da2c..37306dd6b8 100644 --- a/src/app/components/style-guide/resources/resources.component.ts +++ b/src/app/components/style-guide/resources/resources.component.ts @@ -1,10 +1,9 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'style-guide-resources', templateUrl: 'resources.component.html', - styleUrls: ['resources.component.css'], + styleUrls: ['resources.component.scss'], }) export class ResourcesComponent { diff --git a/src/app/components/style-guide/style-guide.component.ts b/src/app/components/style-guide/style-guide.component.ts index b713e65845..1c3ef9e3d2 100644 --- a/src/app/components/style-guide/style-guide.component.ts +++ b/src/app/components/style-guide/style-guide.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'app-style-guide', - styleUrls: ['style-guide.component.css'], + styleUrls: ['style-guide.component.scss'], templateUrl: 'style-guide.component.html', }) export class StyleGuideComponent { diff --git a/src/app/components/style-guide/typography/typography.component.ts b/src/app/components/style-guide/typography/typography.component.ts index f50a40ba1f..856a9c8e26 100644 --- a/src/app/components/style-guide/typography/typography.component.ts +++ b/src/app/components/style-guide/typography/typography.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'style-guide-typography', - styleUrls: ['typography.component.css'], + styleUrls: ['typography.component.scss'], templateUrl: 'typography.component.html', }) export class TypographyComponent { diff --git a/src/app/components/style-guide/utility-styles/utility-styles.component.ts b/src/app/components/style-guide/utility-styles/utility-styles.component.ts index b4ee6c786b..e650037d1a 100644 --- a/src/app/components/style-guide/utility-styles/utility-styles.component.ts +++ b/src/app/components/style-guide/utility-styles/utility-styles.component.ts @@ -1,10 +1,9 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'utility-styles', templateUrl: 'utility-styles.component.html', - styleUrls: ['utility-styles.component.css'], + styleUrls: ['utility-styles.component.scss'], }) export class UtilityStylesComponent { diff --git a/src/app/index.ts b/src/app/index.ts index cbc6df0a4f..0c89d7a06c 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -1,3 +1,2 @@ -export { environment } from './environment'; export { DocsAppComponent } from './app.component'; export { AppModule } from './app.module'; diff --git a/config/environment.prod.ts b/src/environments/environment.prod.ts similarity index 61% rename from config/environment.prod.ts rename to src/environments/environment.prod.ts index 3612073bc3..c9669790be 100644 --- a/config/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,3 +1,3 @@ export const environment = { - production: true + production: true, }; diff --git a/config/environment.dev.ts b/src/environments/environment.ts similarity index 60% rename from config/environment.dev.ts rename to src/environments/environment.ts index ffe8aed766..a20cfe5573 100644 --- a/config/environment.dev.ts +++ b/src/environments/environment.ts @@ -1,3 +1,3 @@ export const environment = { - production: false + production: false, }; diff --git a/src/index.html b/src/index.html index 5ee95a7066..d8c32305f1 100644 --- a/src/index.html +++ b/src/index.html @@ -5,36 +5,10 @@ Teradata Covalent - Angular Material Design UI Platform - - - - - + Loading... - - - - - - - - diff --git a/src/main.ts b/src/main.ts index eefe79a135..5c3c520409 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,11 +1,12 @@ -import { enableProdMode } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import './polyfills.ts'; -import { environment, AppModule } from './app/'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; +import { enableProdMode } from '@angular/core'; +import { environment } from './environments/environment'; +import { AppModule } from './app/'; if (environment.production) { enableProdMode(); } -// JIT compile long form platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/src/platform/chips/autocomplete/autocomplete.component.ts b/src/platform/chips/autocomplete/autocomplete.component.ts index 417415b361..8127d1c868 100644 --- a/src/platform/chips/autocomplete/autocomplete.component.ts +++ b/src/platform/chips/autocomplete/autocomplete.component.ts @@ -14,9 +14,8 @@ export const TD_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR: any = { @Component({ providers: [ TD_AUTOCOMPLETE_CONTROL_VALUE_ACCESSOR ], - moduleId: module.id, selector: 'td-autocomplete', - styleUrls: [ 'autocomplete.component.css' ], + styleUrls: [ 'autocomplete.component.scss' ], templateUrl: 'autocomplete.component.html', }) export class TdAutoCompleteComponent implements ControlValueAccessor { diff --git a/src/platform/chips/chip.component.ts b/src/platform/chips/chip.component.ts index 650e163764..9b897c152c 100644 --- a/src/platform/chips/chip.component.ts +++ b/src/platform/chips/chip.component.ts @@ -1,9 +1,8 @@ import { Component } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'td-chip', - styleUrls: [ 'chip.component.css' ], + styleUrls: [ 'chip.component.scss' ], templateUrl: 'chip.component.html', }) export class TdChipComponent { diff --git a/src/platform/chips/chips.component.ts b/src/platform/chips/chips.component.ts index c76c7daffc..7d26a9709f 100644 --- a/src/platform/chips/chips.component.ts +++ b/src/platform/chips/chips.component.ts @@ -14,9 +14,8 @@ export const TD_CHIPS_CONTROL_VALUE_ACCESSOR: any = { @Component({ providers: [ TD_CHIPS_CONTROL_VALUE_ACCESSOR ], - moduleId: module.id, selector: 'td-chips', - styleUrls: [ 'chips.component.css' ], + styleUrls: [ 'chips.component.scss' ], templateUrl: 'chips.component.html', }) export class TdChipsComponent implements ControlValueAccessor, DoCheck { diff --git a/src/platform/core/expansion-panel/expansion-panel.component.ts b/src/platform/core/expansion-panel/expansion-panel.component.ts index f6913aadc9..8dc42c90df 100644 --- a/src/platform/core/expansion-panel/expansion-panel.component.ts +++ b/src/platform/core/expansion-panel/expansion-panel.component.ts @@ -2,16 +2,14 @@ import { Component, Input, Output } from '@angular/core'; import { EventEmitter } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'td-expansion-summary', template: '', }) export class TdExpansionPanelSummaryComponent {} @Component({ - moduleId: module.id, selector: 'td-expansion-panel', - styleUrls: [ 'expansion-panel.component.css' ], + styleUrls: [ 'expansion-panel.component.scss' ], templateUrl: 'expansion-panel.component.html', }) export class TdExpansionPanelComponent { @@ -80,7 +78,7 @@ export class TdExpansionPanelComponent { }; /** - * Method to change expand state internally and emit the [onExpanded] event if 'true' or [onCollapsed] + * Method to change expand state internally and emit the [onExpanded] event if 'true' or [onCollapsed] * event if 'false'. (Blocked if [disabled] is 'true') */ private _setExpand(newExpand: boolean): void { diff --git a/src/platform/core/layout/layout-card-over/layout-card-over.component.ts b/src/platform/core/layout/layout-card-over/layout-card-over.component.ts index 587609af34..626e6eabf2 100644 --- a/src/platform/core/layout/layout-card-over/layout-card-over.component.ts +++ b/src/platform/core/layout/layout-card-over/layout-card-over.component.ts @@ -2,9 +2,8 @@ import { Component } from '@angular/core'; import { Input } from '@angular/core'; @Component({ - moduleId: module.id, selector: 'td-layout-card-over', - styleUrls: [ 'layout-card-over.component.css' ], + styleUrls: [ 'layout-card-over.component.scss' ], templateUrl: 'layout-card-over.component.html', }) export class TdLayoutCardOverComponent { diff --git a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts index d426a79c2c..7d8abe5403 100644 --- a/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts +++ b/src/platform/core/layout/layout-manage-list/layout-manage-list.component.ts @@ -7,9 +7,8 @@ import { MdSidenav } from '@angular2-material/sidenav'; import { TdLayoutService } from '../services/layout.service'; @Component({ - moduleId: module.id, selector: 'td-layout-manage-list', - styleUrls: [ 'layout-manage-list.component.css' ], + styleUrls: [ 'layout-manage-list.component.scss' ], templateUrl: 'layout-manage-list.component.html', }) export class TdLayoutManageListComponent { diff --git a/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts b/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts index d0ca271232..107c2f1c5a 100644 --- a/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts +++ b/src/platform/core/layout/layout-nav-list/layout-nav-list.component.ts @@ -7,9 +7,8 @@ import { MdSidenav } from '@angular2-material/sidenav'; import { TdLayoutService } from '../services/layout.service'; @Component({ - moduleId: module.id, selector: 'td-layout-nav-list', - styleUrls: [ 'layout-nav-list.component.css' ], + styleUrls: [ 'layout-nav-list.component.scss' ], templateUrl: 'layout-nav-list.component.html', }) export class TdLayoutNavListComponent { diff --git a/src/platform/core/layout/layout-nav/layout-nav.component.ts b/src/platform/core/layout/layout-nav/layout-nav.component.ts index 9245e63434..a03b9b0513 100644 --- a/src/platform/core/layout/layout-nav/layout-nav.component.ts +++ b/src/platform/core/layout/layout-nav/layout-nav.component.ts @@ -4,9 +4,8 @@ import { Input, Output, EventEmitter } from '@angular/core'; import { TdLayoutService } from '../services/layout.service'; @Component({ - moduleId: module.id, selector: 'td-layout-nav', - styleUrls: [ 'layout-nav.component.css' ], + styleUrls: [ 'layout-nav.component.scss' ], templateUrl: 'layout-nav.component.html', }) export class TdLayoutNavComponent { diff --git a/src/platform/core/layout/layout.component.ts b/src/platform/core/layout/layout.component.ts index 9b89988d10..ed0742d71a 100644 --- a/src/platform/core/layout/layout.component.ts +++ b/src/platform/core/layout/layout.component.ts @@ -8,10 +8,9 @@ import { MdSidenav } from '@angular2-material/sidenav'; import { TdLayoutService } from './services/layout.service'; @Component({ - moduleId: module.id, providers: [ TdLayoutService ], selector: 'td-layout', - styleUrls: [ 'layout.component.css' ], + styleUrls: [ 'layout.component.scss' ], templateUrl: 'layout.component.html', }) export class TdLayoutComponent implements OnDestroy, AfterViewInit { diff --git a/src/platform/core/loading/loading.component.ts b/src/platform/core/loading/loading.component.ts index 56473fbf8b..1dd3f7484b 100644 --- a/src/platform/core/loading/loading.component.ts +++ b/src/platform/core/loading/loading.component.ts @@ -13,9 +13,8 @@ export enum LoadingMode { } @Component({ - moduleId: module.id, selector: 'td-loading', - styleUrls: [ 'loading.component.css' ], + styleUrls: [ 'loading.component.scss' ], templateUrl: 'loading.component.html', }) export class TdLoadingComponent { diff --git a/src/platform/core/steps/step.component.ts b/src/platform/core/steps/step.component.ts index bba479bbdc..ce8b23e91c 100644 --- a/src/platform/core/steps/step.component.ts +++ b/src/platform/core/steps/step.component.ts @@ -8,23 +8,21 @@ export enum StepState { } @Component({ - moduleId: module.id, selector: 'td-step-actions', template: '', }) export class TdStepActionsComponent {} @Component({ - moduleId: module.id, selector: 'td-step-summary', template: '', }) export class TdStepSummaryComponent {} @Component({ - moduleId: module.id, + selector: 'td-step', - styleUrls: [ 'step.component.css' ], + styleUrls: [ 'step.component.scss' ], templateUrl: 'step.component.html', }) export class TdStepComponent { @@ -159,7 +157,7 @@ export class TdStepComponent { }; /** - * Method to change active state internally and emit the [onActivated] event if 'true' or [onDeactivated] + * Method to change active state internally and emit the [onActivated] event if 'true' or [onDeactivated] * event if 'false'. (Blocked if [disabled] is 'true') * returns true if successfully changed state */ diff --git a/src/platform/core/steps/steps.component.ts b/src/platform/core/steps/steps.component.ts index 0dc3d3968b..a63b63f81f 100644 --- a/src/platform/core/steps/steps.component.ts +++ b/src/platform/core/steps/steps.component.ts @@ -11,9 +11,8 @@ export interface IStepChangeEvent { } @Component({ - moduleId: module.id, selector: 'td-steps', - styleUrls: [ 'steps.component.css' ], + styleUrls: [ 'steps.component.scss' ], templateUrl: 'steps.component.html', }) export class TdStepsComponent implements OnDestroy, AfterContentInit { @@ -40,7 +39,7 @@ export class TdStepsComponent implements OnDestroy, AfterContentInit { @Output('stepChange') onStepChange: EventEmitter = new EventEmitter(); /** - * Executed after content is initialized, loops through any [TdStepComponent] children elements, + * Executed after content is initialized, loops through any [TdStepComponent] children elements, * assigns them a number and subscribes as an observer to their [onActivated] event. */ ngAfterContentInit(): void { @@ -64,7 +63,7 @@ export class TdStepsComponent implements OnDestroy, AfterContentInit { } /** - * Wraps previous and new [TdStepComponent] numbers in an object that implements [IStepChangeEvent] + * Wraps previous and new [TdStepComponent] numbers in an object that implements [IStepChangeEvent] * and emits [onStepChange] event. */ private _onStepSelection(stepNumber: number): void { diff --git a/src/platform/file-upload/file-upload.component.ts b/src/platform/file-upload/file-upload.component.ts index 287ebe3649..58d3874e16 100644 --- a/src/platform/file-upload/file-upload.component.ts +++ b/src/platform/file-upload/file-upload.component.ts @@ -2,9 +2,9 @@ import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from @Component({ changeDetection: ChangeDetectionStrategy.OnPush, - moduleId: module.id, + selector: 'td-file-upload', - styleUrls: ['file-upload.component.css'], + styleUrls: ['file-upload.component.scss'], templateUrl: 'file-upload.component.html', }) export class TdFileUploadComponent { @@ -83,7 +83,7 @@ export class TdFileUploadComponent { } /** - * Methods executed when cancel button is clicked. + * Methods executed when cancel button is clicked. * Clears files. */ cancel(): void { diff --git a/src/platform/highlight/highlight.component.ts b/src/platform/highlight/highlight.component.ts index 84a0da7940..8fe5a7dbc9 100644 --- a/src/platform/highlight/highlight.component.ts +++ b/src/platform/highlight/highlight.component.ts @@ -1,12 +1,10 @@ import { Component, AfterViewInit, ViewChild, ElementRef, Input, Renderer } from '@angular/core'; -import 'highlight.js/lib'; - -declare var hljs: any; +/* tslint:disable-next-line */ +let hljs: any = require('highlight.js/lib'); @Component({ - moduleId: module.id, selector: 'td-highlight', - styleUrls: ['highlight.component.css'], + styleUrls: ['highlight.component.scss'], templateUrl: 'highlight.component.html', }) export class TdHighlightComponent implements AfterViewInit { diff --git a/src/platform/json-formatter/json-formatter.component.ts b/src/platform/json-formatter/json-formatter.component.ts index 258f0feed8..f57f591931 100644 --- a/src/platform/json-formatter/json-formatter.component.ts +++ b/src/platform/json-formatter/json-formatter.component.ts @@ -1,9 +1,9 @@ import { Component, Input } from '@angular/core'; @Component({ - moduleId: module.id, + selector: 'td-json-formatter', - styleUrls: [ 'json-formatter.component.css' ], + styleUrls: [ 'json-formatter.component.scss' ], templateUrl: 'json-formatter.component.html', }) export class TdJsonFormatterComponent { diff --git a/src/platform/markdown/markdown.component.ts b/src/platform/markdown/markdown.component.ts index 74eda40793..21862976b3 100644 --- a/src/platform/markdown/markdown.component.ts +++ b/src/platform/markdown/markdown.component.ts @@ -3,9 +3,8 @@ import { Component, AfterViewInit, ViewChild, ElementRef } from '@angular/core'; declare var showdown: any; @Component({ - moduleId: module.id, selector: 'td-markdown', - styleUrls: ['markdown.component.css'], + styleUrls: ['markdown.component.scss'], templateUrl: 'markdown.component.html', }) export class TdMarkdownComponent implements AfterViewInit { diff --git a/src/polyfills.ts b/src/polyfills.ts new file mode 100644 index 0000000000..ebf7ac02aa --- /dev/null +++ b/src/polyfills.ts @@ -0,0 +1,21 @@ +// This file includes polyfills needed by Angular 2 and is loaded before +// the app. You can add your own extra polyfills to this file. +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'; +import 'core-js/es6/reflect'; + +import 'core-js/es7/reflect'; +import 'zone.js/dist/zone'; + +import 'rxjs/Rx'; diff --git a/src/styles.css b/src/styles.css new file mode 100644 index 0000000000..90d4ee0072 --- /dev/null +++ b/src/styles.css @@ -0,0 +1 @@ +/* You can add global styles to this file, and also import other style files */ diff --git a/src/system-config.ts b/src/system-config.ts deleted file mode 100644 index 2ad8b36787..0000000000 --- a/src/system-config.ts +++ /dev/null @@ -1,117 +0,0 @@ -/*********************************************************************************************** - * User Configuration. - */ - -/** Map relative paths to URLs. */ -const map: any = { - '@angular/core/testing': 'vendor/@angular/core/bundles/core-testing.umd.js', - '@angular/compiler/testing': 'vendor/@angular/compiler/bundles/compiler-testing.umd.js', - '@angular/router/testing': 'vendor/@angular/router/bundles/router-testing.umd.js', - '@angular/http/testing': 'vendor/@angular/http/bundles/http-testing.umd.js', - '@angular/common/testing': 'vendor/@angular/common/bundles/common-testing.umd.js', - '@angular/platform-browser/testing': 'vendor/@angular/platform-browser/bundles/platform-browser-testing.umd.js', - '@angular/platform-browser-dynamic/testing': - 'vendor/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', -}; - -/** User packages configuration. */ -const packages: any = { -}; - -//////////////////////////////////////////////////////////////////////////////////////////////// -/* - * Everything underneath this line is managed by the CLI. - */ -const angularPackages: any = { - // Angular specific barrels. - '@angular/core': { main: 'bundles/core.umd.js'}, - '@angular/core/testing': { main: 'bundles/core-testing.umd.js'}, - '@angular/common': { main: 'bundles/common.umd.js'}, - '@angular/compiler': { main: 'bundles/compiler.umd.js'}, - '@angular/http': { main: 'bundles/http.umd.js'}, - '@angular/forms': { main: 'bundles/forms.umd.js'}, - '@angular/router': { main: 'bundles/router.umd.js'}, - '@angular/platform-browser': { main: 'bundles/platform-browser.umd.js'}, - '@angular/platform-browser-dynamic': { main: 'bundles/platform-browser-dynamic.umd.js'}, - '@angular/platform-browser-dynamic/testing': { - main: 'bundles/platform-browser-dynamic-testing.umd.js', - }, -}; - -const barrels: string[] = [ - // Thirdparty barrels. - 'rxjs', - 'highlight.js/lib', - - // Library specific barrels. - 'platform/core', - 'platform/highlight', - 'platform/file-upload', - 'platform/markdown', - 'platform/http', - 'platform/json-formatter', - 'platform/chips', - - // App specific barrels. - 'app/', - 'app/components/components', - 'app/components/docs', - 'app/components/layouts', - 'app/components/style-guide', - /** @cli-barrel */ -]; - -const cliSystemConfigPackages: any = angularPackages; -barrels.forEach((barrelName: string) => { - cliSystemConfigPackages[barrelName] = { main: 'index' }; -}); - -// Angular Material 2 Packages -const materialPackages: string[] = [ - 'button', - 'button-toggle', - 'card', - 'checkbox', - 'core', - 'grid-list', - 'icon', - 'input', - 'list', - 'menu', - 'progress-bar', - 'progress-circle', - 'radio', - 'sidenav', - 'slider', - 'slide-toggle', - 'tabs', - 'toolbar', - 'tooltip', -]; - -materialPackages.forEach(function(pkg: string): void { - let name: string = '@angular2-material/' + pkg; - packages[name] = { - defaultExtension: 'js', - format: 'cjs', - main: pkg + '.umd.js', - }; -}); - -/** Type declaration for ambient System. */ -declare var System: any; - -// Apply the CLI SystemJS configuration. -System.config({ - map: { - '@angular': 'vendor/@angular', - 'rxjs': 'vendor/rxjs', - 'highlight.js/lib': 'vendor/highlight.js/lib', - 'main': 'main.js', - '@angular2-material': 'vendor/@angular2-material', - }, - packages: cliSystemConfigPackages, -}); - -// Apply the user's configuration. -System.config({ map, packages, materialPackages }); diff --git a/src/test.ts b/src/test.ts new file mode 100644 index 0000000000..a8b8a8aa27 --- /dev/null +++ b/src/test.ts @@ -0,0 +1,33 @@ +import './polyfills.ts'; + +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'; + +// 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 (): void { /* noop */ }; + +Promise.all([ + System.import('@angular/core/testing'), + System.import('@angular/platform-browser-dynamic/testing'), +]) + // First, initialize the Angular testing environment. + .then(([testing, testingBrowser]: any[]) => { + 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: any) => context.keys().map(context)) + // Finally, start Karma to run the tests. + .then(__karma__.start, __karma__.error); diff --git a/src/tsconfig.json b/src/tsconfig.json index b989feab78..1506dd9d1e 100644 --- a/src/tsconfig.json +++ b/src/tsconfig.json @@ -1,23 +1,21 @@ { "compileOnSave": false, "compilerOptions": { - "declaration": true, + "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, - "mapRoot": "", - "lib": ["es6", "es2015", "dom"], - "module": "commonjs", + "mapRoot": "./", + "lib": ["es6", "dom"], + "module": "es6", "moduleResolution": "node", - "noEmitOnError": true, - "noImplicitAny": false, - "outDir": "../dist/", - "rootDir": ".", + "outDir": "../dist/out-tsc", "sourceMap": true, "target": "es5", - "inlineSources": true - }, - "files": [ - "main.ts", - "typings.d.ts" - ] + "typeRoots": [ + "../node_modules/@types" + ], + "types": [ + "jasmine", "hammerjs" + ] + } } diff --git a/src/typings.d.ts b/src/typings.d.ts index 0c27d28456..6ad52ded5e 100644 --- a/src/typings.d.ts +++ b/src/typings.d.ts @@ -1,3 +1,6 @@ -/// +// Typings reference file, see links for more information +// https://github.com/typings/typings +// https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html -declare var module: { id: string }; +declare var System: any; +declare var require: any; diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index 7d37971512..0000000000 --- a/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "declaration": false, - "emitDecoratorMetadata": true, - "experimentalDecorators": true - } -} diff --git a/typings.json b/typings.json deleted file mode 100644 index 0c16075a2b..0000000000 --- a/typings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "globalDevDependencies": { - "angular-protractor": "registry:dt/angular-protractor#1.5.0+20160425143459", - "jasmine": "registry:dt/jasmine#2.2.0+20160621224255", - "selenium-webdriver": "registry:dt/selenium-webdriver#2.44.0+20160317120654" - }, - "globalDependencies": { - "core-js": "registry:dt/core-js#0.0.0+20160725163759", - "hammerjs": "registry:dt/hammerjs#2.0.8+20160724063812" - } -}