From 53ce0e364aeccc52c1d7b332e810f6524dd403c7 Mon Sep 17 00:00:00 2001 From: Andrea Sonny Date: Mon, 12 Sep 2016 16:29:48 +0100 Subject: [PATCH] test commit --- .bowerrc | 3 + .editorconfig | 13 + .gitattributes | 1 + .gitignore | 29 ++ .jscsrc | 73 +++++ .travis.yml | 15 + CHANGELOG.md | 39 +++ LICENSE | 21 ++ README.md | 169 ++++++++++ bower.json | 32 ++ e2e-tests/scenarios.js | 82 +++++ gulp/config.js | 26 ++ gulpfile.js | 296 ++++++++++++++++++ karma.conf.js | 108 +++++++ logo.png | Bin 0 -> 17719 bytes package.json | 77 +++++ protractor.conf.js | 27 ++ src/.htaccess | 8 + src/app/404.html | 2 + src/app/app.js | 73 +++++ src/app/home/home.controller.js | 54 ++++ src/app/home/home.html | 113 +++++++ src/app/main/main.controller.js | 5 + src/app/main/main.html | 6 + src/app/page-footer/page-footer.directive.js | 24 ++ .../page-footer/page-footer.directive.spec.js | 19 ++ src/app/page-footer/page-footer.html | 3 + src/app/page-header/page-header.directive.js | 26 ++ .../page-header/page-header.directive.spec.js | 33 ++ src/app/page-header/page-header.html | 6 + src/browserconfig.xml | 11 + src/favicon.ico | Bin 0 -> 4286 bytes src/images/apple-touch-icon.png | Bin 0 -> 2408 bytes src/images/chrome-touch-icon-192x192.png | Bin 0 -> 1668 bytes src/images/icon-128x128.png | Bin 0 -> 2108 bytes .../ms-touch-icon-144x144-precomposed.png | Bin 0 -> 1093 bytes src/index.html | 120 +++++++ src/manifest.json | 25 ++ src/manifest.webapp | 25 ++ src/robots.txt | 5 + src/sass/main.scss | 13 + src/sass/modules/_home.scss | 3 + src/sass/modules/_main.scss | 5 + src/sass/modules/_rating.scss | 29 ++ src/sass/partials/_variables.scss | 7 + 45 files changed, 1626 insertions(+) create mode 100644 .bowerrc create mode 100644 .editorconfig create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 .jscsrc create mode 100644 .travis.yml create mode 100644 CHANGELOG.md create mode 100644 LICENSE create mode 100644 README.md create mode 100644 bower.json create mode 100644 e2e-tests/scenarios.js create mode 100644 gulp/config.js create mode 100644 gulpfile.js create mode 100644 karma.conf.js create mode 100644 logo.png create mode 100644 package.json create mode 100644 protractor.conf.js create mode 100644 src/.htaccess create mode 100644 src/app/404.html create mode 100644 src/app/app.js create mode 100644 src/app/home/home.controller.js create mode 100644 src/app/home/home.html create mode 100644 src/app/main/main.controller.js create mode 100644 src/app/main/main.html create mode 100644 src/app/page-footer/page-footer.directive.js create mode 100644 src/app/page-footer/page-footer.directive.spec.js create mode 100644 src/app/page-footer/page-footer.html create mode 100644 src/app/page-header/page-header.directive.js create mode 100644 src/app/page-header/page-header.directive.spec.js create mode 100644 src/app/page-header/page-header.html create mode 100644 src/browserconfig.xml create mode 100644 src/favicon.ico create mode 100644 src/images/apple-touch-icon.png create mode 100644 src/images/chrome-touch-icon-192x192.png create mode 100644 src/images/icon-128x128.png create mode 100644 src/images/ms-touch-icon-144x144-precomposed.png create mode 100644 src/index.html create mode 100644 src/manifest.json create mode 100644 src/manifest.webapp create mode 100644 src/robots.txt create mode 100644 src/sass/main.scss create mode 100644 src/sass/modules/_home.scss create mode 100644 src/sass/modules/_main.scss create mode 100644 src/sass/modules/_rating.scss create mode 100644 src/sass/partials/_variables.scss diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..69fad35 --- /dev/null +++ b/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "bower_components" +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8b379d8 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +# editorconfig.org +root = true + +[*] +end_of_line = lf +charset = utf-8 +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..176a458 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..109fa83 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +coverage + +# Karma test result +test_out + +# Dependency directories +node_modules +bower_components + +# Optional npm cache directory +.npm + +# Temporary directory used by Gulp +.tmp + +# Distribution folder +dist diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..930c19e --- /dev/null +++ b/.jscsrc @@ -0,0 +1,73 @@ +{ + "excludeFiles": ["node_modules/**", "bower_components/**"], + "requireCurlyBraces": [ + "if", + "else", + "for", + "while", + "do", + "try", + "catch" + ], + "requireOperatorBeforeLineBreak": true, + "requireCamelCaseOrUpperCaseIdentifiers": true, + "maximumLineLength": { + "value": 100, + "allowComments": true, + "allowRegex": true + }, + "validateIndentation": 2, + "validateQuoteMarks": "'", + + "disallowMultipleLineStrings": true, + "disallowMixedSpacesAndTabs": true, + "disallowTrailingWhitespace": true, + "disallowSpaceAfterPrefixUnaryOperators": true, + "disallowMultipleVarDecl": true, + + "requireSpaceAfterKeywords": [ + "if", + "else", + "for", + "while", + "do", + "switch", + "return", + "try", + "catch" + ], + "requireSpaceBeforeBinaryOperators": [ + "=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=", + "&=", "|=", "^=", "+=", + + "+", "-", "*", "/", "%", "<<", ">>", ">>>", "&", + "|", "^", "&&", "||", "===", "==", ">=", + "<=", "<", ">", "!=", "!==" + ], + "requireSpaceAfterBinaryOperators": true, + "requireSpacesInConditionalExpression": true, + "requireSpaceBeforeBlockStatements": true, + "requireLineFeedAtFileEnd": true, + "disallowSpacesInsideObjectBrackets": "all", + "disallowSpacesInsideArrayBrackets": "all", + "disallowSpacesInsideParentheses": true, + + "jsDoc": { + "checkAnnotations": true, + "checkParamNames": true, + "requireParamTypes": true, + "checkReturnTypes": true, + "checkTypes": true + }, + + "disallowMultipleLineBreaks": true, + + "disallowCommaBeforeLineBreak": null, + "disallowDanglingUnderscores": null, + "disallowEmptyBlocks": null, + "disallowTrailingComma": null, + "requireCommaBeforeLineBreak": null, + "requireDotNotation": null, + "requireMultipleVarDecl": null, + "requireParenthesesAroundIIFE": true +} diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a53dc1e --- /dev/null +++ b/.travis.yml @@ -0,0 +1,15 @@ +sudo: false +language: node_js +node_js: + - '4.4' +before_install: + - npm install -g bower + - npm install -g gulp +before_script: + - export DISPLAY=:99.0 + - sh -e /etc/init.d/xvfb start + - npm run startserver + - sleep 1 # give server time to start +script: + - npm run test-single-run --reporters=dots + - node_modules/.bin/protractor protractor.conf.js --browser=firefox diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3cfe483 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,39 @@ +# Angular Starter Kit Changelog + +## 1.3.1 - 2016.07.10 + +* end-to-end tests introduced with Protractor +* demo e2e scenario +* Travis task updated +* Gulp tasks improved and refactored +* karma-coverage and Istanbul introduced +* documentation updated + +## 1.2.1 - 2016.07.09 + +* favicon bug fixed +* repository logo +* documentation updated + +## 1.2.0 - 2016.07.08 + +* Replacing Material Design Lite with Angular Material +* Better Gulp +* Removing JSHint in favour of ESLint +* Karma improved for Unit testing +* General restyling and better Web Application support + +## 1.0.1 - 2015.12.28 + +* Twitter Bootstrap and JQuery removed and implemented Bourbon with Neat +* support for web app +* file structure improved according to the JohnPapa styleguide +* icons +* robots.txt +* manifest.webapp for web app support +* gulp file updated +* Support for Google Analytics in index.html + +## 1.0.0 - 2015.10.17 + +* initial release diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e2719ba --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 - 2016 Andrea Sonny + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..b7168f9 --- /dev/null +++ b/README.md @@ -0,0 +1,169 @@ +# Angular Starter Kit + +[![Join the chat at https://gitter.im/andreasonny83/angular-starter-kit][gitter-badge]](https://gitter.im/andreasonny83/angular-starter-kit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![NPM version][npm-badge]](https://www.npmjs.com/package/angular-starter-kit) +[![Build Status][travis-badge]](https://travis-ci.org/andreasonny83/angular-starter-kit) +[![devDependency Status][dependencies-badge]](https://david-dm.org/andreasonny83/angular-starter-kit#info=devDependencies) +[![npm][license-badge]](https://andreasonny.mit-license.org/@2016/) + +> A better way to start your new Angular app + +![Angular Logo][angular_logo] + +## Features + +* SASS support including sourceMaps +* Minimal CSS styling of the view +* Gulp watch, build and local server tasks +* Minified CSS and JS build files +* Unit tests +* E2E tests covered by Protractor +* Istanbul code coverage + +## Prerequisites + +We assume you've already installed [NodeJS][nodejs], [Gulp][gulp] and +[Bower][bower] on your machine, if not, +please follow the installation documentation from the official websites. + +## Installation + +The easiest way to start your Angular project using Angular Starter Kit is +[Downloading the latest release][latest_release] of this project or simply +cloning this repository with: + +```sh +git clone https://github.com/andreasonny83/angular-starter-kit.git +``` + +### Setup + +Once done with the previous step, open your terminal to your angular-starter-kit +folder, then install all the dependencies with: + +```sh +npm install +``` + +This will create both a `node_modules` and `bower_components` folder inside +your local directory + +## Run the Application + +There is already a preconfigured web server for this application. +The simplest way to start this server is: + +```sh +npm start +``` + +Now browse to the app url available at +[http://localhost:8000](http://localhost:8000) to see your application running. + +This task will also watch for any file change to your project's files and +update the browser with the new changes using BrowserSync and Gulp. + +## Build a production version + +```sh +npm run build +``` + +This will perform the following tasks: + +* clean the `.tmp` and `dist` folder +* compile SASS files, minify and uncss the compiled css +* copy and optimize images +* minify and copy all HTML files into $templateCache +* build index.html +* minify and copy all JS files +* copy fonts, if any + +## Serve the distribution folder + +```bash +npm run serve:dist +``` + +This will compile your project in distribution mode and will trigger a +web server to listen to your generated `dist` folder. + +Open a browser and navigating to [http://localhost:8000](http://localhost:8000) +to see the rendered application. + +## Unit tests + +```bash +npm test +``` + +This will run all the unit tests present in your project folder using Karma. + +The task will remain idle in your terminal waiting for file changes to +run the tests again. This task is really useful during the development mode +in order to avoid running manually your tests every time. + +However, if you want just to run the test once and build a report displaying the +unit test coverage, use the following task: + +```bash +npm run test-single-run +``` + +Either way, all the reports will be stored inside a generated `test_out` folder +and a `coverage` for the unit test coverage using [Istanbul][istanbul-url] + +## End to end testing + +The Angular Starter Kit app comes with end-to-end tests written in Jasmine. +These tests are run with the [Protractor][protractor-url] +End-to-End test runner. + +Your web server needs to be serving up the application, +so that Protractor can interact with it. + +In order to start running your end-to-end tests, +first start your web server with: + +```bash +npm start +``` + +Now you can run the end-to-end tests, from another terminal instance, +using the supplied `npm` script: + +```bash +npm run protractor +``` + +## Contributing + +We really appreciate your collaborations and feedbacks! + +1. Fork it! +2. Create your feature branch: `git checkout -b my-new-feature` +3. Commit your changes: `git commit -m 'Add some feature'` +4. Push to the branch: `git push origin my-new-feature` +5. Submit a pull request :D + +## Changelog + +Changelog available [here][changelog] + +## License + +MIT © [Andrea Sonny](https://andreasonny.mit-license.org/@2016) + +[angular_logo]: https://angularjs.org/img/AngularJS-large.png +[gitter-badge]: https://badges.gitter.im/andreasonny83/angular-starter-kit.svg +[npm-badge]: https://badge.fury.io/js/generator-mdl.svg +[travis-badge]: https://travis-ci.org/andreasonny83/angular-starter-kit.svg?branch=master +[dependencies-badge]: https://david-dm.org/andreasonny83/angular-starter-kit/dev-status.svg +[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg +[latest_release]: https://github.com/andreasonny83/angular-starter-kit/releases/latest +[nodejs]: https://nodejs.org/ +[gulp]: https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md +[bower]: https://bower.io/#install-bower +[istanbul-url]: https://github.com/gotwarlost/istanbul +[protractor-url]:http://www.protractortest.org +[changelog]: https://github.com/andreasonny83/angular-starter-kit/blob/master/CHANGELOG.md diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..d87751c --- /dev/null +++ b/bower.json @@ -0,0 +1,32 @@ +{ + "name": "angular-starter-kit", + "description": "Starter Kit for Angular 1.5+ projects", + "main": "src/index.html", + "authors": [ + "Andrea SonnY " + ], + "license": "MIT", + "keywords": [ + "angular", + "angularjs", + "starter-kit" + ], + "homepage": "https://github.com/andreasonny83/angular-starter-kit", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "angular": "^1.5.7", + "angular-animate": "^1.5.7", + "angular-material": "^1.0.9", + "angular-ui-router": "^0.3.1" + }, + "devDependencies": { + "angular-mocks": "^1.5.7" + } +} diff --git a/e2e-tests/scenarios.js b/e2e-tests/scenarios.js new file mode 100644 index 0000000..824e505 --- /dev/null +++ b/e2e-tests/scenarios.js @@ -0,0 +1,82 @@ +describe('homepage', function() { + it('when the homepage is rendered', function() { + browser.get('http://localhost:8000'); + }); + + describe('element: header', function() { + it('the page should contains a header element', function() { + var header = element.all(by.css('md-toolbar')); + + expect((header).count()).toEqual(1); + expect(header.get(0).element(by.css('.md-toolbar-tools')).getText()) + .toEqual('Angular Starter Kit'); + }); + }); + + describe('element: tabs', function() { + it('the page should contains a tabs element', function() { + /** + * Protractor supports for pausing to debug + * Read more at: + * + * https://github.com/angular/protractor/blob/master/docs/debugging.md#pausing-to-debug + */ + // browser.pause(); + expect($('.md-tabs').isDisplayed()).toBe(true); + }); + + it('and should contains 3 tab elements', function() { + expect(element.all(by.css('md-tab-data md-tab')).count()) + .toBe(3); + + expect(element.all(by.css('md-tab-data md-tab')) + .get(0) + .getAttribute('label')) + .toEqual('Step 1'); + + expect(element.all(by.css('md-tab-data md-tab')) + .get(1) + .getAttribute('label')) + .toEqual('Step 2'); + + expect(element.all(by.css('md-tab-data md-tab')) + .get(2) + .getAttribute('label')) + .toEqual('Step 3'); + }); + }); + + describe('element: Step 1', function() { + it('clicking on Next, should display an error message', function() { + var toast = element(by.css('md-toast')); + var toastMsg = 'You must fill all the required information first.'; + + $('.step1__next').click(); + + browser.wait(function() { + return browser.isElementPresent(toast); + }); + + expect(toast.getText()).toBe(toastMsg); + }); + + it('clicking on Next, should go to the Step 2', function() { + element(by.model('homeCtrl.user.name')).sendKeys('foo'); + element(by.model('homeCtrl.user.title')).sendKeys('mr'); + + // The user is still on the first tab + element(by.css('md-tabs')).evaluate('homeCtrl.selectedIndex') + .then(function(selectedIndex) { + expect(selectedIndex).toBe(0); + }); + + $('.step1__next').click(); + + // Now we are on the Step 2 + element(by.css('md-tabs')).evaluate('homeCtrl.selectedIndex') + .then(function(selectedIndex) { + expect(selectedIndex).toBe(1); + }); + }); + }); +}); diff --git a/gulp/config.js b/gulp/config.js new file mode 100644 index 0000000..dd5b7ba --- /dev/null +++ b/gulp/config.js @@ -0,0 +1,26 @@ +const path = require('path'); + +const src = path.join(__dirname, '../src'); +const dist = path.join(__dirname, '../dist'); +const temp = path.join(__dirname, '../.tmp'); + +const AUTOPREFIXER = [ + 'last 2 versions', + 'safari >= 7', + 'ie >= 9', + 'ff >= 30', + 'ios 6', + 'android 4' +]; + +const config = { + src: src, + tmp: temp, + dist: dist, + images: 'images', + scripts: 'scripts', + styles: 'styles', + autoprefixer: AUTOPREFIXER +}; + +module.exports = config; diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..ecf4172 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,296 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +'use strict'; + +var gulp = require('gulp'); +var $ = require('gulp-load-plugins')(); +var del = require('del'); +var runSequence = require('run-sequence'); +var wiredep = require('wiredep').stream; +var path = require('path'); +var config = require('./gulp/config.js'); +var Server = require('karma').Server; +var browserSync = require('browser-sync').create(); +var fallback = require('connect-history-api-fallback'); + +var args = require('minimist')(process.argv.slice(2)); + +// Replace '/' with your production base URL +// +// eg. setting baseUrl to '/subdomain/' will write your dist/index.html like this: +// ... +// The default value is set to '/' +// +// for more information: https://docs.angularjs.org/guide/$location +var baseUrl = args.base || '/'; + +// delete build folder +gulp.task('clean', function(done) { + del([ + config.tmp, + config.dist + ], { + dot: true + }).then(function(paths) { + console.log('Files and folders that would be deleted:\n', paths.join('\n')); + done(); + }); +}); + +gulp.task('server:dev', function() { + browserSync.init({ + port: 8000, + open: false, + server: { + baseDir: [config.src, config.tmp], + routes: { + '/bower_components': 'bower_components' + }, + middleware: [ + fallback({ + index: '/index.html', + htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'] // systemjs workaround + }) + ] + } + }); +}); + +gulp.task('server:dist', function() { + browserSync.init({ + port: 8000, + open: false, + server: { + baseDir: config.dist, + middleware: [ + fallback({ + index: '/index.html', + htmlAcceptHeaders: ['text/html', 'application/xhtml+xml'] // systemjs workaround + }) + ] + } + }); +}); + +// reload all Browsers +gulp.task('reload', function() { + gulp + .src(config.src + '/index.html') + .pipe(browserSync.reload); +}); + +// optimize images +gulp.task('images', function() { + return gulp + .src(config.src + '/images/**/*') + .pipe($.imagemin({ + optimizationLevel: 7, + progressive: true, + interlaced: true + })) + .pipe(gulp.dest(config.dist + '/images')) + .pipe($.size({title: 'images'})); +}); + +// copy fonts +gulp.task('fonts', function() { + gulp + .src([config.src + '/fonts/**/*']) + .pipe(gulp.dest(config.dist + '/fonts')) + .pipe($.size({title: 'fonts'})); +}); + +// SASS task, will run when any SCSS files change & BrowserSync +// will auto-update browsers +gulp.task('sass', function() { + return gulp + .src(config.src + '/sass/main.scss') + .pipe($.sass({ + outputStyle: 'expanded' + }).on('error', $.sass.logError)) + .pipe(gulp.dest(config.tmp + '/styles')) + .pipe($.size({title: 'sass'})) + .pipe(browserSync.stream()); +}); + +// SASS Build task +gulp.task('sass:build', function() { + return gulp + .src(config.src + '/sass/**/*.scss') + // .pipe($.sourcemaps.init()) + .pipe($.sass({ + outputStyle: 'compressed' + }).on('error', $.sass.logError)) + .pipe($.cssnano({ + autoprefixer: {browsers: config.autoprefixer, add: true}, + safe: true + })) + // .pipe($.sourcemaps.write('.')) + .pipe(gulp.dest(config.tmp + '/styles')) + .pipe($.size({title: 'sass'})); +}); + +gulp.task('scripts', function() { + return gulp + .src([ + config.src + '/app/**/*.js', + '!**/test/**/*' + ]); +}); + +// Move all script files in the .temp is required by usemin +// in order to find all the source scripts in one place +gulp.task('copy:scripts', function() { + gulp + .src([config.src + '/app/**/*']) + .pipe(gulp.dest(config.tmp + '/app')); +}); + +gulp.task('fonts', function() { + gulp + .src(['bower_components/font-awesome/fonts/**/*']) + .pipe(gulp.dest(config.dist + '/fonts')); +}); + +// Copy the root files from your src folder inside your dist one +gulp.task('copy:root', function() { + gulp + .src([ + config.src + '/.htaccess', + config.src + '/404.html', + config.src + '/browserconfig.xml', + config.src + '/favicon.ico', + config.src + '/manifest.json', + config.src + '/manifest.webapp', + config.src + '/robots.txt' + ], { + dot: true + }) + .pipe(gulp.dest(config.dist)) + .pipe($.size({title: 'copy'})); +}); + +gulp.task('wiredep', function() { + return gulp + .src(config.src + '/index.html') + .pipe(wiredep()) + .pipe(gulp.dest(config.src)); +}); + +gulp.task('usemin', ['wiredep'], function() { + return gulp + .src(config.src + '/index.html') + .pipe(gulp.dest(config.dist)) + .pipe($.htmlReplace({ + baseUrl: '', + templates: '' + })) + .pipe(gulp.dest(config.dist)) + .pipe($.usemin({ + css: ['concat', $.cssnano({ + autoprefixer: {browsers: config.autoprefixer, add: true} + })], + main: [$.uglify(), 'concat'] + })) + .pipe(gulp.dest(config.dist)); +}); + +// minify HTML +gulp.task('htmlmin', function() { + return gulp + .src(config.dist + '/index.html') + .pipe($.htmlmin({ + removeScriptTypeAttributes: true, + removeStyleLinkTypeAttributes: true, + minifyJS: true, + minifyCSS: true, + removeTagWhitespace: true, + collapseWhitespace: true + })) + .pipe(gulp.dest(config.dist)); +}); + +// make a templateCache module from all HTML files +gulp.task('templates', function() { + return gulp + .src('src/app/**/*.html') + .pipe($.htmlmin({ + collapseWhitespace: true + })) + .pipe($.angularTemplatecache({ + module: 'app', + root: 'app' + })) + .pipe(gulp.dest('.tmp/app')); +}); + +/** + * watch for file changes + */ +gulp.task('watch', function() { + gulp.watch('src/**/*.html').on('change', browserSync.reload); + gulp.watch('src/app/**/*.js').on('change', browserSync.reload); + gulp.watch('src/sass/**/*.scss', ['sass']); +}); + +/** + * This task will build your source project in a browser & then use Gulp to watch files. + * When a file is changed, The browser page is automatically refreshed. + */ +gulp.task('serve', function() { + runSequence( + 'clean', + 'sass', + 'wiredep', + 'server:dev', + 'watch' + ); +}); + +/** + * This task will build your source project in a browser & then use Gulp to watch files. + * When a file is changed, The browser page is automatically refreshed. + */ +gulp.task('serve:dist', function() { + runSequence( + 'build', + 'server:dist' + ); +}); + +/** + * Build a production version + * + * @param {Function} cb Call back function + * @param {String} base Set a default base url. + */ +gulp.task('build', function(cb) { + runSequence( + 'clean', + ['images', 'templates', 'copy:scripts', 'copy:root'], + ['sass:build', 'fonts'], + 'usemin', + 'htmlmin', + cb + ); +}); + +/** + * Run tests once and exit + */ +gulp.task('test', function(done) { + new Server({ + configFile: path.join(__dirname, '/karma.conf.js'), + singleRun: true + }, done).start(); +}); + +gulp.task('default', ['build']); diff --git a/karma.conf.js b/karma.conf.js new file mode 100644 index 0000000..01397ef --- /dev/null +++ b/karma.conf.js @@ -0,0 +1,108 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +'use strict'; + +module.exports = function(config) { + config.set({ + + // base path that will be used to resolve all patterns (eg. files, exclude) + basePath: './', + + // frameworks to use + // available frameworks: https://npmjs.org/browse/keyword/karma-adapter + frameworks: ['jasmine'], + + // list of files / patterns to load in the browser + files: [ + 'bower_components/angular/angular.js', + 'bower_components/angular-route/angular-route.js', + 'bower_components/angular-animate/angular-animate.js', + 'bower_components/angular-aria/angular-aria.js', + 'bower_components/angular-messages/angular-messages.js', + 'bower_components/angular-material/angular-material.js', + 'bower_components/angular-mocks/angular-mocks.js', + 'src/app/**/*.js', + 'src/app/**/*.html' + ], + + // list of files to exclude + exclude: [ + ], + + // preprocess matching files before serving them to the browser + // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor + preprocessors: { + 'src/app/**/*.html': 'ng-html2js', + 'src/**/*.js': 'coverage' + }, + + ngHtml2JsPreprocessor: { + stripPrefix: 'src/', + moduleName: 'my.templates' + }, + + // Which plugins to enable + plugins: [ + 'karma-phantomjs-launcher', + 'karma-jasmine', + 'karma-ng-html2js-preprocessor', + 'karma-junit-reporter', + 'karma-coverage' + ], + + // test results reporter to use + // possible values: 'dots', 'progress' + // available reporters: https://npmjs.org/browse/keyword/karma-reporter + reporters: [ + 'progress', + 'junit', + 'coverage' + ], + + // Istanbul code coverage + coverageReporter: { + type: 'html', + dir: 'coverage/' + }, + + // junit configuration + junitReporter: { + outputDir: 'test_out', + outputFile: 'unit.xml', + suite: 'unit' + }, + + // web server port + port: 9876, + + // enable / disable colors in the output (reporters and logs) + colors: true, + + logLevel: config.LOG_INFO, + + // enable / disable watching file and executing tests whenever any file changes + autoWatch: true, + + // start these browsers + // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher + browsers: [ + 'PhantomJS' + ], + + // Continuous Integration mode + // if true, Karma captures browsers, runs the tests and exits + singleRun: false, + + // Concurrency level + // how many browser should be started simultanous + concurrency: Infinity + }); +}; diff --git a/logo.png b/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..622c7b1096a0df5a48d71c39b7ca14830fc1619d GIT binary patch literal 17719 zcmXtgby!sI^Y$)FEFDTpgM_rw-60?#>4ydh>F#c6Q0ZEb?(SB)L%JlEuBG!met*|{ zdGUwK*>j#V&oeXk+%q>{RX@mKV~}BhKp<=ddFhWJ5SR@3VTGaspODA<{QCv6g@m#M z2vi-1`CyC!{GZxX{-ZJoBr&;S1Av=@E@K0$Yo|Ktn;QTF`%0ozTuih@AW0t(U+8Xk*B?Vc`r+HR}&N6v*M zJ;IJz76dO992sOHO`=`~NJ@NcTw1Yhto^%nsrc8Tzj`ieP0^(B=(wRZQ@GzR)5F89 zfA|CW^_E*dZ>jkET=U4kN|Aqs$KP?`iGzzavab8tsw4<{+gUtsQfjfW) zq=9MQiL$Otdq-n>m}$u^xO?q`+$|1O{#xsPV&LN9q6Ddmaei_J@op^qh|=T_@CH4_ zM))DGi?b3PAiOJ(p7A8rgAV7bgCmN_x{@-QY*0D7^BqV*$>0YO{71Hc7a54Bh6dhF z``|9Akcsbjt!_tCQ+pTYATdY|O4sMO@Eiy~`g*_gg=yb>;iRR;mh*cM4Y$k(Z*Om% zxyx-($AG{yc|b9UzOx^N8fE<@zAvu0p4xY3Wo2d3PPEq!Xu!qt!j#&ek?jnB^sWOC zQSW~r=d8WJZ*06vk|{xU{4&cgYMg*vNQh4ZsEsJy0e~IeTCZ#_ zHzBf^I}vsXO5keFRgX>Vq0eu(GZ04tj-L3k`F7RLXkD$%Jzef!i&W?nF@c4mNYW-i z4_cmR@qGiGDTBS2CPTYKK+h?qlM8fKE0>4asUBE-r4RTfec?;HC?Tz# zJ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|H|?^#&HwjV|q-7XV66G*tuN0or=d|0(hN zmfbwC0$S06TquTOSfEFI1btr^NF{qc*(Y03&XLE3y{18{0IF9^tn19rmpP;-q?WYA zh|udcR6p+8dEdCH#sC4N=L{76j6YpQ6ruY_)0wA znveR2{EyGk&QDaJ5hoENUh9Y`cRAFt7n3J=lh*)F30}E)Z-fCT`jvz!vw^=*U(**lm4&tXKN4T>k;ZmJ1>lyUX7nJ8tE}cex$Of z*B=IVb&Ag2&&kdfj=rkeBrr<}xRZOry4RZ-{)jc`A9~9?JGt2Ey86rZu0=d~_xIg> ze_Q#3fTD@2!@7repWSIZEB+w&&<``gzlzWQSOa%G#@5~EZnOu+3#f&;2(+`ShWXv| z{3?b&oPvK7ftl^~_dBfrlvs9dsCb&$z6T-=_mg}6uGqRY z^oyrZPnUqyL1AEXHtXEaaEs^v=-EvybAtJQdtIT2D)u*}O@SwisFt`!l%yncptHiBgrWAV;Py>UftDnm{r-UW|LBcUC literal 0 HcmV?d00001 diff --git a/package.json b/package.json new file mode 100644 index 0000000..63653ea --- /dev/null +++ b/package.json @@ -0,0 +1,77 @@ +{ + "name": "angular-starter-kit", + "description": "Starter Kit for Angular 1.5+ projects", + "version": "1.3.1", + "author": "Andrea SonnY ", + "repository": { + "type": "git", + "url": "https://github.com/andreasonny83/angular-starter-kit" + }, + "bugs": { + "url": "https://github.com/andreasonny83/angular-starter-kit/issues" + }, + "license": "MIT", + "devDependencies": { + "browser-sync": "^2.13.0", + "connect-history-api-fallback": "^1.2.0", + "del": "^2.2.1", + "eslint": "^3.0.1", + "eslint-config-google": "^0.6.0", + "gulp": "^3.9.1", + "gulp-angular-templatecache": "^2.0.0", + "gulp-cssnano": "^2.1.2", + "gulp-html-replace": "^1.6.1", + "gulp-htmlmin": "^2.0.0", + "gulp-imagemin": "^3.0.1", + "gulp-load-plugins": "^1.2.4", + "gulp-sass": "^2.3.2", + "gulp-size": "^2.1.0", + "gulp-sourcemaps": "^1.6.0", + "gulp-uglify": "^1.5.4", + "gulp-usemin": "^0.3.23", + "http-server": "^0.9.0", + "istanbul": "^0.4.4", + "jasmine-core": "^2.4.1", + "karma": "^1.1.1", + "karma-coverage": "^1.1.0", + "karma-jasmine": "^1.0.2", + "karma-junit-reporter": "^1.1.0", + "karma-ng-html2js-preprocessor": "^1.0.0", + "karma-phantomjs-launcher": "^1.0.1", + "minimist": "^1.2.0", + "phantomjs-prebuilt": "^2.1.7", + "protractor": "^3.3.0", + "run-sequence": "^1.2.2", + "wiredep": "^4.0.0" + }, + "engines": { + "node": ">=0.12" + }, + "scripts": { + "postinstall": "bower install", + "start": "gulp serve", + "test": "karma start karma.conf.js", + "test-single-run": "karma start karma.conf.js --single-run", + "update-webdriver": "webdriver-manager update", + "prestartserver": "npm run update-webdriver && npm run build", + "startserver": "http-server -a localhost -p 8000 -c-1 ./dist > /dev/null &", + "preprotractor": "npm run update-webdriver", + "protractor": "protractor protractor.conf.js", + "build": "gulp build", + "serve:dist": "gulp serve:dist" + }, + "eslintConfig": { + "extends": [ + "google" + ], + "globals": { + "angular": true, + "inject": true + }, + "env": { + "browser": true, + "jasmine": true, + "protractor": true + } + } +} diff --git a/protractor.conf.js b/protractor.conf.js new file mode 100644 index 0000000..476f198 --- /dev/null +++ b/protractor.conf.js @@ -0,0 +1,27 @@ +exports.config = { + + allScriptsTimeout: 11000, + + specs: [ + 'e2e-tests/**/*.js' + ], + + capabilities: { + browserName: 'chrome' + }, + + baseUrl: 'http://localhost:8000', + + framework: 'jasmine', + + jasmineNodeOpts: { + defaultTimeoutInterval: 30000 + }, + + onPrepare: function() { + var width = 800; + var height = 800; + browser.driver.manage().window().setSize(width, height); +} + +}; diff --git a/src/.htaccess b/src/.htaccess new file mode 100644 index 0000000..4827539 --- /dev/null +++ b/src/.htaccess @@ -0,0 +1,8 @@ +RewriteEngine On + # If an existing asset or directory is requested go to it as it is + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] + RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d + RewriteRule ^ - [L] + + # If the requested resource doesn't exist, use index.html + RewriteRule ^ /index.html diff --git a/src/app/404.html b/src/app/404.html new file mode 100644 index 0000000..d2c01b1 --- /dev/null +++ b/src/app/404.html @@ -0,0 +1,2 @@ +

