├── .angular-cli.json
├── .circleci
└── config.yml
├── .editorconfig
├── .github
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── e2e
├── app.e2e-spec.ts
├── app.po.ts
└── tsconfig.e2e.json
├── karma.conf.js
├── package.json
├── protractor.conf.js
├── src
├── app
│ ├── +about
│ │ ├── about-apple-pear.component.spec.ts
│ │ ├── about-apple-pear.component.ts
│ │ ├── about-banana.component.spec.ts
│ │ ├── about-banana.component.ts
│ │ ├── about-us.component.spec.ts
│ │ ├── about-us.component.ts
│ │ ├── about.component.spec.ts
│ │ ├── about.component.ts
│ │ ├── about.module.ts
│ │ └── about.routes.ts
│ ├── +home
│ │ ├── home.component.spec.ts
│ │ ├── home.component.ts
│ │ ├── home.module.ts
│ │ └── home.routes.ts
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.spec.ts
│ ├── app.component.ts
│ ├── app.module.ts
│ ├── app.routes.ts
│ └── shared
│ │ ├── change-language.component.spec.ts
│ │ └── change-language.component.ts
├── assets
│ ├── .gitkeep
│ ├── config.local.json
│ └── i18n
│ │ ├── en.json
│ │ └── tr.json
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── main.ts
├── polyfills.ts
├── styles.css
├── test.ts
├── testing
│ ├── core
│ │ ├── index.ts
│ │ └── mocks
│ │ │ └── config-service.mock.ts
│ └── router
│ │ └── testing
│ │ ├── index.ts
│ │ └── mocks
│ │ ├── activated-route.mock.ts
│ │ └── router.mock.ts
├── tsconfig.app.json
├── tsconfig.spec.json
└── typings.d.ts
├── tsconfig.json
├── tslint.json
└── yarn.lock
/.angular-cli.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "project": {
4 | "name": "example-app"
5 | },
6 | "apps": [
7 | {
8 | "root": "src",
9 | "outDir": "dist",
10 | "assets": [
11 | "assets",
12 | "favicon.ico"
13 | ],
14 | "index": "index.html",
15 | "main": "main.ts",
16 | "polyfills": "polyfills.ts",
17 | "test": "test.ts",
18 | "tsconfig": "tsconfig.app.json",
19 | "testTsconfig": "tsconfig.spec.json",
20 | "prefix": "app",
21 | "styles": [
22 | "styles.css"
23 | ],
24 | "scripts": [],
25 | "environmentSource": "environments/environment.ts",
26 | "environments": {
27 | "dev": "environments/environment.ts",
28 | "prod": "environments/environment.prod.ts"
29 | }
30 | }
31 | ],
32 | "e2e": {
33 | "protractor": {
34 | "config": "./protractor.conf.js"
35 | }
36 | },
37 | "lint": [
38 | {
39 | "project": "src/tsconfig.app.json",
40 | "exclude": "**/node_modules/**"
41 | },
42 | {
43 | "project": "src/tsconfig.spec.json",
44 | "exclude": "**/node_modules/**"
45 | },
46 | {
47 | "project": "e2e/tsconfig.e2e.json",
48 | "exclude": "**/node_modules/**"
49 | }
50 | ],
51 | "test": {
52 | "karma": {
53 | "config": "./karma.conf.js"
54 | }
55 | },
56 | "defaults": {
57 | "styleExt": "css",
58 | "component": {}
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | jobs:
3 | build:
4 | docker:
5 | - image: circleci/node:7-browsers
6 | branches:
7 | ignore:
8 | - gh-pages
9 | steps:
10 | - checkout
11 | - run: sudo npm install -g yarn@0
12 | - run: sudo yarn global add greenkeeper-lockfile@1
13 | - restore_cache:
14 | keys:
15 | - deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
16 | - deps-
17 | - run: yarn
18 | - save_cache:
19 | key: deps-{{ .Branch }}-{{ checksum "yarn.lock" }}
20 | paths: 'node_modules'
21 | - run: yarn ci:before
22 | - run: yarn build
23 | - run: yarn test:ci
24 | - run: yarn e2e
25 | - run: yarn ci:after
26 | - run: bash <(curl -s https://codecov.io/bash)
27 | - store_artifacts:
28 | path: coverage
29 | prefix: coverage
30 | - store_artifacts:
31 | path: dist
32 | prefix: dist
33 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 |
6 |
7 | **I'm submitting a ...** (check one with "x")
8 | ```
9 | [ ] Regression (a behavior that used to work and stopped working in a new release)
10 | [ ] Bug report
11 | [ ] Support request =>
12 | [ ] Feature request
13 | [ ] Documentation issue or request
14 | ```
15 |
16 | **Current behavior**
17 |
18 |
19 | **Expected/desired behavior**
20 |
21 |
22 | **Minimal reproduction of the problem with instructions**
23 |
27 |
28 | **What is the motivation / use case for changing the behavior?**
29 |
30 |
31 | **Environment**
32 | * **Angular version:** X.Y.Z
33 |
34 |
35 | * **Browser:**
36 | - [ ] Chrome (desktop) version XX
37 | - [ ] Chrome (Android) version XX
38 | - [ ] Chrome (iOS) version XX
39 | - [ ] Firefox version XX
40 | - [ ] Safari (desktop) version XX
41 | - [ ] Safari (iOS) version XX
42 | - [ ] IE version XX
43 | - [ ] Edge version XX
44 |
45 | * **For Tooling issues:**
46 | - Node version: XX
47 | - Platform:
48 |
49 | * Others:
50 |
51 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ** PR Checklist
2 | Please check if your PR fulfills the following requirements:
3 |
4 | - [ ] The commit message follows our guidelines: https://github.com/ng-seed/spa/blob/master/CONTRIBUTING.md#commit
5 | - [ ] Tests for the changes have been added (for bug fixes / features)
6 | - [ ] Docs have been added / updated (for bug fixes / features)
7 |
8 | ** PR Type
9 | What kind of change does this PR introduce?
10 |
11 |
12 | ```
13 | [ ] Bugfix
14 | [ ] Feature
15 | [ ] Code style update (formatting, local variables)
16 | [ ] Refactoring (no functional changes, no api changes)
17 | [ ] Build related changes
18 | [ ] CI related changes
19 | [ ] Documentation content changes
20 | [ ] Other... Please describe:
21 | ```
22 |
23 | ** What is the current behavior?
24 |
25 |
26 | Issue Number: N/A
27 |
28 | ** What is the new behavior?
29 |
30 | ** Does this PR introduce a breaking change?
31 | ```
32 | [ ] Yes
33 | [ ] No
34 | ```
35 |
36 |
37 |
38 | ** Other information
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 | yarn-error.log
36 |
37 | # e2e
38 | /e2e/*.js
39 | /e2e/*.map
40 |
41 | # System Files
42 | .DS_Store
43 | Thumbs.db
44 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Change Log
2 |
3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4 |
5 |
6 | # 1.0.0 (2017-09-08)
7 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at mail@buraktasci.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing to ng-seed/spa
2 |
3 | We would love for you to contribute to **`ng-seed/spa`** and help make it even better than it is today! As a contributor,
4 | here are the guidelines we would like you to follow:
5 |
6 | - [Code of Conduct](#coc)
7 | - [Issues and Bugs](#issue)
8 | - [Feature requests](#feature)
9 | - [Submission guidelines](#submit)
10 | - [Coding rules](#rules)
11 | - [Commit message guidelines](#commit)
12 |
13 | ## Code of Conduct
14 | Help us keep **`ng-seed/spa`** open and inclusive. Please read and follow our [Code of Conduct][coc].
15 |
16 | ## Found a Bug?
17 | If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository][github].
18 |
19 | Even better, you can [submit a Pull Request](#submit-pr) with a fix.
20 |
21 | ## Missing a Feature?
22 | You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
23 |
24 | If you would like to *implement* a new feature, please submit an issue with a proposal for your work first, to be sure that
25 | we can use it.
26 |
27 | Please consider what kind of change it is:
28 | * For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
29 | This will also allow us to better coordinate our efforts, prevent duplication of work, and help you to craft the change
30 | so that it is successfully accepted into the project.
31 | * **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
32 |
33 | ## Submission guidelines
34 | ### Submitting an Issue
35 | Before you submit an issue, please search the issue tracker, maybe an issue for your problem already exists and the discussion
36 | might inform you of workarounds readily available.
37 |
38 | We want to fix all the issues as soon as possible, but before fixing a bug we need to reproduce and confirm it. In order
39 | to reproduce bugs we will systematically ask you to provide a minimal reproduction scenario using http://plnkr.co.
40 |
41 | Having a live, reproducible scenario gives us wealth of important information without going back & forth to you with additional
42 | questions like:
43 | - version used
44 | - 3rd-party libraries and their versions
45 | - and most importantly: a use-case that fails
46 |
47 | A minimal reproduce scenario using http://plnkr.co/ allows us to quickly confirm a bug (or point out coding problem) as
48 | well as confirm that we are fixing the right problem. If plunker is not a suitable way to demonstrate the problem (*ex:
49 | issues related to our npm packaging*), please create a standalone git repository demonstrating the problem.
50 |
51 | We will be insisting on a minimal reproduce scenario in order to save maintainers time and ultimately be able to fix more
52 | bugs.
53 |
54 | Interestingly, from our experience users often find coding problems themselves while preparing a minimal plunk. We understand
55 | that sometimes it might be hard to extract essentials bits of code from a larger code-base but we really need to isolate
56 | the problem before we can fix it.
57 |
58 | Unfortunately we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you,
59 | we are going to close an issue that don't have enough info to be reproduced.
60 |
61 | You can file new issues by filling out our [new issue form](https://github.com/ng-seed/spa/issues/new).
62 |
63 | ### Submitting a Pull Request (PR)
64 | Before you submit your Pull Request (PR) consider the following guidelines:
65 |
66 | * Search [GitHub](https://github.com/ng-seed/spa/pulls) for an open or closed PR that relates to your submission.
67 | You don't want to duplicate effort.
68 | * Make your changes in a new git branch:
69 | ```shell
70 | git checkout -b my-fix-branch master
71 | ```
72 | * Create your patch, **including appropriate test cases**.
73 | * Follow our [Coding rules](#rules).
74 | * Run the full test suite and ensure that all tests pass.
75 | * Commit your changes using a descriptive commit message that follows our [commit message conventions](#commit).
76 | Adherence to these conventions is necessary because release notes are automatically generated from these messages.
77 | ```shell
78 | git commit -a
79 | ```
80 | Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
81 | * Push your branch to GitHub:
82 | ```shell
83 | git push origin my-fix-branch
84 | ```
85 | * In GitHub, send a pull request to `spa:master`.
86 | * If we suggest changes then:
87 | * Make the required updates.
88 | * Re-run the test suites to ensure tests are still passing.
89 | * Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
90 | ```shell
91 | git rebase master -i
92 | git push -f
93 | ```
94 | That's it, thanks for your contribution!
95 |
96 | #### After your pull request is merged
97 | After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
98 | * Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
99 | ```shell
100 | git push origin --delete my-fix-branch
101 | ```
102 | * Check out the master branch:
103 | ```shell
104 | git checkout master -f
105 | ```
106 | * Delete the local branch:
107 | ```shell
108 | git branch -D my-fix-branch
109 | ```
110 | * Update your master with the latest upstream version:
111 | ```shell
112 | git pull --ff upstream master
113 | ```
114 |
115 | ## Coding rules
116 | To ensure consistency throughout the source code, keep these rules in mind as you are working:
117 | * All features or bug fixes **must be tested** by one or more specs (unit-tests).
118 | * All public API methods **must be documented**. (Details TBC).
119 | * We follow [fulls1z3's Angular TSLint rules][angular-tslint-rules].
120 |
121 | ## Commit message guidelines
122 | We have very precise rules over how our git commit messages can be formatted. This leads to **more readable messages** that
123 | are easy to follow when looking through the **project history**. But also, we use the git commit messages to **generate
124 | the `ng-seed/spa` change log**.
125 |
126 | ### Commit Message Format
127 | Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes
128 | a **type**, an *optional* **scope** (*when applicable*) and a **subject**:
129 | #### Without scope
130 | ```
131 | :
132 |
133 |
134 |
135 |