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 @@

{{title}} + +

diff --git a/src/app/app.component.css b/src/app/app.component.scss old mode 100755 new mode 100644 similarity index 100% rename from src/app/app.component.css rename to src/app/app.component.scss diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts old mode 100755 new mode 100644 diff --git a/src/app/app.component.ts b/src/app/app.component.ts old mode 100755 new mode 100644 index ff63e0504..efe4a9c18 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -3,7 +3,7 @@ import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] + styleUrls: ['./app.component.scss'] }) export class AppComponent { title = 'app works!'; diff --git a/src/app/app.module.ts b/src/app/app.module.ts old mode 100755 new mode 100644 index 67ae49119..7aa85fdde --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,18 +1,24 @@ +import 'hammerjs'; import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; +import { MdButtonModule } from '@angular/material'; + import { AppComponent } from './app.component'; @NgModule({ - declarations: [ - AppComponent - ], imports: [ BrowserModule, FormsModule, - HttpModule + HttpModule, + BrowserAnimationsModule, + MdButtonModule + ], + declarations: [ + AppComponent ], providers: [], bootstrap: [AppComponent] diff --git a/src/assets/.gitkeep b/src/assets/.gitkeep old mode 100755 new mode 100644 diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts old mode 100755 new mode 100644 diff --git a/src/environments/environment.ts b/src/environments/environment.ts old mode 100755 new mode 100644 diff --git a/src/favicon.ico b/src/favicon.ico old mode 100755 new mode 100644 diff --git a/src/index.html b/src/index.html old mode 100755 new mode 100644 index 137d28d52..7dc223035 --- a/src/index.html +++ b/src/index.html @@ -7,6 +7,7 @@ + Loading... diff --git a/src/main.ts b/src/main.ts old mode 100755 new mode 100644 diff --git a/src/polyfills.ts b/src/polyfills.ts old mode 100755 new mode 100644 index bc94e7a6d..3f86f0036 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -19,22 +19,22 @@ */ /** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// 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/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'; /** IE10 and IE11 requires the following for NgClass support on SVG elements */ -// import 'classlist.js'; // Run `npm install --save classlist.js`. +import 'classlist.js'; // Run `npm install --save classlist.js`. /** IE10 and IE11 requires the following to support `@angular/animation`. */ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. @@ -46,7 +46,7 @@ import 'core-js/es7/reflect'; /** ALL Firefox browsers require the following to support `@angular/animation`. **/ -// import 'web-animations-js'; // Run `npm install --save web-animations-js`. +import 'web-animations-js'; // Run `npm install --save web-animations-js`. @@ -65,8 +65,8 @@ import 'zone.js/dist/zone'; // Included with Angular CLI. * Date, currency, decimal and percent pipes. * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10 */ -// import 'intl'; // Run `npm install --save intl`. +import 'intl'; // Run `npm install --save intl`. /** * Need to import at least one locale-data with intl. */ -// import 'intl/locale-data/jsonp/en'; +import 'intl/locale-data/jsonp/en'; diff --git a/src/styles.css b/src/styles.scss old mode 100755 new mode 100644 similarity index 54% rename from src/styles.css rename to src/styles.scss index 90d4ee007..3063ec3e5 --- a/src/styles.css +++ b/src/styles.scss @@ -1 +1,2 @@ /* You can add global styles to this file, and also import other style files */ +@import '~@angular/material/prebuilt-themes/deeppurple-amber.css'; diff --git a/src/test.ts b/src/test.ts old mode 100755 new mode 100644 diff --git a/src/tsconfig.app.json b/src/tsconfig.app.json old mode 100755 new mode 100644 diff --git a/src/tsconfig.spec.json b/src/tsconfig.spec.json old mode 100755 new mode 100644 diff --git a/src/typings.d.ts b/src/typings.d.ts old mode 100755 new mode 100644 diff --git a/tsconfig.json b/tsconfig.json old mode 100755 new mode 100644 diff --git a/tslint.json b/tslint.json old mode 100755 new mode 100644