Page Not Found

+

Sorry, but the page you were trying to view does not exist.

diff --git a/src/app/app.js b/src/app/app.js new file mode 100644 index 0000000..955fa88 --- /dev/null +++ b/src/app/app.js @@ -0,0 +1,73 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +(function() { + 'use strict'; + + angular + .module('app', [ + 'ui.router', + 'ngAnimate', + 'ngMaterial' + ]) + .config(config) + .run(run); + + // safe dependency injection + // this prevents minification issues + config.$inject = [ + '$stateProvider', + '$urlRouterProvider', + '$locationProvider' + ]; + + /** + * App routing + * + * You can leave it here in the config section or take it out + * into separate file + * + * @param {Object} $stateProvider $stateProvider Angular service + * @param {Object} $urlRouterProvider $urlRouterProvider Angular service + * @param {Object} $locationProvider $locationProvider Angular service + */ + function config($stateProvider, $urlRouterProvider, $locationProvider) { + $urlRouterProvider.otherwise('/404'); + + // routes + $stateProvider + .state('app', { + abstract: true, + url: '', + templateUrl: 'app/main/main.html', + controller: 'MainController' + }) + .state('app.home', { + url: '/', + templateUrl: 'app/home/home.html', + controller: 'HomeController', + controllerAs: 'homeCtrl' + }) + .state('app.404', { + url: '/404', + templateUrl: 'app/404.html' + }); + + // use the HTML5 History API + $locationProvider.html5Mode(true); + } + + /** + * Run once the App is ready + */ + function run() { + console.log('App ready!'); + } +})(); diff --git a/src/app/home/home.controller.js b/src/app/home/home.controller.js new file mode 100644 index 0000000..0d3de8a --- /dev/null +++ b/src/app/home/home.controller.js @@ -0,0 +1,54 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +(function() { + 'use strict'; + + angular + .module('app') + .controller('HomeController', HomeController); + + function HomeController($mdToast) { + var vm = this; + vm.toast = $mdToast; + + $mdToast.show( + $mdToast.simple() + .textContent('Welcome to Angular Starter Kit!')); + + this._init(); + } + + /** + * initialize the controller + */ + HomeController.prototype._init = function() { + this.pageReady = true; + + console.log('Home controller ready!'); + }; + + HomeController.prototype.next = function(isValid) { + var vm = this; + // If the form is not validated, show an error message + if (!isValid) { + vm.toast.show( + vm.toast.simple() + .textContent('You must fill all the required information first.') + .hideDelay(0)); + + return; + } + + vm.selectedIndex += 1; + }; + + HomeController.$inject = ['$mdToast']; +})(); diff --git a/src/app/home/home.html b/src/app/home/home.html new file mode 100644 index 0000000..82f77e2 --- /dev/null +++ b/src/app/home/home.html @@ -0,0 +1,113 @@ + + + +

{{homeCtrl.productName}}

+ + +
+ + + + Angular Starter Kit + + + Please fill in all the fields to continue. + + + + + + + + + + + + + + + + + + + Next + + +
+
+
+
+ + + +

{{homeCtrl.productName}}

+ + + + + + Some content here + + + + + +

+ Some content here +

+
+ + + + Next + + +
+
+
+ + + +

{{homeCtrl.productName}}

+ + + + + + Some content here + + + + + + + + +

+ {{homeCtrl.user.title}} {{homeCtrl.user.name}} +

+
+ + + + Done + + +
+
+
+
diff --git a/src/app/main/main.controller.js b/src/app/main/main.controller.js new file mode 100644 index 0000000..b4541a9 --- /dev/null +++ b/src/app/main/main.controller.js @@ -0,0 +1,5 @@ +angular + .module('app') + .controller('MainController', function() { + console.log('Main controller ready!'); + }); diff --git a/src/app/main/main.html b/src/app/main/main.html new file mode 100644 index 0000000..2eb10e8 --- /dev/null +++ b/src/app/main/main.html @@ -0,0 +1,6 @@ + + + +
+ + diff --git a/src/app/page-footer/page-footer.directive.js b/src/app/page-footer/page-footer.directive.js new file mode 100644 index 0000000..4431bdb --- /dev/null +++ b/src/app/page-footer/page-footer.directive.js @@ -0,0 +1,24 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +(function() { + 'use strict'; + + angular + .module('app') + .directive('pageFooter', pageFooter); + + function pageFooter() { + return { + restrict: 'E', + templateUrl: 'app/page-footer/page-footer.html' + }; + } +})(); diff --git a/src/app/page-footer/page-footer.directive.spec.js b/src/app/page-footer/page-footer.directive.spec.js new file mode 100644 index 0000000..8720e1f --- /dev/null +++ b/src/app/page-footer/page-footer.directive.spec.js @@ -0,0 +1,19 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +'use strict'; + +describe('test page-footer directive', function() { + beforeEach(module('app')); + + it('should render the page-footer module', function() { + expect('true').toBe('true'); + }); +}); diff --git a/src/app/page-footer/page-footer.html b/src/app/page-footer/page-footer.html new file mode 100644 index 0000000..ad7209a --- /dev/null +++ b/src/app/page-footer/page-footer.html @@ -0,0 +1,3 @@ +
+

Proudly developed by <SonnY>. All Rights Reserved

+
diff --git a/src/app/page-header/page-header.directive.js b/src/app/page-header/page-header.directive.js new file mode 100644 index 0000000..07006be --- /dev/null +++ b/src/app/page-header/page-header.directive.js @@ -0,0 +1,26 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +(function() { + 'use strict'; + + angular + .module('app') + .directive('pageHeader', pageHeader); + + function pageHeader() { + return { + restrict: 'E', + transclude: true, + replace: true, + templateUrl: 'app/page-header/page-header.html' + }; + } +})(); diff --git a/src/app/page-header/page-header.directive.spec.js b/src/app/page-header/page-header.directive.spec.js new file mode 100644 index 0000000..71a22df --- /dev/null +++ b/src/app/page-header/page-header.directive.spec.js @@ -0,0 +1,33 @@ +/** +* angular-starter-kit +* +* @author Andrea SonnY +* @copyright 2016 Andrea SonnY +* +* This code may only be used under the MIT style license. +* +* @license MIT https://andreasonny.mit-license.org/@2016/ +*/ +'use strict'; + +describe('Directive: backButton', function() { + var $compile; + var $rootScope; + var element; + + beforeEach(module('app', 'my.templates')); + + beforeEach(inject(function(_$compile_, _$rootScope_, $templateCache) { + $compile = _$compile_; + $rootScope = _$rootScope_; + var template = $templateCache.get('app/page-header/page-header.html'); + $templateCache.put('app/page-header/page-header.html', template); + })); + + it('Replaces the element with the appropriate content', function() { + element = $compile('')($rootScope); + $rootScope.$digest(); + expect(1).toBe(1); + expect(element.html()).toContain('Angular Starter Kit'); + }); +}); diff --git a/src/app/page-header/page-header.html b/src/app/page-header/page-header.html new file mode 100644 index 0000000..da0bcd3 --- /dev/null +++ b/src/app/page-header/page-header.html @@ -0,0 +1,6 @@ + +
+

+ Angular Starter Kit +

+ diff --git a/src/browserconfig.xml b/src/browserconfig.xml new file mode 100644 index 0000000..f61ef8c --- /dev/null +++ b/src/browserconfig.xml @@ -0,0 +1,11 @@ + + + + + + + + #2F3BA2 + + + diff --git a/src/favicon.ico b/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..61325435a0e0b12f6bf1d60e02259971b0ce4a72 GIT binary patch literal 4286 zcmds5U2Icz6u(V1doXc+L|%B<9(=$DqpUCqIQ)o`EHi3I@M|H)1T|uSZezF^WU?uS zF)${wAczwaBf1zci$p@e3KB(;hzWZjw)eJOSqo+D>^}N=kH7!z&h7u+wxgj>dY994 z{^#p=&b|MyOi>*8tFKqYuX6YfMOmOI$|4X{%A+8mHy+sj%a5<0%N6|^74iU6zKPW2y_DWg|fXG+2?MkLC#&E>|B0< z@t4qZUevY}x{PFx_}W}8qV8%Q^sxvz&r5j)Hq#c7+v{$)wTw>=`T@DlN^3#g4#chl zB|wZvV;`(GWnn{o_2BL7qjjyI!1iX@N66>kcWPq zQoYD#lZzTS*BtLHhs}D_umZlb92XhtBtk#(lbecDpyx?5cl6txve}R`(J}IGecbdx zzT;l^;)?bLtfyDtFW#3CA3HW!lt1zNh+zw2zU5{T7Q3FFr7It`ZK3SsRXe0PP6bCv>;ZBNWG`qC z^bB&BJOSr0x54KuC4w;rh2e zMpwV+qQtrHC=&}?Ad3c=6Paj`{y95LkT@%{c#qSUPE+JlH))*@8M)FCwO~)p7;8?$xez|EiDpKB#+I2e?PAVyUhus#rYys@ zmi@&3#l4F8zotgPwa&y&V2(@>$IGKD$c)o&j4VIFpiC1=dn0fbj&IF3GI5`>=AzX9t!K8 zZT)h;rDVju%sAlU3_1aN4)5kZ)(78vT81{{@x8Ay2I2f_hOfx;8^?g_$k9*=Q`W&p z?7!j;(hu3ZH$h&)x$^7NT0&%Ka{<5IwVHDxt`TuVp!4314?0*sAIJT^=#GMTasM_j z!u!@+!7;jaxL3wsXU~s2<-FhB?r$Fh`$fhNVs2kQI$$B&z0kND+jCSi2KIW!uYm8Y z2CGyoFyE;Fm%qXOQaP&8VNN#z-(3-v*x#$c{y)d&H;-S4&YU4~Y$x5J^duGKk+`DN yX^K(P>&eDi+?K!@+gXvNz41!2rhgK@;GZV9;ZqkCs}B21^)|#4(~4j literal 0 HcmV?d00001 diff --git a/src/images/apple-touch-icon.png b/src/images/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..76c482b49d4e2af89734bc267681df56f312ab84 GIT binary patch literal 2408 zcmV-u377VXP)0{{R3FC5Sl0001BP)t-s|NsBA z%kvsx++vgGD{bB&W!*1u-!pRGG;`o4YTZJ7;yQTY_4xivgX65m@{zOdRf*;0?fZnP z?C$gZz0vi1r0V+o|8t({$JqAY>H65@`J%t^&fWNHndn`Q=9;5`)`4gg>Qwk2ck`{w=Ma%*c+GZ;jI(;-#6)!*MRJxb(5K7jvKzkdDt_3Kxj zczF}_Qb`zny8tyk3bXUOr@)+HvaKAD`cO%@d3D6lO z@C7qEBM-iyMRyf^K~3nagD)ruUC{(zkfO7&hc6g$gOtybgd1@VUy$I23P&$FstWnd zIh-jkL|pO@`M41@@CDsAOU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W20 zF4&=va}ax#6i){bsH}JRo+BCbFRoby;x+$Z5zXmVr}H}#rFA|}#x~%sp5#ab` zeHEaHUM7InrT_A-UKzEwpRpGqdZloLF7}OL(5wz0Ndx$bRp~QK7vNbSWYj;+ZpkPU4@06Du`W(&Gidy; zP;YfYM$q9Z`;FRtGi!Ic;x{)Za5CRSyG(dNLPFiE4k6pmURqenkVE`Zo23gf=44^+cj%@az>S1Ct6A#D`e9s**HnaCVy|&SV&1iyz6K| z*-9+o*j7Ti=_L?n&m`O`j@1bvEbkbN{F^U@3CvD9CcQr*BqY?kAg4VeC`FtrgviiN z&pM_s@{OXvcl}uIc5zBO21D@@A+iVgxaA$|FbcXWiqip}RUCVg$sc+v9uCm6s$(b< z@|BBM07{K%Iw%8VQYfZ-h47ST1IJJ%0zx28;91Erl!-tB5GU}gIS1@}xTbsR#+P^eav24M-uvO+bK2BC?9Am-K*(&WoCrQ(ys z7084urCy#rIR*7(L`Fy;6g@uDLv`yLD}v*>u)a`Z_mEF)T3s3xiWavIx&1T1&%tc-I0$Uu@3vT?-7ql3F50wT=KEXmJ)}*kl$7RGbR7?Hb8Ec^k`~k*slGY_vbt z1C96Lq`INa3Vr_?pMF=OQ;{TDU1a!#+4G>FJ_@Ws$Am~Wd19uF-iXPva3vx05axEV>pu57jiEV_K63A<|9 zCfIqvG)>r*&bFfuSCW+2d`iO+1O__E9(m9 + + + + + + + + + + + + + + + + + Angular Starter Kit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 0000000..30a574e --- /dev/null +++ b/src/manifest.json @@ -0,0 +1,25 @@ +{ + "name": "Angular Boilerplate", + "short_name": "AB", + "icons": [{ + "src": "images/icon-128x128.png", + "sizes": "128x128", + "type": "image/png" + }, { + "src": "images/apple-touch-icon.png", + "sizes": "152x152", + "type": "image/png" + }, { + "src": "images/ms-touch-icon-144x144-precomposed.png", + "sizes": "144x144", + "type": "image/png" + }, { + "src": "images/chrome-touch-icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }], + "start_url": "/index.html", + "display": "standalone", + "background_color": "#3E4EB8", + "theme_color": "#2F3BA2" +} diff --git a/src/manifest.webapp b/src/manifest.webapp new file mode 100644 index 0000000..b8d88e7 --- /dev/null +++ b/src/manifest.webapp @@ -0,0 +1,25 @@ +{ + "version": "1.0.1", + "name": "Angular boilerplate", + "launch_path": "/index.html", + "description": "Angular boilerplate", + "icons": { + "128": "/images/icon-128x128.png" + }, + "developer": { + "name": "Andrea Sonny ", + "url": "https://github.com/andreasonny83" + }, + "installs_allowed_from": [ + "*" + ], + "default_locale": "en", + "permissions": { + }, + "locales": { + "en": { + "name": "Angular boilerplate", + "description": "Angular boilerplate" + } + } +} diff --git a/src/robots.txt b/src/robots.txt new file mode 100644 index 0000000..d0e5f1b --- /dev/null +++ b/src/robots.txt @@ -0,0 +1,5 @@ +# www.robotstxt.org/ + +# Allow crawling of all content +User-agent: * +Disallow: diff --git a/src/sass/main.scss b/src/sass/main.scss new file mode 100644 index 0000000..592b1d2 --- /dev/null +++ b/src/sass/main.scss @@ -0,0 +1,13 @@ +/****************************************************************** + + Angular Boilderplate + +******************************************************************/ + +/* Partials */ +@import "partials/variables"; + +/* Modules */ +@import "modules/main"; +@import "modules/home"; +@import "modules/rating"; diff --git a/src/sass/modules/_home.scss b/src/sass/modules/_home.scss new file mode 100644 index 0000000..b428e60 --- /dev/null +++ b/src/sass/modules/_home.scss @@ -0,0 +1,3 @@ +h1.product-name { + text-transform: capitalize; +} diff --git a/src/sass/modules/_main.scss b/src/sass/modules/_main.scss new file mode 100644 index 0000000..8a158c5 --- /dev/null +++ b/src/sass/modules/_main.scss @@ -0,0 +1,5 @@ +/****************************************************************** + + Main + +******************************************************************/ diff --git a/src/sass/modules/_rating.scss b/src/sass/modules/_rating.scss new file mode 100644 index 0000000..e4e7603 --- /dev/null +++ b/src/sass/modules/_rating.scss @@ -0,0 +1,29 @@ +.angular-input-stars { + display: inline-block; + padding: 0; + margin-left: -5px; + list-style: none; + + &.stars-big > li { + font-size: 32px; + } + + & > li { + font-size: 17px; + + display: inline-block; + padding-right: 5px; + padding-left: 5px; + + cursor: pointer; + + i.readonly { + cursor: not-allowed; + } + + .active { + color: $stars; + text-shadow: black 0 0 1px, 0 0 1px ; + } + } +} diff --git a/src/sass/partials/_variables.scss b/src/sass/partials/_variables.scss new file mode 100644 index 0000000..422c01d --- /dev/null +++ b/src/sass/partials/_variables.scss @@ -0,0 +1,7 @@ +/****************************************************************** + + Variables + +******************************************************************/ + +$stars: #FDE35E;