diff --git a/.angular-cli.json b/.angular-cli.json old mode 100755 new mode 100644 index 1375ae1bd..a9941e4cc --- a/.angular-cli.json +++ b/.angular-cli.json @@ -19,7 +19,7 @@ "testTsconfig": "tsconfig.spec.json", "prefix": "app", "styles": [ - "styles.css" + "styles.scss" ], "scripts": [], "environmentSource": "environments/environment.ts", @@ -51,7 +51,7 @@ } }, "defaults": { - "styleExt": "css", + "styleExt": "scss", "component": {} } } diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/.travis-deploy.sh b/.travis-deploy.sh new file mode 100644 index 000000000..04a4a46a9 --- /dev/null +++ b/.travis-deploy.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# go to the directory which contains build artifacts and create a *new* Git repo +# directory may be different based on your particular build process +cd dist +git init + +# inside this git repo we'll pretend to be a new user +git config user.name "Travis CI" +git config user.email "tomas.trajan@gmail.com" + +# The first and only commit to this new Git repo contains all the +# files present with the commit message "Deploy to GitHub Pages". +git add . +git commit -m "Deploy to GitHub Pages" + +# Force push from the current repo's master branch to the remote +# repo's gh-pages branch. (All previous history on the gh-pages branch +# will be lost, since we are overwriting it.) We redirect any output to +# /dev/null to hide any sensitive credential data that might otherwise be exposed. +# tokens GH_TOKEN and GH_REF will be provided as Travis CI environment variables +git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" master:gh-pages > /dev/null 2>&1 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..f77d06d2c --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "6" +script: + # run build script specified in package.json + - npm run ci + # call script for deploying of produced artifacts + - bash ./.travis-deploy.sh diff --git a/README.md b/README.md old mode 100755 new mode 100644 index 35bfa8ed0..439673bb8 --- a/README.md +++ b/README.md @@ -1,28 +1,5 @@ -# AngularNgrxMaterialStarter +# Angular, ngrx & Material Starter by [@tomastrajan](https://twitter.com/tomastrajan) [![Build Status](https://travis-ci.org/tomastrajan/angular-ngrx-material-starter.svg?branch=master)](https://travis-ci.org/tomastrajan/angular-ngrx-material-starter) + +Check out [Demo & Documentation](http://tomastrajan.github.io/angular-ngrx-material-starter/) -This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.3. - -## Development server - -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. - -## Code scaffolding - -Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`. - -## Build - -Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. - -## Running unit tests - -Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). - -## Running end-to-end tests - -Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). -Before running the tests make sure you are serving the app via `ng serve`. - -## Further help - -To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). +Built with [Angular CLI](https://github.com/angular/angular-cli) diff --git a/e2e/app.e2e-spec.ts b/e2e/app.e2e-spec.ts old mode 100755 new mode 100644 diff --git a/e2e/app.po.ts b/e2e/app.po.ts old mode 100755 new mode 100644 diff --git a/e2e/tsconfig.e2e.json b/e2e/tsconfig.e2e.json old mode 100755 new mode 100644 diff --git a/karma.conf.js b/karma.conf.js old mode 100755 new mode 100644 index 84b4cd5ac..f04747238 --- a/karma.conf.js +++ b/karma.conf.js @@ -8,6 +8,8 @@ module.exports = function (config) { plugins: [ require('karma-jasmine'), require('karma-chrome-launcher'), + require('karma-phantomjs-launcher'), + require('karma-spec-reporter'), require('karma-jasmine-html-reporter'), require('karma-coverage-istanbul-reporter'), require('@angular/cli/plugins/karma') diff --git a/package.json b/package.json old mode 100755 new mode 100644 index a78ea1469..951c1706d --- a/package.json +++ b/package.json @@ -8,20 +8,33 @@ "build": "ng build", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e" + "e2e": "ng e2e", + "watch": "ng test --browsers PhantomJS --reporters spec", + "build:prod": "ng build --target production --aot --vendor-chunk --extract-css --output-hashing all --stats-json", + "build:travisci": "ng build --target production --aot --vendor-chunk --extract-css --output-hashing all --stats-json --deploy-url /angular-ngrx-material-starter/ --base-href /angular-ngrx-material-starter", + "clean": "rm -rf ./dist/", + "server": "cd dist && http-server", + "prod": "npm run clean && npm run build:prod && npm run server", + "ci": "npm run clean && ng lint && ng test --browsers PhantomJS --single-run --reporters spec && npm run build:travisci" }, "private": true, "dependencies": { + "@angular/animations": "^4.1.1", "@angular/common": "^4.0.0", "@angular/compiler": "^4.0.0", "@angular/core": "^4.0.0", "@angular/forms": "^4.0.0", "@angular/http": "^4.0.0", + "@angular/material": "^2.0.0-beta.3", "@angular/platform-browser": "^4.0.0", "@angular/platform-browser-dynamic": "^4.0.0", "@angular/router": "^4.0.0", + "classlist.js": "^1.1.20150312", "core-js": "^2.4.1", + "hammerjs": "^2.0.8", + "intl": "^1.2.5", "rxjs": "^5.1.0", + "web-animations-js": "^2.2.5", "zone.js": "^0.8.4" }, "devDependencies": { @@ -33,11 +46,13 @@ "jasmine-core": "~2.5.2", "jasmine-spec-reporter": "~3.2.0", "karma": "~1.4.1", - "karma-chrome-launcher": "~2.1.1", + "karma-chrome-launcher": "~2.0.0", "karma-cli": "~1.0.1", + "karma-coverage-istanbul-reporter": "^0.2.0", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", - "karma-coverage-istanbul-reporter": "^0.2.0", + "karma-phantomjs-launcher": "^1.0.4", + "karma-spec-reporter": "0.0.31", "protractor": "~5.1.0", "ts-node": "~2.0.0", "tslint": "~4.5.0", diff --git a/protractor.conf.js b/protractor.conf.js old mode 100755 new mode 100644 diff --git a/src/app/app.component.html b/src/app/app.component.html old mode 100755 new mode 100644 index b6931b538..e5e40bb1c --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,3 +1,5 @@