Skip to content

Commit

Permalink
chore(cli): upgrade to latest @angular/cli and its dependencies (#335)
Browse files Browse the repository at this point in the history
* chore(): upgrade to latest @angular/cli and its dependencies

* chore(): modify internal files with additional considerations

* chore(code-health): update karma.conf.js to point to new coverage dependency

* chore(ghpages): leverage --sourcemap=false for ghpages deployment

* chore(): point to new lvoc file

* upgrade(cli): beta.32.3
  • Loading branch information
emoralesb05 authored Feb 22, 2017
1 parent 8a19aa0 commit 3a082d7
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 29 deletions.
2 changes: 1 addition & 1 deletion angular-cli.json → .angular-cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"../node_modules/hammerjs/hammer.min.js",
"../node_modules/showdown/dist/showdown.js"
],
"environmentSource": "environments/environment.ts",
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
Expand Down
7 changes: 4 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# editorconfig.org
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@

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

# IDE - VSCode
.vscode/
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
Expand All @@ -29,3 +40,4 @@ testem.log

#System Files
.DS_Store
Thumbs.db
6 changes: 3 additions & 3 deletions docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $theme: md-light-theme($primary, $accent, $warn);

You only need this single Sass file; you do not need to use Sass to style the rest of your app.

If you are using the Angular CLI, support for compiling Sass to css is built-in; you only have to add a new entry to the "styles" list in angular-cli.json pointing to the theme file (e.g., themes.scss).
If you are using the Angular CLI, support for compiling Sass to css is built-in; you only have to add a new entry to the "styles" list in .angular-cli.json pointing to the theme file (e.g., themes.scss).

If you're not using the Angular CLI, you can use any existing Sass tooling to build the file (such as gulp-sass or grunt-sass). The simplest approach is to use the node-sass CLI; you simply run:

Expand Down Expand Up @@ -119,7 +119,7 @@ System.config({

### Using platform.scss:

- The core covalent styles need to be included either in your `index.html` or as a new entry to the "styles" list in angular-cli.json
- The core covalent styles need to be included either in your `index.html` or as a new entry to the "styles" list in .angular-cli.json
load the Material Design font in your `index.html`.

**src/index.html**
Expand All @@ -129,7 +129,7 @@ load the Material Design font in your `index.html`.

or

**angular-cli.json**
**.angular-cli.json**
```json
"styles": [
"../node_modules/@covalent/core/common/platform.scss"
Expand Down
22 changes: 12 additions & 10 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ module.exports = function (config) {
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-firefox-launcher'),
require('karma-remap-istanbul'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
customLaunchers: {
// chrome setup for travis CI using chromium
Chrome_travis_ci: {
Expand All @@ -25,22 +29,20 @@ module.exports = function (config) {
preprocessors: {
'./src/test.ts': ['@angular/cli']
},
remapIstanbulReporter: {
reports: {
html: 'coverage',
lcovonly: './coverage/coverage.lcov'
}
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
config: './angular-cli.json',
config: './.angular-cli.json',
environment: 'dev'
},
mime: {
'text/x-typescript': ['ts','tsx']
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'karma-remap-istanbul']
: ['progress'],
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "ng test --code-coverage --single-run",
"coverage-win": "start chrome ./coverage/index.html",
"coverage-mac": "open -a \"Google Chrome\" coverage/index.html",
"coveralls": "cat ./coverage/coverage.lcov | node ./node_modules/coveralls/bin/coveralls.js",
"coveralls": "cat ./coverage/lcov.info | node ./node_modules/coveralls/bin/coveralls.js",
"bump-dev": "gulp bump-version",
"bump-patch": "gulp bump-version --ver patch",
"bump-minor": "gulp bump-version --ver minor",
Expand All @@ -27,7 +27,7 @@
"build": "bash scripts/build-release",
"npm-publish": "npm run build && bash scripts/npm-publish",
"nightly-publish": "npm run build && bash scripts/nightly-publish",
"ghpages-deploy": "./node_modules/.bin/ng build --base-href /covalent/ --aot -prod && bash scripts/ghpages-deploy",
"ghpages-deploy": "./node_modules/.bin/ng build --base-href /covalent/ --aot -prod --sourcemap=false && bash scripts/ghpages-deploy",
"start-release": "bash scripts/start-release",
"finish-release": "bash scripts/finish-release"
},
Expand Down Expand Up @@ -78,10 +78,10 @@
},
"devDependencies": {
"@angular/compiler-cli": "^2.4.5",
"@angular/cli": "1.0.0-beta.30",
"@angular/cli": "1.0.0-beta.32.3",
"@types/hammerjs": "^2.0.30",
"@types/jasmine": "^2.2.31",
"@types/node": "^6.0.34",
"@types/jasmine": "^2.5.38",
"@types/node": "^6.0.42",
"@types/selenium-webdriver": "^2.52.0",
"codelyzer": "2.0.0-beta.4",
"coveralls": "^2.11.15",
Expand All @@ -94,19 +94,20 @@
"gulp-sourcemaps": "1.6.0",
"gulp-typescript": "3.1.4",
"gulp-util": "3.0.7",
"jasmine-core": "^2.4.1",
"jasmine-core": "^2.5.2",
"jasmine-spec-reporter": "2.5.0",
"karma": "1.2.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-firefox-launcher": "^1.0.0",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"karma-phantomjs-launcher": "1.0.1",
"karma-remap-istanbul": "^0.2.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"merge2": "1.0.2",
"node-sass": "3.8.0",
"phantomjs-prebuilt": "2.1.7",
"protractor": "4.0.7",
"protractor": "~5.1.0",
"require-dir": "0.3.0",
"rollup": "^0.35.9",
"rollup-plugin-commonjs": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/platform/highlight/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Alternatively, you can use the *highlight.js* pre-built [themes](https://github.
@import '~highlight.js/styles/vs.css';
```

Loading them in the `angular-cli.json`:
Loading them in the `.angular-cli.json`:

```json
"styles": [
Expand Down
4 changes: 2 additions & 2 deletions src/platform/markdown/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ npm i -save @covalent/markdown

## Setup

`showdown.js` needs to be added as script in the `angular-cli.json` OR referenced in `index.html` (installed as a `markdown` dependency).
`showdown.js` needs to be added as script in the `.angular-cli.json` OR referenced in `index.html` (installed as a `markdown` dependency).

**angular-cli.json**:
**.angular-cli.json**:

```json
"scripts": [
Expand Down

0 comments on commit 3a082d7

Please sign in to comment.