Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angular-material-extensions/pages
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.2
Choose a base ref
...
head repository: angular-material-extensions/pages
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jun 17, 2018

  1. Copy the full SHA
    c0a37d8 View commit details
  2. Copy the full SHA
    d695191 View commit details
  3. Copy the full SHA
    e4aba6c View commit details
  4. Merge pull request #55 from angular-material-extensions/greenkeeper/i…

    …nitial
    
    Update dependencies to enable Greenkeeper 🌴
    AnthonyNahas authored Jun 17, 2018

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6a9471d View commit details
  5. Copy the full SHA
    870904a View commit details
  6. Copy the full SHA
    39ae3f6 View commit details
  7. Copy the full SHA
    14c54b8 View commit details
  8. Copy the full SHA
    11b4eaf View commit details
  9. Copy the full SHA
    13f2358 View commit details
  10. Copy the full SHA
    88d6cc3 View commit details

Commits on Aug 7, 2018

  1. Copy the full SHA
    32239df View commit details

Commits on Aug 11, 2018

  1. Copy the full SHA
    2acdcb6 View commit details
  2. Copy the full SHA
    abf40a8 View commit details
  3. Copy the full SHA
    874e2fb View commit details
  4. Copy the full SHA
    d2f1ba2 View commit details
  5. fix(project): minor

    AnthonyNahas committed Aug 11, 2018
    Copy the full SHA
    da3f437 View commit details
  6. Copy the full SHA
    82a386b View commit details

Commits on Nov 2, 2018

  1. Copy the full SHA
    6a89d47 View commit details
  2. Copy the full SHA
    0f51db6 View commit details
  3. Copy the full SHA
    956eb7b View commit details
  4. Copy the full SHA
    66d89c7 View commit details
  5. Copy the full SHA
    30436ac View commit details

Commits on Nov 29, 2018

  1. Copy the full SHA
    7e8558f View commit details
  2. Copy the full SHA
    0128aee View commit details

Commits on Dec 1, 2018

  1. Copy the full SHA
    d4ab030 View commit details
  2. Copy the full SHA
    da43009 View commit details
  3. Copy the full SHA
    a9e9575 View commit details

Commits on Dec 14, 2018

  1. Copy the full SHA
    b6427dd View commit details
  2. Copy the full SHA
    bd36342 View commit details
  3. Copy the full SHA
    c040210 View commit details

Commits on Dec 21, 2018

  1. Copy the full SHA
    253561f View commit details
  2. Copy the full SHA
    23ce55f View commit details

Commits on Mar 23, 2019

  1. Copy the full SHA
    b6f42d3 View commit details

Commits on Mar 24, 2019

  1. Copy the full SHA
    6251113 View commit details

Commits on Mar 28, 2019

  1. Copy the full SHA
    63c8637 View commit details
  2. Copy the full SHA
    b6d1e02 View commit details
  3. Copy the full SHA
    c30afa6 View commit details

Commits on Jul 17, 2019

  1. fix(package): minor

    AnthonyNahas committed Jul 17, 2019
    Copy the full SHA
    5901289 View commit details

Commits on Jul 23, 2019

  1. Copy the full SHA
    14b917c View commit details
  2. Copy the full SHA
    4e78005 View commit details
  3. Copy the full SHA
    b028451 View commit details
  4. Copy the full SHA
    c53780e View commit details
  5. Copy the full SHA
    ee77297 View commit details
  6. Copy the full SHA
    c698fe9 View commit details
  7. Copy the full SHA
    78c959c View commit details
  8. Copy the full SHA
    eecf36f View commit details
  9. Copy the full SHA
    46b894b View commit details
  10. Copy the full SHA
    f8e20d6 View commit details
  11. Copy the full SHA
    da41d97 View commit details
  12. Copy the full SHA
    a42bc67 View commit details
Showing with 22,688 additions and 31,974 deletions.
  1. +172 −33 .circleci/config.yml
  2. +5 −0 .firebaserc
  3. +13 −0 .github/FUNDING.yml
  4. +1 −0 .gitignore
  5. +1 −3 .travis.yml
  6. +3 −3 .yo-rc.json
  7. +96 −50 CHANGELOG.md
  8. +1 −1 LICENSE
  9. +207 −67 README.md
  10. +103 −10 {demo → }/angular.json
  11. BIN assets/angular-material-extensions-logo.png
  12. +12 −0 browserslist
  13. +0 −13 demo/.editorconfig
  14. +0 −5 demo/.firebaserc
  15. +0 −43 demo/.gitignore
  16. +0 −27 demo/README.md
  17. +0 −15,273 demo/package-lock.json
  18. +0 −76 demo/package.json
  19. +0 −57 demo/server.ts
  20. +0 −20 demo/src/app/app-routing.module.ts
  21. +0 −40 demo/src/app/app.component.spec.ts
  22. +0 −11 demo/src/app/home/home-routing.module.ts
  23. +0 −79 demo/src/app/shared/header/header.component.spec.ts
  24. +0 −1 demo/src/main.server.ts
  25. +0 −24 demo/src/main.ts
  26. +0 −1 demo/src/testing/index.ts
  27. +0 −61 demo/src/testing/router-stubs.ts
  28. +0 −21 demo/src/tsconfig.spec.json
  29. +0 −19 demo/tsconfig.json
  30. +0 −142 demo/tslint.json
  31. +0 −38 demo/webpack.server.config.js
  32. +1 −1 {demo → }/e2e/app.e2e-spec.ts
  33. 0 {demo → }/e2e/app.po.ts
  34. 0 {demo → }/e2e/tsconfig.e2e.json
  35. +1 −1 {demo → }/firebase.json
  36. +10 −0 greenkeeper.json
  37. +18 −8 gulpfile.js
  38. +33 −1 karma.conf.js
  39. +20,434 −15,164 package-lock.json
  40. +104 −131 package.json
  41. +20 −17 {demo → }/prerender.ts
  42. +327 −0 projects/angular-material-extensions/pages/README.md
  43. +5 −6 {demo → projects/angular-material-extensions/pages}/karma.conf.js
  44. +7 −0 projects/angular-material-extensions/pages/ng-package.json
  45. +110 −0 projects/angular-material-extensions/pages/package.json
  46. +28 −0 projects/angular-material-extensions/pages/schematics/README.md
  47. +9 −0 projects/angular-material-extensions/pages/schematics/collection.json
  48. +98 −0 projects/angular-material-extensions/pages/schematics/ng-add/index.ts
  49. +16 −0 projects/angular-material-extensions/pages/schematics/ng-add/index_spec.ts
  50. 0 ...ojects/angular-material-extensions/pages/src/lib/mat-page-content/mat-page-content.component.html
  51. 0 ...ojects/angular-material-extensions/pages/src/lib/mat-page-content/mat-page-content.component.scss
  52. +5 −5 ...cts/angular-material-extensions/pages/src/lib/mat-page-content/mat-page-content.component.spec.ts
  53. +23 −0 projects/angular-material-extensions/pages/src/lib/mat-page-content/mat-page-content.component.ts
  54. 0 ...projects/angular-material-extensions/pages/src/lib/mat-page-loader/mat-page-loader.component.html
  55. 0 ...projects/angular-material-extensions/pages/src/lib/mat-page-loader/mat-page-loader.component.scss
  56. +5 −5 ...jects/angular-material-extensions/pages/src/lib/mat-page-loader/mat-page-loader.component.spec.ts
  57. +15 −0 projects/angular-material-extensions/pages/src/lib/mat-page-loader/mat-page-loader.component.ts
  58. 0 ...ojects/angular-material-extensions/pages/src/lib/mat-page-outlook/mat-page-outlook.component.html
  59. 0 ...ojects/angular-material-extensions/pages/src/lib/mat-page-outlook/mat-page-outlook.component.scss
  60. +5 −5 ...cts/angular-material-extensions/pages/src/lib/mat-page-outlook/mat-page-outlook.component.spec.ts
  61. +26 −0 projects/angular-material-extensions/pages/src/lib/mat-page-outlook/mat-page-outlook.component.ts
  62. 0 ...ages.component.html → projects/angular-material-extensions/pages/src/lib/mat-pages.component.html
  63. 0 ...ages.component.scss → projects/angular-material-extensions/pages/src/lib/mat-pages.component.scss
  64. +5 −5 ...omponent.spec.ts → projects/angular-material-extensions/pages/src/lib/mat-pages.component.spec.ts
  65. +20 −13 ...al-pages.component.ts → projects/angular-material-extensions/pages/src/lib/mat-pages.component.ts
  66. +49 −0 projects/angular-material-extensions/pages/src/lib/mat-pages.module.ts
  67. +10 −0 projects/angular-material-extensions/pages/src/lib/pages.module.ts
  68. +9 −0 projects/angular-material-extensions/pages/src/public-api.ts
  69. +21 −0 projects/angular-material-extensions/pages/src/test.ts
  70. +25 −0 projects/angular-material-extensions/pages/tsconfig.lib.json
  71. +6 −0 projects/angular-material-extensions/pages/tsconfig.lib.prod.json
  72. +35 −0 projects/angular-material-extensions/pages/tsconfig.schematics.json
  73. +17 −0 projects/angular-material-extensions/pages/tsconfig.spec.json
  74. +17 −0 projects/angular-material-extensions/pages/tslint.json
  75. 0 {demo → }/protractor.conf.js
  76. 0 {demo → }/proxy.conf.json
  77. +60 −0 server.ts
  78. +50 −0 server.ts.bak
  79. 0 {demo → }/src/_variables.scss
  80. +27 −0 src/app/app-routing.module.ts
  81. 0 {demo → }/src/app/app.component.html
  82. 0 {demo → }/src/app/app.component.scss
  83. 0 {demo → }/src/app/app.component.ts
  84. +1 −1 {demo → }/src/app/app.module.ts
  85. +2 −4 {demo → }/src/app/app.server.module.ts
  86. 0 {demo → }/src/app/getting-started/getting-started-routing.module.ts
  87. +90 −90 {demo → }/src/app/getting-started/getting-started.component.html
  88. +1 −1 {demo → }/src/app/getting-started/getting-started.component.scss
  89. 0 {demo → }/src/app/getting-started/getting-started.component.spec.ts
  90. +28 −28 {demo → }/src/app/getting-started/getting-started.component.ts
  91. +9 −4 {demo → }/src/app/getting-started/getting-started.module.ts
  92. +12 −0 src/app/home/home-routing.module.ts
  93. +27 −27 {demo → }/src/app/home/home.component.html
  94. +1 −1 {demo → }/src/app/home/home.component.scss
  95. +2 −2 {demo → }/src/app/home/home.component.spec.ts
  96. +2 −2 {demo → }/src/app/home/home.component.ts
  97. +6 −4 {demo → }/src/app/home/home.module.ts
  98. 0 {demo → }/src/app/shared/content-wrapper/content-wrapper.component.html
  99. 0 ...-material-page-loader.component.html → app/shared/content-wrapper/content-wrapper.component.scss}
  100. 0 {demo → }/src/app/shared/content-wrapper/content-wrapper.component.spec.ts
  101. 0 {demo → }/src/app/shared/content-wrapper/content-wrapper.component.ts
  102. +2 −2 {demo → }/src/app/shared/footer/footer.component.html
  103. 0 {demo → }/src/app/shared/footer/footer.component.scss
  104. 0 {demo → }/src/app/shared/footer/footer.component.spec.ts
  105. 0 {demo → }/src/app/shared/footer/footer.component.ts
  106. +2 −2 {demo → }/src/app/shared/header/header.component.html
  107. 0 {demo → }/src/app/shared/header/header.component.scss
  108. 0 {demo → }/src/app/shared/header/header.component.ts
  109. 0 {demo → }/src/app/shared/index.ts
  110. +1 −1 {demo → }/src/app/shared/shared.module.ts
  111. 0 ...aterial-pages/ngx-material-page-loader/ngx-material-page-loader.component.scss → assets/.gitkeep}
  112. 0 ...ial-pages/ngx-material-page-outlook/ngx-material-page-outlook.component.scss → assets/.npmignore}
  113. 0 {demo → }/src/assets/icons/github.svg
  114. 0 {demo → }/src/assets/lib/hljs/CHANGES.md
  115. 0 {demo → }/src/assets/lib/hljs/LICENSE
  116. 0 {demo → }/src/assets/lib/hljs/README.md
  117. 0 {demo → }/src/assets/lib/hljs/README.ru.md
  118. 0 {demo → }/src/assets/lib/hljs/highlight.pack.js
  119. 0 {demo → }/src/assets/lib/hljs/styles/agate.css
  120. 0 {demo → }/src/assets/lib/hljs/styles/androidstudio.css
  121. 0 {demo → }/src/assets/lib/hljs/styles/arduino-light.css
  122. 0 {demo → }/src/assets/lib/hljs/styles/arta.css
  123. 0 {demo → }/src/assets/lib/hljs/styles/ascetic.css
  124. 0 {demo → }/src/assets/lib/hljs/styles/atelier-cave-dark.css
  125. 0 {demo → }/src/assets/lib/hljs/styles/atelier-cave-light.css
  126. 0 {demo → }/src/assets/lib/hljs/styles/atelier-dune-dark.css
  127. 0 {demo → }/src/assets/lib/hljs/styles/atelier-dune-light.css
  128. 0 {demo → }/src/assets/lib/hljs/styles/atelier-estuary-dark.css
  129. 0 {demo → }/src/assets/lib/hljs/styles/atelier-estuary-light.css
  130. 0 {demo → }/src/assets/lib/hljs/styles/atelier-forest-dark.css
  131. 0 {demo → }/src/assets/lib/hljs/styles/atelier-forest-light.css
  132. 0 {demo → }/src/assets/lib/hljs/styles/atelier-heath-dark.css
  133. 0 {demo → }/src/assets/lib/hljs/styles/atelier-heath-light.css
  134. 0 {demo → }/src/assets/lib/hljs/styles/atelier-lakeside-dark.css
  135. 0 {demo → }/src/assets/lib/hljs/styles/atelier-lakeside-light.css
  136. 0 {demo → }/src/assets/lib/hljs/styles/atelier-plateau-dark.css
  137. 0 {demo → }/src/assets/lib/hljs/styles/atelier-plateau-light.css
  138. 0 {demo → }/src/assets/lib/hljs/styles/atelier-savanna-dark.css
  139. 0 {demo → }/src/assets/lib/hljs/styles/atelier-savanna-light.css
  140. 0 {demo → }/src/assets/lib/hljs/styles/atelier-seaside-dark.css
  141. 0 {demo → }/src/assets/lib/hljs/styles/atelier-seaside-light.css
  142. 0 {demo → }/src/assets/lib/hljs/styles/atelier-sulphurpool-dark.css
  143. 0 {demo → }/src/assets/lib/hljs/styles/atelier-sulphurpool-light.css
  144. 0 {demo → }/src/assets/lib/hljs/styles/atom-one-dark.css
  145. 0 {demo → }/src/assets/lib/hljs/styles/atom-one-light.css
  146. 0 {demo → }/src/assets/lib/hljs/styles/brown-paper.css
  147. BIN {demo → }/src/assets/lib/hljs/styles/brown-papersq.png
  148. 0 {demo → }/src/assets/lib/hljs/styles/codepen-embed.css
  149. 0 {demo → }/src/assets/lib/hljs/styles/color-brewer.css
  150. 0 {demo → }/src/assets/lib/hljs/styles/darcula.css
  151. 0 {demo → }/src/assets/lib/hljs/styles/dark.css
  152. 0 {demo → }/src/assets/lib/hljs/styles/darkula.css
  153. 0 {demo → }/src/assets/lib/hljs/styles/default.css
  154. 0 {demo → }/src/assets/lib/hljs/styles/docco.css
  155. 0 {demo → }/src/assets/lib/hljs/styles/dracula.css
  156. 0 {demo → }/src/assets/lib/hljs/styles/far.css
  157. 0 {demo → }/src/assets/lib/hljs/styles/foundation.css
  158. 0 {demo → }/src/assets/lib/hljs/styles/github-gist.css
  159. 0 {demo → }/src/assets/lib/hljs/styles/github.css
  160. 0 {demo → }/src/assets/lib/hljs/styles/googlecode.css
  161. 0 {demo → }/src/assets/lib/hljs/styles/grayscale.css
  162. 0 {demo → }/src/assets/lib/hljs/styles/gruvbox-dark.css
  163. 0 {demo → }/src/assets/lib/hljs/styles/gruvbox-light.css
  164. 0 {demo → }/src/assets/lib/hljs/styles/hopscotch.css
  165. 0 {demo → }/src/assets/lib/hljs/styles/hybrid.css
  166. 0 {demo → }/src/assets/lib/hljs/styles/idea.css
  167. 0 {demo → }/src/assets/lib/hljs/styles/ir-black.css
  168. 0 {demo → }/src/assets/lib/hljs/styles/kimbie.dark.css
  169. 0 {demo → }/src/assets/lib/hljs/styles/kimbie.light.css
  170. 0 {demo → }/src/assets/lib/hljs/styles/magula.css
  171. 0 {demo → }/src/assets/lib/hljs/styles/mono-blue.css
  172. 0 {demo → }/src/assets/lib/hljs/styles/monokai-sublime.css
  173. 0 {demo → }/src/assets/lib/hljs/styles/monokai.css
  174. 0 {demo → }/src/assets/lib/hljs/styles/obsidian.css
  175. 0 {demo → }/src/assets/lib/hljs/styles/ocean.css
  176. 0 {demo → }/src/assets/lib/hljs/styles/paraiso-dark.css
  177. 0 {demo → }/src/assets/lib/hljs/styles/paraiso-light.css
  178. 0 {demo → }/src/assets/lib/hljs/styles/pojoaque.css
  179. BIN {demo → }/src/assets/lib/hljs/styles/pojoaque.jpg
  180. 0 {demo → }/src/assets/lib/hljs/styles/purebasic.css
  181. 0 {demo → }/src/assets/lib/hljs/styles/qtcreator_dark.css
  182. 0 {demo → }/src/assets/lib/hljs/styles/qtcreator_light.css
  183. 0 {demo → }/src/assets/lib/hljs/styles/railscasts.css
  184. 0 {demo → }/src/assets/lib/hljs/styles/rainbow.css
  185. 0 {demo → }/src/assets/lib/hljs/styles/routeros.css
  186. 0 {demo → }/src/assets/lib/hljs/styles/school-book.css
  187. BIN {demo → }/src/assets/lib/hljs/styles/school-book.png
  188. 0 {demo → }/src/assets/lib/hljs/styles/solarized-dark.css
  189. 0 {demo → }/src/assets/lib/hljs/styles/solarized-light.css
  190. 0 {demo → }/src/assets/lib/hljs/styles/sunburst.css
  191. 0 {demo → }/src/assets/lib/hljs/styles/tomorrow-night-blue.css
  192. 0 {demo → }/src/assets/lib/hljs/styles/tomorrow-night-bright.css
  193. 0 {demo → }/src/assets/lib/hljs/styles/tomorrow-night-eighties.css
  194. 0 {demo → }/src/assets/lib/hljs/styles/tomorrow-night.css
  195. 0 {demo → }/src/assets/lib/hljs/styles/tomorrow.css
  196. 0 {demo → }/src/assets/lib/hljs/styles/vs.css
  197. 0 {demo → }/src/assets/lib/hljs/styles/vs2015.css
  198. 0 {demo → }/src/assets/lib/hljs/styles/xcode.css
  199. 0 {demo → }/src/assets/lib/hljs/styles/xt256.css
  200. 0 {demo → }/src/assets/lib/hljs/styles/zenburn.css
  201. 0 {demo → }/src/assets/logo.svg
  202. 0 {demo → }/src/environments/environment.hmr.ts
  203. 0 {demo → }/src/environments/environment.prod.ts
  204. 0 {demo → }/src/environments/environment.ts
  205. BIN {demo → }/src/favicon.ico
  206. 0 {demo → }/src/hmr.ts
  207. +11 −10 {demo → }/src/index.html
  208. +0 −1 src/index.ts
  209. +11 −0 src/main.server.ts
  210. +24 −0 src/main.ts
  211. 0 demo/src/ngx-material-pages_theme.scss → src/material_theme.scss
  212. +0 −23 ...le/components/ngx-material-pages/ngx-material-page-content/ngx-material-page-content.component.ts
  213. +0 −26 ...dule/components/ngx-material-pages/ngx-material-page-loader/ngx-material-page-loader.component.ts
  214. +0 −36 ...le/components/ngx-material-pages/ngx-material-page-outlook/ngx-material-page-outlook.component.ts
  215. +0 −66 src/module/ngx-material-pages.module.ts
  216. +3 −4 {demo → }/src/ngsw-config.json
  217. +1 −1 {demo → }/src/polyfills.ts
  218. 0 {demo → }/src/styles.scss
  219. 0 {demo → }/src/test.ts
  220. +3 −5 {demo → }/src/tsconfig.app.json
  221. +0 −20 src/tsconfig.lib.es5.json
  222. +0 −21 src/tsconfig.lib.json
  223. 0 {demo → }/src/tsconfig.server.json
  224. +13 −9 src/tsconfig.spec.json
  225. 0 {demo → }/src/typings.d.ts
  226. 0 {demo → }/static.paths.ts
  227. +14 −0 tsconfig.app.json
  228. +22 −11 tsconfig.json
  229. +14 −0 tsconfig.server.json
  230. +18 −0 tsconfig.spec.json
  231. +52 −92 tslint.json
  232. +51 −0 webpack.server.config.js.bak
205 changes: 172 additions & 33 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,188 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:8.9.4

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
job_defaults: &job_defaults
docker:
- image: circleci/node:10-browsers
environment:
CHROME_BIN: '/usr/bin/google-chrome'
working_directory: ~/project/repo

#app
cache_key: &cache_key pages-app-deps-cache-{{ .Branch }}-{{ checksum "package-lock.json" }}
dist_key: &dist_key pages-app-dist-{{ .Revision }}

working_directory: ~/repo
#pages dist package
cache_pages_key: &cache_pages_key pages-deps-cache-{{ .Branch }}-{{ checksum "package-lock.json" }}
dist_pages_key: &dist_pages_key pagess-dist-{{ .Revision }}

jobs:
install:
<<: *job_defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- run:
name: install-dependencies
command: npm ci
- run:
name: Install Semantic Release globally
command: sudo npm i -g semantic-release@15
- run:
name: Install resync command
command: sudo apt install rsync
- save_cache:
key: *cache_key
paths:
- node_modules

# Download and cache dependencies
lint:
<<: *job_defaults
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: ls -la && pwd
- run: git --version
- run: npm install
- run: npm install --only=dev
- run: npm run build
- run: ls -la && pwd
key: *cache_key
- run:
name: lint
command: npm run lint

test-app:
<<: *job_defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- restore_cache:
key: *dist_key
- run:
name: test
command: npm run test

build-library:
<<: *job_defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- run:
name: Install resync command
command: sudo apt install rsync
- run:
name: build @angular-material-extensions/pages library
command: cd projects/angular-material-extensions/pages && npm run build
- save_cache:
key: *dist_pages_key
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- dist/angular-material-extensions/pages

- persist_to_workspace:
root: .
paths:
- dist
# run tests!
#- run: npm test
build-prerender-app:
<<: *job_defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- restore_cache:
key: *dist_pages_key
- run:
name: check dist files
command: ls projects/angular-material-extensions/pages/
- run:
name: link library
command: sudo npm run link
- run:
name: build-prerender
command: sudo npm run build:prerender
- save_cache:
key: *dist_key
paths:
- dist

release-app:
<<: *job_defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- restore_cache:
key: *dist_key
- run:
name: release-app
command: npm run semantic-release || true

release-pages-lib:
<<: *job_defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- restore_cache:
key: *dist_pages_key
- run:
name: release-pages-lib
command: cd projects/angular-material-extensions/pages && npx semantic-release || true

deploy-app-dev:
<<: *job_defaults
steps:
- checkout
- restore_cache:
key: *cache_key
- restore_cache:
key: *dist_key
- restore_cache:
key: *dist_pages_key
- run:
name: dist outlook
command: ls dist
- run:
name: Set git email config
command: git config --global user.email "anthony.na@hotmail.de"
- run:
name: Set git name config
command: git config --global user.name "Anthony Nahas"
- run:
name: deploy-app-dev
command: npm run deploy:gh

workflows:
version: 2
build-test-release:
jobs:
- install
# - lint:
# requires:
# - install
# - test-app:
# requires:
# - install
- build-library:
requires:
- install
- build-prerender-app:
requires:
- build-library
# - test-app
- release-pages-lib:
requires:
- build-library
filters:
branches:
only: pages
- release-app:
requires:
- build-prerender-app
filters:
branches:
only: master
- deploy-app-dev:
requires:
- release-app
filters:
branches:
only: master
# - deploy-app-dev:
# requires:
# - build-prerender-app
# filters:
# branches:
# only: dev
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "@angular-material-extensions/pages"
}
}
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: angular-material-extensions
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: npm/@angular-material-extensions/pages
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://github.com/AnthonyNahas','anahas.de']
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -11,18 +11,16 @@ addons:

language: node_js
node_js:
- "6"
- "10"

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install --quiet -g gulp-cli

script: gulp test:ci
script: npx ng build @angular-material-extensions/pages

after_success: gulp coveralls

cache:
yarn: true

6 changes: 3 additions & 3 deletions .yo-rc.json
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@
"authorName": "anthonynahas",
"authorEmail": "anthony.na@hotmail.de",
"githubUsername": "anthonynahas",
"githubRepoName": "ngx-material-pages",
"projectName": "ngx-material-pages",
"githubRepoName": "@angular-material-extensions/pages",
"projectName": "@angular-material-extensions/pages",
"projectVersion": "0.0.1",
"projectDescription": "Open source library for angular apps to illustrate custom material pages content with steps (ideal for tutorials and explanation purposes)",
"projectKeywords": [
@@ -38,4 +38,4 @@
"config/setupJest.ts"
]
}
}
}
146 changes: 96 additions & 50 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,127 +1,173 @@
<a name="1.3.2"></a>
## [1.3.2](https://github.com/anthonynahas/ngx-material-pages/compare/v1.3.1...v1.3.2) (2018-06-16)
# [4.0.0](https://github.com/angular-material-extensions/pages/compare/3.0.0...4.0.0) (2020-02-09)


### Bug Fixes

* **project:** upgraded the project to angular v9 ([1564896](https://github.com/angular-material-extensions/pages/commit/1564896dc90462684e708b4765e1f8a48ae3cb26))

# [4.0.0](https://github.com/angular-material-extensions/pages/compare/3.0.0...4.0.0) (2020-02-09)


### Bug Fixes

* **project:** upgraded the project to angular v9 ([1564896](https://github.com/angular-material-extensions/pages/commit/1564896dc90462684e708b4765e1f8a48ae3cb26))

# [4.0.0](https://github.com/angular-material-extensions/pages/compare/3.0.0...4.0.0) (2020-02-09)


### Bug Fixes

* **project:** upgraded the project to angular v9 ([1564896](https://github.com/angular-material-extensions/pages/commit/1564896dc90462684e708b4765e1f8a48ae3cb26))

# [4.0.0](https://github.com/angular-material-extensions/pages/compare/3.0.0...4.0.0) (2020-02-09)


### Bug Fixes

* **project:** upgraded the project to angular v9 ([1564896](https://github.com/angular-material-extensions/pages/commit/1564896dc90462684e708b4765e1f8a48ae3cb26))















# [2.1.0](https://github.com/angular-material-extensions/pages/compare/v2.0.0...v2.1.0) (2018-11-02)


### Bug Fixes

* **package:** adjusted the "ngswConfigPath" ([abf40a8](https://github.com/angular-material-extensions/pages/commit/abf40a8))
* **project:** minor ([da3f437](https://github.com/angular-material-extensions/pages/commit/da3f437))


### Features

* **package:** support of angular v7 ([0f51db6](https://github.com/angular-material-extensions/pages/commit/0f51db6))



# [2.0.0](https://github.com/angular-material-extensions/pages/compare/v1.3.2...v2.0.0) (2018-08-11)



## [1.3.2](https://github.com/angular-material-extensions/pages/compare/v1.3.1...v1.3.2) (2018-06-16)



<a name="1.3.1"></a>
## [1.3.1](https://github.com/anthonynahas/ngx-material-pages/compare/v1.3.0...v1.3.1) (2018-05-15)
## [1.3.1](https://github.com/angular-material-extensions/pages/compare/v1.3.0...v1.3.1) (2018-05-15)


### Features

* **ngx-material-pages:** supporting lazy loading for each page ([e78441b](https://github.com/anthonynahas/ngx-material-pages/commit/e78441b))
* **ngx-material-pages:** supporting lazy loading for each page ([e78441b](https://github.com/angular-material-extensions/pages/commit/e78441b))



<a name="1.3.0"></a>
# [1.3.0](https://github.com/anthonynahas/ngx-material-pages/compare/v1.2.1...v1.3.0) (2018-05-10)
# [1.3.0](https://github.com/angular-material-extensions/pages/compare/v1.2.1...v1.3.0) (2018-05-10)


### Bug Fixes

* **package:** update [@angular](https://github.com/angular)/cdk to version 6.0.1 ([e77a9f7](https://github.com/anthonynahas/ngx-material-pages/commit/e77a9f7))
* **package:** update [@angular](https://github.com/angular)/cdk to version 6.0.1 ([e77a9f7](https://github.com/angular-material-extensions/pages/commit/e77a9f7))



<a name="1.2.1"></a>
## [1.2.1](https://github.com/anthonynahas/ngx-material-pages/compare/v1.2.0...v1.2.1) (2018-04-22)
## [1.2.1](https://github.com/angular-material-extensions/pages/compare/v1.2.0...v1.2.1) (2018-04-22)



<a name="1.2.0"></a>
# [1.2.0](https://github.com/anthonynahas/ngx-material-pages/compare/v1.1.6...v1.2.0) (2018-04-16)
# [1.2.0](https://github.com/angular-material-extensions/pages/compare/v1.1.6...v1.2.0) (2018-04-16)


### Bug Fixes

* **ngx-material-pages:** replaced ng-deep with internal manipulation with renderer2 ([51c75dc](https://github.com/anthonynahas/ngx-material-pages/commit/51c75dc))
* **ngx-material-pages:** replaced ng-deep with internal manipulation with renderer2 ([51c75dc](https://github.com/angular-material-extensions/pages/commit/51c75dc))



<a name="1.1.6"></a>
## [1.1.6](https://github.com/anthonynahas/ngx-material-pages/compare/v1.1.5...v1.1.6) (2018-04-15)
## [1.1.6](https://github.com/angular-material-extensions/pages/compare/v1.1.5...v1.1.6) (2018-04-15)


### Bug Fixes

* **ngx-material-pages:** added the peerDependencies ([3d225b3](https://github.com/anthonynahas/ngx-material-pages/commit/3d225b3))
* **ngx-material-pages:** ng-deep will not affect external tabs ([48fad96](https://github.com/anthonynahas/ngx-material-pages/commit/48fad96))
* **ngx-material-pages:** removed duplicated dependencies under dev ([2cd576e](https://github.com/anthonynahas/ngx-material-pages/commit/2cd576e))
* **ngx-material-pages:** added the peerDependencies ([3d225b3](https://github.com/angular-material-extensions/pages/commit/3d225b3))
* **ngx-material-pages:** ng-deep will not affect external tabs ([48fad96](https://github.com/angular-material-extensions/pages/commit/48fad96))
* **ngx-material-pages:** removed duplicated dependencies under dev ([2cd576e](https://github.com/angular-material-extensions/pages/commit/2cd576e))



<a name="1.1.5"></a>
## [1.1.5](https://github.com/anthonynahas/ngx-material-pages/compare/v1.1.4...v1.1.5) (2018-04-12)
## [1.1.5](https://github.com/angular-material-extensions/pages/compare/v1.1.4...v1.1.5) (2018-04-12)



<a name="1.1.4"></a>
## [1.1.4](https://github.com/anthonynahas/ngx-material-pages/compare/v1.1.3...v1.1.4) (2018-04-12)
## [1.1.4](https://github.com/angular-material-extensions/pages/compare/v1.1.3...v1.1.4) (2018-04-12)



<a name="1.1.3"></a>
## [1.1.3](https://github.com/anthonynahas/ngx-material-pages/compare/v1.1.2...v1.1.3) (2018-04-12)
## [1.1.3](https://github.com/angular-material-extensions/pages/compare/v1.1.2...v1.1.3) (2018-04-12)


### Features

* **ngx-material-pages:** input for the title of the toolbar ([da60598](https://github.com/anthonynahas/ngx-material-pages/commit/da60598))
* **ngx-material-pages:** input for the title of the toolbar ([da60598](https://github.com/angular-material-extensions/pages/commit/da60598))



<a name="1.1.2"></a>
## [1.1.2](https://github.com/anthonynahas/ngx-material-pages/compare/v1.1.1...v1.1.2) (2018-04-11)
## [1.1.2](https://github.com/angular-material-extensions/pages/compare/v1.1.1...v1.1.2) (2018-04-11)



<a name="1.1.1"></a>
## [1.1.1](https://github.com/anthonynahas/ngx-material-pages/compare/v1.1.0...v1.1.1) (2018-04-10)
## [1.1.1](https://github.com/angular-material-extensions/pages/compare/v1.1.0...v1.1.1) (2018-04-10)



<a name="1.1.0"></a>
# [1.1.0](https://github.com/anthonynahas/ngx-material-pages/compare/v1.0.1...v1.1.0) (2018-04-10)
# [1.1.0](https://github.com/angular-material-extensions/pages/compare/v1.0.1...v1.1.0) (2018-04-10)


### Features

* **lib:** added mode to sidenav and template navigation buttons + added pageChanged and done events ([a750582](https://github.com/anthonynahas/ngx-material-pages/commit/a750582))
* **ngx-material-pages:** added optional title input to the outlook component ([5237ea8](https://github.com/anthonynahas/ngx-material-pages/commit/5237ea8))
* **lib:** added mode to sidenav and template navigation buttons + added pageChanged and done events ([a750582](https://github.com/angular-material-extensions/pages/commit/a750582))
* **ngx-material-pages:** added optional title input to the outlook component ([5237ea8](https://github.com/angular-material-extensions/pages/commit/5237ea8))



<a name="1.0.1"></a>
## [1.0.1](https://github.com/anthonynahas/ngx-material-pages/compare/v1.0.0...v1.0.1) (2018-04-09)
## [1.0.1](https://github.com/angular-material-extensions/pages/compare/v1.0.0...v1.0.1) (2018-04-09)



<a name="1.0.0"></a>
# [1.0.0](https://github.com/anthonynahas/ngx-material-pages/compare/v0.0.1...v1.0.0) (2018-04-09)
# [1.0.0](https://github.com/angular-material-extensions/pages/compare/v0.0.1...v1.0.0) (2018-04-09)


### Bug Fixes

* **components:** deleted old versions ([514d252](https://github.com/anthonynahas/ngx-material-pages/commit/514d252))
* **ngx-material-pages:** added addtional material module (toolbar and button) ([f19c33d](https://github.com/anthonynahas/ngx-material-pages/commit/f19c33d))
* **ngx-material-pages:** removed the template in the loader component ([6988556](https://github.com/anthonynahas/ngx-material-pages/commit/6988556))
* **ngx-material-pages:** removed unwanted component and service (default) ([0511527](https://github.com/anthonynahas/ngx-material-pages/commit/0511527))
* **components:** deleted old versions ([514d252](https://github.com/angular-material-extensions/pages/commit/514d252))
* **ngx-material-pages:** added addtional material module (toolbar and button) ([f19c33d](https://github.com/angular-material-extensions/pages/commit/f19c33d))
* **ngx-material-pages:** removed the template in the loader component ([6988556](https://github.com/angular-material-extensions/pages/commit/6988556))
* **ngx-material-pages:** removed unwanted component and service (default) ([0511527](https://github.com/angular-material-extensions/pages/commit/0511527))


### Features

* **ngx-material-pages:** added page content component ([e40b4f5](https://github.com/anthonynahas/ngx-material-pages/commit/e40b4f5))
* **ngx-material-pages:** added page loader component ([7bb6be4](https://github.com/anthonynahas/ngx-material-pages/commit/7bb6be4))
* **ngx-material-pages:** added page outlook component ([72186c8](https://github.com/anthonynahas/ngx-material-pages/commit/72186c8))
* **ngx-material-pages:** added synchronization between the page content and outlook ([650ac80](https://github.com/anthonynahas/ngx-material-pages/commit/650ac80))
* **ngx-material-pages:** added the main ngx-material-pages component ([509ff32](https://github.com/anthonynahas/ngx-material-pages/commit/509ff32))
* **ngx-material-pages:** improved the layout ([51630c9](https://github.com/anthonynahas/ngx-material-pages/commit/51630c9))
* **project:** added cricleci configuration ([df72046](https://github.com/anthonynahas/ngx-material-pages/commit/df72046))
* **ts-lint:** added codelyzer module as dev dependencies ([9317edb](https://github.com/anthonynahas/ngx-material-pages/commit/9317edb))
* **ngx-material-pages:** added page content component ([e40b4f5](https://github.com/angular-material-extensions/pages/commit/e40b4f5))
* **ngx-material-pages:** added page loader component ([7bb6be4](https://github.com/angular-material-extensions/pages/commit/7bb6be4))
* **ngx-material-pages:** added page outlook component ([72186c8](https://github.com/angular-material-extensions/pages/commit/72186c8))
* **ngx-material-pages:** added synchronization between the page content and outlook ([650ac80](https://github.com/angular-material-extensions/pages/commit/650ac80))
* **ngx-material-pages:** added the main ngx-material-pages component ([509ff32](https://github.com/angular-material-extensions/pages/commit/509ff32))
* **ngx-material-pages:** improved the layout ([51630c9](https://github.com/angular-material-extensions/pages/commit/51630c9))
* **project:** added cricleci configuration ([df72046](https://github.com/angular-material-extensions/pages/commit/df72046))
* **ts-lint:** added codelyzer module as dev dependencies ([9317edb](https://github.com/angular-material-extensions/pages/commit/9317edb))



<a name="0.0.1"></a>
## 0.0.1 (2018-04-08)


2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Anthony Nahas
Copyright (c) 2019 Anthony Nahas

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
274 changes: 207 additions & 67 deletions README.md

Large diffs are not rendered by default.

113 changes: 103 additions & 10 deletions demo/angular.json → angular.json
Original file line number Diff line number Diff line change
@@ -3,14 +3,15 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"bsr": {
"demoapp": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.ts",
@@ -27,6 +28,12 @@
},
"configurations": {
"hmr": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
@@ -35,6 +42,12 @@
]
},
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
@@ -45,7 +58,7 @@
"vendorChunk": false,
"buildOptimizer": true,
"serviceWorker": true,
"ngswConfigPath": "/src/ngsw-config.json",
"ngswConfigPath": "src/ngsw-config.json",
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
@@ -58,21 +71,21 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "bsr:build"
"browserTarget": "demoapp:build"
},
"configurations": {
"hmr": {
"browserTarget": "bsr:build:hmr"
"browserTarget": "demoapp:build:hmr"
},
"production": {
"browserTarget": "bsr:build:production"
"browserTarget": "demoapp:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "bsr:build"
"browserTarget": "demoapp:build"
}
},
"test": {
@@ -108,13 +121,50 @@
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist/server",
"main": "main.server.ts",
"main": "server.ts",
"tsConfig": "tsconfig.server.json"
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true
}
}
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"options": {
"browserTarget": "demoapp:build",
"serverTarget": "demoapp:server"
},
"configurations": {
"production": {
"browserTarget": "demoapp:build:production",
"serverTarget": "demoapp:server:production"
}
}
},
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"browserTarget": "demoapp:build:production",
"serverTarget": "demoapp:server:production",
"routes": [
"/"
]
},
"configurations": {
"production": {}
}
}
}
},
"bsr-e2e": {
"demoapp-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
@@ -123,7 +173,7 @@
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "bsr:serve"
"devServerTarget": "demoapp:serve"
}
},
"lint": {
@@ -138,9 +188,49 @@
}
}
}
},
"@angular-material-extensions/pages": {
"projectType": "library",
"root": "projects/angular-material-extensions/pages",
"sourceRoot": "projects/angular-material-extensions/pages/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/angular-material-extensions/pages/tsconfig.lib.json",
"project": "projects/angular-material-extensions/pages/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/angular-material-extensions/pages/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/angular-material-extensions/pages/src/test.ts",
"tsConfig": "projects/angular-material-extensions/pages/tsconfig.spec.json",
"karmaConfig": "projects/angular-material-extensions/pages/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/angular-material-extensions/pages/tsconfig.lib.json",
"projects/angular-material-extensions/pages/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "bsr",
"defaultProject": "demoapp",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
@@ -149,5 +239,8 @@
"@schematics/angular:directive": {
"prefix": "app"
}
},
"cli": {
"analytics": "57a85e3d-c639-4361-a525-e907f763572e"
}
}
Binary file added assets/angular-material-extensions-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
13 changes: 0 additions & 13 deletions demo/.editorconfig

This file was deleted.

5 changes: 0 additions & 5 deletions demo/.firebaserc

This file was deleted.

43 changes: 0 additions & 43 deletions demo/.gitignore

This file was deleted.

27 changes: 0 additions & 27 deletions demo/README.md

This file was deleted.

15,273 changes: 0 additions & 15,273 deletions demo/package-lock.json

This file was deleted.

76 changes: 0 additions & 76 deletions demo/package.json

This file was deleted.

57 changes: 0 additions & 57 deletions demo/server.ts

This file was deleted.

20 changes: 0 additions & 20 deletions demo/src/app/app-routing.module.ts

This file was deleted.

40 changes: 0 additions & 40 deletions demo/src/app/app.component.spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions demo/src/app/home/home-routing.module.ts

This file was deleted.

79 changes: 0 additions & 79 deletions demo/src/app/shared/header/header.component.spec.ts

This file was deleted.

1 change: 0 additions & 1 deletion demo/src/main.server.ts

This file was deleted.

24 changes: 0 additions & 24 deletions demo/src/main.ts

This file was deleted.

1 change: 0 additions & 1 deletion demo/src/testing/index.ts

This file was deleted.

61 changes: 0 additions & 61 deletions demo/src/testing/router-stubs.ts

This file was deleted.

21 changes: 0 additions & 21 deletions demo/src/tsconfig.spec.json

This file was deleted.

19 changes: 0 additions & 19 deletions demo/tsconfig.json

This file was deleted.

142 changes: 0 additions & 142 deletions demo/tslint.json

This file was deleted.

38 changes: 0 additions & 38 deletions demo/webpack.server.config.js

This file was deleted.

2 changes: 1 addition & 1 deletion demo/e2e/app.e2e-spec.ts → e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NgxMaterialPagesDemoPage } from './app.po';

describe('ngx-material-pages-demo App', () => {
describe('@angular-material-extensions/pages-demo App', () => {
let page: NgxMaterialPagesDemoPage;

beforeEach(() => {
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion demo/firebase.json → firebase.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"firebase": "ngx-material-pages",
"firebase": "@angular-material-extensions/pages",
"public": "dist/browser",
"ignore": [
"firebase.json",
10 changes: 10 additions & 0 deletions greenkeeper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"groups": {
"default": {
"packages": [
"demo/package.json",
"package.json"
]
}
}
}
26 changes: 18 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -77,8 +77,8 @@ const argv = yargs
.argv;

const config = {
libraryName: 'ngx-material-pages',
unscopedLibraryName: 'ngx-material-pages',
libraryName: '@angular-material-extensions/pages',
unscopedLibraryName: 'pages',
allSrc: 'src/**/*',
allTs: 'src/**/!(*.spec).ts',
allSass: 'src/**/*.+(scss|sass)',
@@ -284,6 +284,18 @@ gulp.task('build', ['clean'], (cb) => {
runSequence('compile', 'npm-package', 'rollup-bundle', cb);
});

// Build the schematics in dist
gulp.task('build:schematics', () => {
// return execDemoCmd(`build --preserve-symlinks --prod --aot --build-optimizer`, {cwd: `${config.demoDir}`});
return execCmd('tsc', '-p src/schematics/tsconfig.json').then(exitCode => {
if (exitCode === 0) {
return execCmd('webpack', '--config src/schematics/webpack.config.js --progress --colors');
} else {
Promise.reject(1);
}
});
});

// Same as 'build' but without cleaning temp folders (to avoid breaking demo app, if currently being served)
gulp.task('build-watch', (cb) => {
runSequence('compile', 'test', 'npm-package', 'rollup-bundle', cb);
@@ -313,7 +325,7 @@ gulp.task('build:watch-fast', ['build-watch-no-tests'], () => {
gulp.task('npm-package', (cb) => {
let pkgJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
let targetPkgJson = {};
let fieldsToCopy = ['version', 'description', 'keywords', 'author', 'repository', 'license', 'bugs', 'homepage'];
let fieldsToCopy = ['version', 'description', 'keywords', 'author', 'repository', 'license', 'bugs', 'homepage', 'schematics'];

targetPkgJson['name'] = config.libraryName;

@@ -503,8 +515,7 @@ gulp.task('serve:doc', ['clean:doc'], (cb) => {
const execDemoCmd = (args, opts) => {
if (fs.existsSync(`${config.demoDir}/node_modules`)) {
return execCmd('ng', args, opts, `/${config.demoDir}`);
}
else {
} else {
gulpUtil.log(gulpUtil.colors.yellow(`No 'node_modules' found in '${config.demoDir}'. Installing dependencies for you...`));
return helpers.installDependencies({cwd: `${config.demoDir}`})
.then(exitCode => exitCode === 0 ? execCmd('ng', args, opts, `/${config.demoDir}`) : Promise.reject())
@@ -656,7 +667,7 @@ gulp.task('create-new-tag', (cb) => {
});

// Build and then Publish 'dist' folder to NPM
gulp.task('npm-publish', ['build'], () => {
gulp.task('npm-publish', ['build', 'build:schematics'], () => {
return execExternalCmd('npm', `publish ${config.outputDir} --access public`)
});

@@ -671,8 +682,7 @@ gulp.task('release', (cb) => {
if (!readyToRelease()) {
gulpUtil.log(gulpUtil.colors.red('# Pre-Release Checks have failed. Please fix them and try again. Aborting...'));
cb();
}
else {
} else {
gulpUtil.log(gulpUtil.colors.green('# Pre-Release Checks have succeeded. Continuing...'));
runSequence(
'bump-version',
34 changes: 33 additions & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
module.exports = require('./config/karma.conf.js');
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
35,598 changes: 20,434 additions & 15,164 deletions package-lock.json

Large diffs are not rendered by default.

235 changes: 104 additions & 131 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,126 +1,110 @@
{
"name": "ngx-material-pages",
"description": "Open source library for angular apps to illustrate custom material pages content with steps (ideal for tutorials and explanation purposes)",
"version": "1.3.2",
"homepage": "https://github.com/anthonynahas/ngx-material-pages",
"author": {
"name": "anthonynahas",
"url": "https://github.com/anthonynahas"
},
"repository": {
"type": "git",
"url": "git://github.com/anthonynahas/ngx-material-pages.git"
},
"name": "demo",
"version": "0.0.0",
"license": "MIT",
"keywords": [
"ngx",
" angular",
" library",
" material",
" material-ui",
" material-design",
" material-components",
"pages",
"pagination",
"turorials"
],
"bugs": {
"url": "https://github.com/anthonynahas/ngx-material-pages/issues"
},
"private": true,
"description": "Demo app for @angular-material-extensions/pages",
"scripts": {
"build": "gulp build",
"build:watch": "gulp build:watch",
"build:watch:fast": "gulp build:watch-fast",
"test": " gulp test",
"test:watch": " gulp test:watch",
"demo": " gulp build:demo",
"check-travis": " travis-status --repo=anthonynahas/ngx-material-pages --branch=master --fail-pending || echo 'Not yet passing'"
"ng": "ng",
"start": "ng serve --port 4901",
"build": "ng build",
"build:client-and-server-bundles:ghpages": "npm run build:prod:ghpages && ng run pages:server:production --bundleDependencies all",
"build:docs": "npx compodoc -p projects/angular-material-extensions/pages/tsconfig.lib.json --hideGenerator --disableCoverage -d dist/browser/doc/",
"build:lib": "ng build @angular-material-extensions/pages",
"build:lib:Watch": "ng build @angular-material-extensions/pages --watch",
"build:prod": "ng build --prod",
"build:prod:ghpages": "ng build --preserve-symlinks --prod --aot --build-optimizer --base-href /pages/ --deploy-url /pages/",
"build:prerender": "npm run build:client-and-server-bundles && npm run compile:server && npm run generate:prerender",
"build:prerender:ghpages": "npm run build:client-and-server-bundles:ghpages && npm run compile:server && npm run generate:prerender",
"deploy": "ng deploy --base-href=/pages/ --no-build",
"generate:prerender": "cd dist && node prerender",
"test": "jest",
"lint": "ng lint",
"e2e": "ng e2e",
"serve:prerender": "cd dist/browser && http-server",
"release": "release-it",
"test:watch": "jest --watch",
"compile:server_bak": "webpack --config webpack.server.config.js --progress --colors",
"build:ssr_bak": "npm run build:client-and-server-bundles && npm run compile:server",
"serve:ssr_bak": "node dist/server",
"build:client-and-server-bundles_bak": "ng build --prod && ng run pages:server:production --bundleDependencies all",
"dev:ssr": "ng run pages:serve-ssr",
"serve:ssr": "node dist/server/main.js",
"build:ssr": "ng build --prod && ng run pages:server:production",
"prerender": "ng run pages:prerender"
},
"private": true,
"dependencies": {
"@angular/animations": "^6.0.5",
"@angular/cdk": "^6.2.1",
"@angular/common": "^6.0.5",
"@angular/core": "^6.0.5",
"@angular/material": "^6.2.1"
"@angular/animations": "^9.0.0",
"@angular/cdk": "^9.0.0",
"@angular/common": "^9.0.0",
"@angular/compiler": "^9.0.0",
"@angular/core": "^9.0.0",
"@angular/flex-layout": "^9.0.0-beta.29",
"@angular/forms": "^9.0.0",
"@angular/material": "^9.0.0",
"@angular/platform-browser": "^9.0.0",
"@angular/platform-browser-dynamic": "^9.0.0",
"@angular/platform-server": "^9.0.0",
"@angular/router": "^9.0.0",
"@ng-bootstrap/ng-bootstrap": "^5.2.1",
"@nguniversal/express-engine": "^9.0.0",
"bootstrap": "^4.4.1",
"core-js": "^3.6.4",
"express": "^4.15.2",
"font-awesome": "^4.7.0",
"include-media": "^1.4.9",
"material-design-icons": "^3.0.1",
"ngx-clipboard": "^12.3.0",
"ngx-disqus": "^2.4.2",
"ngx-highlightjs": "^4.0.2",
"rxjs": "^6.5.4",
"rxjs-compat": "^6.5.4",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular/compiler": "^6.0.5",
"@angular/compiler-cli": "^6.0.5",
"@angular/language-service": "^6.0.5",
"@angular/flex-layout": "^6.0.0-beta.16",
"@angular/forms": "^6.0.5",
"@angular/platform-browser": "^6.0.5",
"@angular/platform-browser-dynamic": "^6.0.5",
"@angular/platform-server": "^6.0.5",
"@compodoc/gulp-compodoc": "0.0.9",
"@types/jasmine": "2.8.8",
"@types/lodash": "4.14.109",
"@types/node": "10.3.3",
"angular-cli-ghpages": "0.5.2",
"angular2-template-loader": "0.6.2",
"autoprefixer": "^8.6.2",
"awesome-typescript-loader": "^5.0.0",
"codelyzer": "^4.3.0",
"commitplease": "3.2.0",
"conventional-github-releaser": "3.0.0",
"core-js": "2.5.7",
"css-loader": "0.28.11",
"del": "3.0.0",
"gulp": "3.9.1",
"gulp-bump": "3.1.1",
"gulp-conventional-changelog": "2.0.1",
"gulp-coveralls": "0.1.4",
"gulp-file": "0.4.0",
"gulp-git": "2.7.0",
"gulp-hub": "0.8.0",
"gulp-inline-ng2-template": "4.1.0",
"gulp-tslint": "^8.1.3",
"gulp-util": "3.0.8",
"html-loader": "0.5.5",
"is-docker": "1.1.0",
"istanbul-instrumenter-loader": "3.0.1",
"jasmine-core": "3.1.0",
"karma": "2.0.3",
"karma-chrome-launcher": "2.2.0",
"karma-coverage": "1.1.2",
"karma-jasmine": "1.1.2",
"karma-jasmine-html-reporter": "1.1.0",
"karma-mocha-reporter": "2.2.5",
"karma-remap-coverage": "0.1.5",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "3.0.0",
"lodash": "4.17.10",
"node-sass": "4.9.0",
"postcss": "6.0.22",
"postcss-strip-inline-comments": "0.1.5",
"pump": "3.0.0",
"raw-loader": "0.5.1",
"rollup": "0.60.7",
"rollup-plugin-commonjs": "9.1.3",
"rollup-plugin-node-resolve": "3.3.0",
"rollup-plugin-sourcemaps": "0.4.2",
"rollup-plugin-uglify": "3.0.0",
"run-sequence": "2.2.1",
"rxjs": "6.2.1",
"sass-loader": "7.0.3",
"source-map-loader": "0.2.3",
"to-string-loader": "1.1.5",
"travis-status": "2.0.0",
"tslint": "5.10.0",
"typescript": "2.7.2",
"webpack": "4.12.0",
"webpack-dev-middleware": "3.1.3",
"webpack-dev-server": "3.1.4",
"yargs": "11.0.0",
"zone.js": "^0.8.26"
},
"peerDependencies": {
"@angular/cdk": "5.x",
"@angular/material": "5.x"
"@angular-devkit/build-angular": "~0.900.1",
"@angular-devkit/build-ng-packagr": "~0.900.1",
"@angular/cli": "^9.0.1",
"@angular/compiler-cli": "^9.0.0",
"@angular/language-service": "^9.0.0",
"@angular/service-worker": "^9.0.0",
"@angularclass/hmr": "~2.1.3",
"@nguniversal/builders": "^9.0.0",
"@nguniversal/express-engine": "^9.0.0",
"@release-it/conventional-changelog": "^1.1.0",
"@types/express": "^4.17.0",
"@types/jasmine": "^3.5.3",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^12.11.1",
"angular-cli-ghpages": "^0.6.2",
"codelyzer": "^5.1.2",
"express": "^4.16.4",
"http-server": "^0.12.1",
"jasmine-core": "~3.5.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "~3.1.0",
"karma-cli": "~2.0.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "^3.1.0",
"karma-jasmine-html-reporter": "^1.5.2",
"ng-packagr": "^9.0.0",
"protractor": "~5.4.3",
"reflect-metadata": "~0.1.10",
"release-it": "^12.4.3",
"schematics-utilities": "^2.0.1",
"semantic-release": "^17.0.2",
"ts-loader": "^6.2.1",
"ts-node": "~8.6.2",
"tslint": "~6.0.0",
"typescript": "~3.7.5",
"webpack-cli": "^3.3.10",
"webpack-node-externals": "~1.7.2",
"xmlhttprequest": "^1.8.0"
},
"engines": {
"node": ">=8.x"
"node": ">=10.x"
},
"greenkeeper": {
"ignore": [
@@ -139,23 +123,12 @@
"awesome-typescript-loader",
"codelyzer",
"@angular/animations",
"@types/jasmine"
"@types/jasmine",
"@types/jest",
"@types/node",
"conventional-github-releaser",
"rollup-plugin-uglify",
"gulp-inline-ng2-template"
]
},
"commitplease": {
"style": "angular",
"types": [
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"chore",
"revert",
"demo"
],
"scope": "\\S+.*"
}
}
37 changes: 20 additions & 17 deletions demo/prerender.ts → prerender.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
// Load zone.js for the server.
import 'zone.js/dist/zone-node';
import 'reflect-metadata';
import { readFileSync, writeFileSync, existsSync, mkdirSync } from 'fs';
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
import { join } from 'path';

import { enableProdMode } from '@angular/core';
// Faster server renders w/ Prod mode (dev mode never needed)
enableProdMode();

// Express Engine
import { ngExpressEngine } from '@nguniversal/express-engine';
// Import module map for lazy loading
import { provideModuleMap } from '@nguniversal/module-map-ngfactory-loader';
import { renderModuleFactory } from '@angular/platform-server';
import { ROUTES } from './static.paths';

(global as any).WebSocket = require('ws');
(global as any).XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;

// Faster server renders w/ Prod mode (dev mode never needed)
enableProdMode();

// * NOTE :: leave this as require() since this file is built Dynamically from webpack
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main.bundle');
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main');

const BROWSER_FOLDER = join(process.cwd(), 'dist', 'browser');
const BROWSER_FOLDER = join(process.cwd(), 'browser');

// Load the index.html file containing referances to your application bundle.
const index = readFileSync(join(BROWSER_FOLDER, 'index.html'), 'utf8');
@@ -27,19 +28,21 @@ let previousRender = Promise.resolve();

// Iterate each route path
ROUTES.forEach(route => {
var fullPath = join(BROWSER_FOLDER, route);
const fullPath = join(BROWSER_FOLDER, route);

// Make sure the directory structure is there
if(!existsSync(fullPath)){
if (!existsSync(fullPath)) {
mkdirSync(fullPath);
}

// Writes rendered HTML to index.html, replacing the file if it already exists.
previousRender = previousRender.then(_ => renderModuleFactory(AppServerModuleNgFactory, {
document: index,
url: route,
extraProviders: [
provideModuleMap(LAZY_MODULE_MAP)
]
})).then(html => writeFileSync(join(fullPath, 'index.html'), html));
previousRender = previousRender
.then(_ =>
renderModuleFactory(AppServerModuleNgFactory, {
document: index,
url: route,
extraProviders: [provideModuleMap(LAZY_MODULE_MAP)]
})
)
.then(html => writeFileSync(join(fullPath, 'index.html'), html));
});
327 changes: 327 additions & 0 deletions projects/angular-material-extensions/pages/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
<p align="center">
<img height="256px" width="256px" style="text-align: center;" src="https://cdn.rawgit.com/angular-material-extensions/pages/master/demo/src/assets/logo.svg">
</p>


# @angular-material-extensions/pages - Open source library for Angular Apps to illustrate custom material pages content with steps (ideal for tutorials and explanation purposes) - Angular V7 supported

[![npm version](https://badge.fury.io/js/%40angular-material-extensions%2Fpages.svg)](https://badge.fury.io/js/%40angular-material-extensions%2Fpages)
[![npm demo](https://img.shields.io/badge/demo-online-ed1c46.svg)](https://angular-material-extensions.github.io/pages)
[![Join the chat at https://gitter.im/angular-material-extensions/Lobby](https://badges.gitter.im/angular-material-extensions/Lobby.svg)](https://gitter.im/angular-material-extensions/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![CircleCI branch](https://img.shields.io/circleci/project/github/angular-material-extensions/pages/master.svg?label=circleci)](https://circleci.com/gh/angular-material-extensions/pages)
[![Coverage Status](https://coveralls.io/repos/github/angular-material-extensions/pages/badge.svg?branch=master)](https://coveralls.io/github/angular-material-extensions/pages?branch=master)
[![dependency Status](https://david-dm.org/angular-material-extensions/pages/status.svg)](https://david-dm.org/angular-material-extensions/pages)
[![devDependency Status](https://david-dm.org/angular-material-extensions/pages/dev-status.svg?branch=master)](https://david-dm.org/angular-material-extensions/pages#info=devDependencies)
[![Greenkeeper Badge](https://badges.greenkeeper.io/angular-material-extensions/pages.svg)](https://greenkeeper.io/)
[![license](https://img.shields.io/github/license/angular-material-extensions/pages.svg?style=flat-square)](https://github.com/angular-material-extensions/pages/blob/master/LICENSE)
[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/gdi2290/awesome-angular)


> This Github project has been transferred to the angular material extensions monorepo [angular-material-extensions/components](https://github.com/angular-material-extensions/components)
<p align="center">
<img alt="@angular-material-extensions/pages" style="text-align: center;"
src="assets/demo.gif">
</p>


Do you need an illustration for your explanations and tutorials ? Or maybe an alternative way of pagination ?
Are you using [angular](https://angular.io/) to build wonderful pwa ?
You favorite front-end framework is [angular material](https://material.angular.io/) ?

@angular-material-extensions/pages is the right UI component for you!
You build wonderful and comprehensive tutorials pages by providing an outlook and content for each
step of your explanation.

Try it out!

## Built by and for developers :heart:
Do you have any question or suggestion ? Please do not hesitate to contact us!
Alternatively, provide a PR | open an appropriate issue [here](https://github.com/angular-material-extensions/pages/issues)

If did you this project, support [angular-material-extensions](https://github.com/angular-material-extensions)
by starring :star: and sharing it :loudspeaker:

## Table of Contents
- [Demo](#demo)
- [Dependencies](#dependencies)
- [Peer Dependencies](#peerDependencies)
- [Additional Requirements - material (Include a theme)](#additional-requirements-material-theme)
- [Additional Requirements - material icons](#additional-requirements-material-icons)
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Run Demo App Locally](#run-demo-app-locally)
- [Other Angular Libraries](#other-angular-libraries)
- [Support](#support)
- [License](#license)

---

## [Demo](https://angular-material-extensions.github.io/pages)

View all the directives and components in action at [https://angular-material-extensions.github.io/pages](https://angular-material-extensions.github.io/pages)

## Dependencies
* [Angular](https://angular.io) (*requires*) tested with V7
- if you are still using angular v5 or lower, please use the following version `1.2.1`


> This project has been renamed from [@angular-material-extensions/pages](https://www.npmjs.com/package/@angular-material-extensions/pages) to [@angular-material-extensions/pages](https://github.com/angular-material-extensions/pages)
<a name="peerDependencies"/>

## Peer Dependencies
- [angular animations v7.x](https://www.npmjs.com/package/@angular/animations)
- [angular material v7.x](https://www.npmjs.com/package/@angular/material)
- [angular cdk v7.x](https://www.npmjs.com/package/@angular/cdk)

> [learn more about angular material and cdk](https://material.angular.io/guide/getting-started#step-1-install-angular-material-and-angular-cdk)
> if you need a built in theme --> please let me know
```bash
npm i -s @angular/animations @angular/material @angular/cdk
```

or use `angular schematics` like e.g:

```bash
ng add @angular/material
```


<a name="additional-requirements-material-theme"/>

### Additional requirements Theme (Material Design)
- [angular material theme](https://material.angular.io/guide/getting-started#step-4-include-a-theme)

<a name="additional-requirements-material-icons"/>

## Additional Requirements - Import the material design icons [learn more](https://material.angular.io/guide/getting-started#step-6-optional-add-material-icons)

- The easiest way to import material design icons is to provide a link in your `index.html` file like below:

```html
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
```

- alternative solution:

1. Install of the official npm module of the material design icons

```bash
npm i -s material-design-icons
```

2. Import them in your `angular.json` file

```json
"styles": [
"styles.css",
"../node_modules/material-design-icons/iconfont/material-icons.css"
],
```


----

<a name="installation"/>

## [Installation](https://angular-material-extensions.github.io/pages/getting-started)

Install above dependencies via *npm*.

Now install `@angular-material-extensions/pages` via:
```shell
npm install --save @angular-material-extensions/pages
```

---
##### SystemJS
>**Note**:If you are using `SystemJS`, you should adjust your configuration to point to the UMD bundle.
In your systemjs config file, `map` needs to tell the System loader where to look for `@angular-material-extensions/pages`:
```js
map: {
'@angular-material-extensions/pages': 'node_modules/@angular-material-extensions/pages/bundles/@angular-material-extensions/pages.umd.js',
}
```
---

Once installed you need to import the main module:
```js
import { MatPagesModule } from '@angular-material-extensions/pages';
```
The only remaining part is to list the imported module in your application module. The exact method will be slightly
different for the root (top-level) module for which you should end up with the code similar to (notice ` MatPagesModule .forRoot()`):

NB: please do not forget to import the angular animations module in your root component too! (usally app.component.ts)
```js
import { MatPagesModule } from '@angular-material-extensions/pages';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';

@NgModule({
declarations: [AppComponent, ...],
imports: [MatPagesModule.forRoot(),
BrowserAnimationsModule,
...],
bootstrap: [AppComponent]
})
export class AppModule {
}
```

Other modules in your application can simply import ` MatPagesModule `:

```js
import { MatPagesModule } from '@angular-material-extensions/pages';

@NgModule({
declarations: [OtherComponent, ...],
imports: [MatPagesModule, ...],
})
export class OtherModule {
}
```

## Add a material theme - [help](https://material.angular.io/guide/getting-started#step-4-include-a-theme)
The easiest way is to add
```css
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';
```
to you `styles.css` files

[learn more](https://material.angular.io/guide/theming)

## Add a material icons - [help](https://material.angular.io/guide/getting-started#step-6-optional-add-material-icons)
The easiest way is to add
```html
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
```
to you `index.html` files

[learn more](https://google.github.io/material-design-icons/)


<a name="usage"/>

## [Usage](https://angular-material-extensions.github.io/pages/getting-started)

This library consists of 4 essential components.

1. `mat-pages` the main container that hold the pages incl. the outlook view and the content
2. `mat-page-loader` the container of each page. This component should have two nested elements
which are the outlook and the content components (see below)
3. `mat-page-outlook` the outlook view of a page. This can contain a custom component, custom layout or just a title.
4. `mat-page-content` this is the content view of the page. This can be anything!!

5. Example:

```html
<mat-pages>
<mat-page-loader>
<mat-page-outlook>
<!-- put your own outlook view for the first page -->
</mat-page-outlook>
<mat-page-content>
<!-- put your own content view for the first page -->
</mat-page-content>
</mat-page-loader>
<mat-page-loader>
<mat-page-outlook>
<!-- put your own outlook view for the second page -->
</mat-page-outlook>
<mat-page-content>
<!-- put your own content view for the second page -->
</mat-page-content>
</mat-page-loader>
</mat-pages>
```

---

<a name="documentation"/>

## [Documentation](https://angular-material-extensions.github.io/pages/doc/index.html)

Please checkout the full documentation [here](https://angular-material-extensions.github.io//pages/doc/index.html)
or follow the official [tutorial](https://angular-material-extensions.github.io//pages/getting-started)

---


<a name="run-demo-app-locally"/>

## Run Demo App Locally

- [clone this repo](https://github.com/angular-material-extensions/pages.git) by running
```bash
$ git clone https://github.com/angular-material-extensions/pages.git
```

- link the **@angular-material-extensions/pages** package

```bash
$ gulp link
```

- build the library

```bash
$ gulp build
```

- navigate to the demo app directory
```bash
$ cd demo
```

- install the dependencies
```bash
$ npm i
```

- run/start/serve the app
```bash
$ npm run start
```
or
```bash
$ ng serve --open
```
- the app is now hosted on `http://localhost:4200/`


## Where are @angular-material-extensions/pages being used ? Here are some examples
- [ngx-auth-firebaseui](https://ngx-auth-firebaseui.firebaseapp.com/getting-started)
- [@angular-material-extensions/pages](https://angular-material-extensions.github.io/pages/getting-started)
- [@angular-material-extensions/password-strength](https://angular-material-extensions.github.io/password-strength/getting-started)
- [@angular-material-extensions/contacts](https://angular-material-extensions.github.io/contacts/getting-started)
- [@angular-material-extensions/faq](https://angular-material-extensions.github.io/faq/getting-started)
- [@angular-material-extensions/combination-generator](https://angular-material-extensions.github.io/combination-generator/getting-started)

<a name="other-angular-libraries"/>

## Other Angular Libraries
- [ngx-auth-firebaseui](https://github.com/AnthonyNahas/ngx-auth-firebaseui)
- [ngx-linkifyjs](https://github.com/AnthonyNahas/ngx-linkifyjs)
- [@firebaseui/ng-bootstrap](https://github.com/firebaseui/ng-bootstrap)
- [@angular-material-extensions/password-strength](https://github.com/angular-material-extensions/password-strength)
- [@angular-material-extensions/link-preview](https://github.com/angular-material-extensions/link-preview)
- [@angular-material-extensions/google-maps-autocomplete](https://github.com/angular-material-extensions/google-maps-autocomplete)
- [@angular-material-extensions/contacts](https://github.com/angular-material-extensions/contacts)
- [@angular-material-extensions/jumbotron](https://github.com/angular-material-extensions/jumbotron)
- [@angular-material-extensions/faq](https://github.com/angular-material-extensions/faq)
- [@angular-material-extensions/combination-generator](https://github.com/angular-material-extensions/combination-generator)

---

## Support
+ Drop an email to: [Anthony Nahas](mailto:anthony.na@hotmail.de) and I will help you
+ or open an appropriate [issue](https://github.com/angular-material-extensions/pages/issues)
+ let us chat on [Gitter](https://gitter.im/angular-material-extensions/Lobby)

---

## License

Copyright (c) 2018 [Anthony Nahas](mailto:anthony.na@hotmail.de). Licensed under the MIT License (MIT)
Original file line number Diff line number Diff line change
@@ -12,22 +12,21 @@ module.exports = function (config) {
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
dir: require('path').join(__dirname, '../../../coverage/angular-material-extensions/pages'),
reports: ['html', 'lcovonly', 'text-summary'],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
singleRun: false,
restartOnFileChange: true
});
};
7 changes: 7 additions & 0 deletions projects/angular-material-extensions/pages/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../dist/angular-material-extensions/pages",
"lib": {
"entryFile": "src/public-api.ts"
}
}
110 changes: 110 additions & 0 deletions projects/angular-material-extensions/pages/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"name": "@angular-material-extensions/pages",
"description": "Open source library for angular apps to illustrate custom material pages content with steps (ideal for tutorials and explanation purposes)",
"version": "4.0.0",
"homepage": "https://github.com/angular-material-extensions/pages",
"author": {
"name": "anthonynahas",
"url": "https://github.com/anthonynahas"
},
"repository": {
"type": "git",
"url": "git://github.com/angular-material-extensions/pages.git"
},
"license": "MIT",
"schematics": "./schematics/collection.json",
"keywords": [
"ngx",
" angular",
" library",
" material",
" material-ui",
" material-design",
" material-components",
"pages",
"pagination",
"turorials"
],
"bugs": {
"url": "https://github.com/angular-material-extensions/pages/issues"
},
"scripts": {
"build": "../../../node_modules/.bin/ng build @angular-material-extensions/pages --prod",
"build:watch": "../../../node_modules/.bin/ng build @angular-material-extensions/pages --watch",
"build:schematics": "../../../node_modules/.bin/tsc -p tsconfig.schematics.json",
"clean": "rm -rf ../../../dist",
"lint": "../../../node_modules/.bin/ng lint @angular-material-extensions/pages",
"resync:schematics": "rsync -a schematics/collection.json ../../../dist/angular-material-extensions/pages/schematics/",
"resync:readme": "rsync -a ../../../README.md ../../../dist/angular-material-extensions/pages/",
"postbuild": "npm run build:schematics && npm run resync:readme && npm run resync:schematics",
"prepublish": "npm run build",
"release:patch": "../../../node_modules/.bin/release-it --patch --ci",
"release:minor": "../../../node_modules/.bin/release-it --minor --ci",
"release:major": "../../../node_modules/.bin/release-it --major --ci",
"release:version": "../../../node_modules/.bin/release-it 4.0.0 --ci --no-git.requireCleanWorkingDir ",
"ng:test": "../../../node_modules/.bin/ng test @angular-material-extensions/pages",
"test": "../../../node_modules/.bin/jest --coverage",
"test:watch": "../../../node_modules/.bin/jest --coverage --watch"
},
"peerDependencies": {
"@angular/common": "^9.0.0",
"@angular/core": "^9.0.0",
"@angular/cdk": "^9.0.0",
"@angular/material": "^9.0.0"
},
"engines": {
"node": ">=10.13"
},
"release-it": {
"github": {
"release": true
},
"npm": {
"publish": true,
"publishPath": "../../../dist/angular-material-extensions/pages"
},
"publishConfig": {
"access": "public"
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular",
"infile": "../../../CHANGELOG.md"
}
},
"hooks": {
"before:init": [
"npm run clean"
],
"after:bump": "echo \"building lib v${version}... \" && npm run build",
"before:git:release": "echo \"Updating CHANGELOG.md for v${version} \" && git commit -m \"docs(lib): updating CHANGELOG.md for v${version} \" ../../../CHANGELOG.md",
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}.",
"before:npm": "echo building the library..."
}
},
"greenkeeper": {
"ignore": [
"@angular/core",
"@angular/common",
"@angular/compiler",
"@angular/platform-server",
"@angular/platform-browser",
"@angular/platform-browser-dynamic",
"@angular/compiler-cli",
"zone.js",
"rxjs",
"tslint",
"gulp-tslint",
"typescript",
"awesome-typescript-loader",
"codelyzer",
"@angular/animations",
"@types/jasmine",
"@types/jest",
"@types/node",
"conventional-github-releaser",
"rollup-plugin-uglify",
"gulp-inline-ng2-template"
]
}
}
28 changes: 28 additions & 0 deletions projects/angular-material-extensions/pages/schematics/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Getting Started With Schematics

This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.

### Testing

To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.

Check the documentation with
```bash
schematics --help
```

### Unit Testing

`npm run test` will run the unit tests, using Jasmine as a runner and test framework.

### Publishing

To publish, simply do:

```bash
npm run build
npm publish
```

That's it!

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "~node_modules/@angular-devkit/schematics/collection-schema.json",
"schematics": {
"ng-add": {
"description": "Installs and injects the @angular-material-extensions/pages library",
"factory": "./ng-add/index#ngAdd"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import {chain, noop, Rule, SchematicContext, Tree} from '@angular-devkit/schematics';
import {NodePackageInstallTask} from '@angular-devkit/schematics/tasks';
import {
addModuleImportToRootModule,
addPackageJsonDependency,
getProjectFromWorkspace,
getWorkspace,
NodeDependency,
NodeDependencyType
} from 'schematics-utilities';

/** Loads the full version from the given Angular package gracefully. */
function loadPackageVersionGracefully(context: SchematicContext): string | null {
try {
context.logger.log('info', `🧟‍ @angular-material-extensions/pages
is using the following version ${require(`../../package.json`).version}`);
return require(`../../package.json`).version;
} catch {
return null;
}
}

// You don't have to export the function as default. You can also have more than one rule factory
// per file.
export function addPackageJsonDependencies(): Rule {
return (host: Tree, context: SchematicContext) => {

const ngCoreVersionTag = getPackageVersionFromPackageJson(host, '@angular/core');

const dependencies: NodeDependency[] = [
{
type: NodeDependencyType.Default,
version: loadPackageVersionGracefully(context) || 'latest',
name: '@angular-material-extensions/pages'
},
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '7.2.11', name: '@angular/animations'},
{type: NodeDependencyType.Default, version: ngCoreVersionTag || '7.2.11', name: '@angular/forms'},
];

dependencies.forEach(dependency => {
addPackageJsonDependency(host, dependency);
context.logger.log('info', `✅️ Added "${dependency.name}" into ${dependency.type}`);
});

return host;
};
}

export function installPackageJsonDependencies(): Rule {
return (host: Tree, context: SchematicContext) => {
context.addTask(new NodePackageInstallTask());
context.logger.log('info', `🔍 Installing packages...`);

return host;
};
}

export function addModuleToImports(options: any): Rule {
return (host: Tree, context: SchematicContext) => {
const workspace = getWorkspace(host);
const project = getProjectFromWorkspace(
workspace,
// Takes the first project in case it's not provided by CLI
options.project ? options.project : Object.keys(workspace.projects)[0]
);
const moduleName = 'MatPagesModule.forRoot()';

addModuleImportToRootModule(host, moduleName, '@angular-material-extensions/pages', project);
addModuleImportToRootModule(host, 'BrowserAnimationsModule', '@angular/platform-browser/animations', project);
context.logger.log('info', `✅️ "${moduleName}" is imported`);

return host;
};
}

/** Gets the version of the specified package by looking at the package.json in the given tree. */
export function getPackageVersionFromPackageJson(tree: Tree, name: string): string | null {
if (!tree.exists('package.json')) {
return null;
}

// tslint:disable-next-line:no-non-null-assertion
const packageJson = JSON.parse(tree.read('package.json')!.toString('utf8'));

if (packageJson.dependencies && packageJson.dependencies[name]) {
return packageJson.dependencies[name];
}

return null;
}

export default function (options: any): Rule {
return chain([
options && options.skipPackageJson ? noop() : addPackageJsonDependencies(),
options && options.skipPackageJson ? noop() : installPackageJsonDependencies(),
options && options.skipModuleImport ? noop() : addModuleToImports(options),
]);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Tree } from '@angular-devkit/schematics';
import { SchematicTestRunner } from '@angular-devkit/schematics/testing';
import * as path from 'path';


const collectionPath = path.join(__dirname, '../collection.json');


describe('schematics', () => {
it('works', () => {
const runner = new SchematicTestRunner('schematics', collectionPath);
const tree = runner.runSchematic('schematics', {}, Tree.empty());

expect(tree.files).toEqual([]);
});
});
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { NgxMaterialPageContentComponent } from './ngx-material-page-content.component';
import { MatPageContentComponent } from './mat-page-content.component';

describe('NgxMaterialPageContentComponent', () => {
let component: NgxMaterialPageContentComponent;
let fixture: ComponentFixture<NgxMaterialPageContentComponent>;
let component: MatPageContentComponent;
let fixture: ComponentFixture<MatPageContentComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NgxMaterialPageContentComponent ]
declarations: [ MatPageContentComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(NgxMaterialPageContentComponent);
fixture = TestBed.createComponent(MatPageContentComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import {Component, Input, OnInit, TemplateRef, ViewChild} from '@angular/core';

@Component({
selector: 'mat-page-content',
templateUrl: './mat-page-content.component.html',
styleUrls: ['./mat-page-content.component.scss'],

})
export class MatPageContentComponent implements OnInit {

/** Template for page content. */
@ViewChild(TemplateRef) content: TemplateRef<any>;

@Input()
title: string;

constructor() {
}

ngOnInit() {
}

}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { NgxMaterialPageLoaderComponent } from './ngx-material-page-loader.component';
import { MatPageLoaderComponent } from './mat-page-loader.component';

describe('NgxMaterialPageLoaderComponent', () => {
let component: NgxMaterialPageLoaderComponent;
let fixture: ComponentFixture<NgxMaterialPageLoaderComponent>;
let component: MatPageLoaderComponent;
let fixture: ComponentFixture<MatPageLoaderComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NgxMaterialPageLoaderComponent ]
declarations: [ MatPageLoaderComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(NgxMaterialPageLoaderComponent);
fixture = TestBed.createComponent(MatPageLoaderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {Component, ContentChild} from '@angular/core';
import {MatPageOutlookComponent} from '../mat-page-outlook/mat-page-outlook.component';
import {MatPageContentComponent} from '../mat-page-content/mat-page-content.component';

@Component({
selector: 'mat-page-loader',
templateUrl: './mat-page-loader.component.html',
styleUrls: ['./mat-page-loader.component.scss']
})
export class MatPageLoaderComponent {

@ContentChild(MatPageOutlookComponent) pageOutlook: MatPageOutlookComponent;
@ContentChild(MatPageContentComponent) pageContent: MatPageContentComponent;

}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { NgxMaterialPageOutlookComponent } from './ngx-material-page-outlook.component';
import { MatPageOutlookComponent } from './mat-page-outlook.component';

describe('NgxMaterialPageOutlookComponent', () => {
let component: NgxMaterialPageOutlookComponent;
let fixture: ComponentFixture<NgxMaterialPageOutlookComponent>;
let component: MatPageOutlookComponent;
let fixture: ComponentFixture<MatPageOutlookComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NgxMaterialPageOutlookComponent ]
declarations: [ MatPageOutlookComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(NgxMaterialPageOutlookComponent);
fixture = TestBed.createComponent(MatPageOutlookComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import {ChangeDetectionStrategy, Component, Input, OnInit, TemplateRef, ViewChild, ViewEncapsulation} from '@angular/core';


@Component({
selector: 'mat-page-outlook',
templateUrl: './mat-page-outlook.component.html',
styleUrls: ['./mat-page-outlook.component.scss'],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,

})
export class MatPageOutlookComponent implements OnInit {

/** Template for page outlook content. */
@ViewChild(TemplateRef) content: TemplateRef<any>;

@Input()
title: string;

constructor() {
}

ngOnInit() {
}

}
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { NgxMaterialPagesComponent } from './ngx-material-pages.component';
import { MatPagesComponent } from './mat-pages.component';

describe('NgxMaterialPagesComponent', () => {
let component: NgxMaterialPagesComponent;
let fixture: ComponentFixture<NgxMaterialPagesComponent>;
let component: MatPagesComponent;
let fixture: ComponentFixture<MatPagesComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ NgxMaterialPagesComponent ]
declarations: [ MatPagesComponent ]
})
.compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(NgxMaterialPagesComponent);
fixture = TestBed.createComponent(MatPagesComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
import {
AfterContentInit,
Component,
ContentChildren, ElementRef, EventEmitter, HostListener, Input,
OnInit, Output,
QueryList, Renderer2, ViewChild
ContentChildren,
ElementRef,
EventEmitter,
HostListener,
Input,
OnInit,
Output,
QueryList,
Renderer2,
ViewChild
} from '@angular/core';
import {NgxMaterialPageLoaderComponent} from './ngx-material-page-loader/ngx-material-page-loader.component';
import {MatPageLoaderComponent} from './mat-page-loader/mat-page-loader.component';
import {StepperSelectionEvent} from '@angular/cdk/stepper';
import {MatSidenav, MatTabGroup} from '@angular/material';
import { MatSidenav } from '@angular/material/sidenav';
import { MatTabGroup } from '@angular/material/tabs';

@Component({
selector: 'ngx-material-pages',
templateUrl: './ngx-material-pages.component.html',
styleUrls: ['./ngx-material-pages.component.scss']
selector: 'mat-pages',
templateUrl: './mat-pages.component.html',
styleUrls: ['./mat-pages.component.scss']
})
export class NgxMaterialPagesComponent implements OnInit, AfterContentInit {
export class MatPagesComponent implements OnInit, AfterContentInit {

@ViewChild('sidenav')
sidenav: MatSidenav;

@ViewChild(MatTabGroup, {read: ElementRef})
@ViewChild(MatTabGroup, {read: ElementRef, static: true})
tabHeader: ElementRef;

@ContentChildren(NgxMaterialPageLoaderComponent)
pages: QueryList<NgxMaterialPageLoaderComponent>;
@ContentChildren(MatPageLoaderComponent)
pages: QueryList<MatPageLoaderComponent>;

@Input()
title: string;
@@ -101,7 +109,6 @@ export class NgxMaterialPagesComponent implements OnInit, AfterContentInit {
*
*/
onStepSelectionChange(event: StepperSelectionEvent) {
console.log('onStepSelectionChanged');
this.index = event.selectedIndex;
this.pageChanged.emit(this.index);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import {CommonModule} from '@angular/common';
import {ModuleWithProviders, NgModule} from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatStepperModule } from '@angular/material/stepper';
import { MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';

import {MatPagesComponent} from './mat-pages.component';
import {MatPageLoaderComponent} from './mat-page-loader/mat-page-loader.component';
import {MatPageContentComponent} from './mat-page-content/mat-page-content.component';
import {MatPageOutlookComponent} from './mat-page-outlook/mat-page-outlook.component';


@NgModule({
imports: [
CommonModule,
MatToolbarModule,
MatTabsModule,
MatCardModule,
MatSidenavModule,
MatIconModule,
MatStepperModule,
MatButtonModule
],
exports:
[
MatPagesComponent,
MatPageLoaderComponent,
MatPageOutlookComponent,
MatPageContentComponent
],
declarations: [
MatPagesComponent,
MatPageLoaderComponent,
MatPageOutlookComponent,
MatPageContentComponent
]
})
export class MatPagesModule {
static forRoot(): ModuleWithProviders<MatPagesModule> {
return {
ngModule: MatPagesModule,
providers: []
};
}
}
10 changes: 10 additions & 0 deletions projects/angular-material-extensions/pages/src/lib/pages.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {NgModule} from '@angular/core';


@NgModule({
declarations: [],
imports: [],
exports: []
})
export class PagesModule {
}
9 changes: 9 additions & 0 deletions projects/angular-material-extensions/pages/src/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Public API Surface of pages
*/
export * from './lib/mat-page-content/mat-page-content.component';
export * from './lib/mat-page-loader/mat-page-loader.component';
export * from './lib/mat-page-outlook/mat-page-outlook.component';
export * from './lib/mat-pages.component';
export * from './lib/mat-pages.module';
// export * from './lib/pages.module';
21 changes: 21 additions & 0 deletions projects/angular-material-extensions/pages/src/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files

import 'zone.js/dist/zone';
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';

declare const require: any;

// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
25 changes: 25 additions & 0 deletions projects/angular-material-extensions/pages/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/lib",
"target": "es2015",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "./tsconfig.lib.json",
"angularCompilerOptions": {
"enableIvy": false
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"compilerOptions": {
"baseUrl": "tsconfig",
"lib": [
"es2018",
"dom"
],
"declaration": true,
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitThis": true,
"noUnusedParameters": true,
"noUnusedLocals": true,
"rootDir": "schematics",
"outDir": "../../../dist/angular-material-extensions/pages/schematics",
"skipDefaultLibCheck": true,
"skipLibCheck": true,
"sourceMap": true,
"strictNullChecks": true,
"target": "es6",
"types": [
"jasmine",
"node"
]
},
"include": [
"schematics/**/*"
],
"exclude": [
"schematics/*/files/**/*"
]
}
17 changes: 17 additions & 0 deletions projects/angular-material-extensions/pages/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../../../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"src/test.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
17 changes: 17 additions & 0 deletions projects/angular-material-extensions/pages/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "../../../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"mat",
"camelCase"
],
"component-selector": [
true,
"element",
"mat",
"kebab-case"
]
}
}
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import 'zone.js/dist/zone-node';

import { ngExpressEngine } from '@nguniversal/express-engine';
import * as express from 'express';
import { join } from 'path';

import { AppServerModule } from './src/main.server';
import { APP_BASE_HREF } from '@angular/common';
import { existsSync } from 'fs';

// The Express app is exported so that it can be used by serverless Functions.
export function app() {
const server = express();
const distFolder = join(process.cwd(), 'dist/browser');
const indexHtml = existsSync(join(distFolder, 'index.original.html')) ? 'index.original.html' : 'index';

// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
server.engine('html', ngExpressEngine({
bootstrap: AppServerModule,
}));

server.set('view engine', 'html');
server.set('views', distFolder);

// Example Express Rest API endpoints
// app.get('/api/**', (req, res) => { });
// Serve static files from /browser
server.get('*.*', express.static(distFolder, {
maxAge: '1y'
}));

// All regular routes use the Universal engine
server.get('*', (req, res) => {
res.render(indexHtml, { req, providers: [{ provide: APP_BASE_HREF, useValue: req.baseUrl }] });
});

return server;
}

function run() {
const port = process.env.PORT || 4000;

// Start up the Node server
const server = app();
server.listen(port, () => {
console.log(`Node Express server listening on http://localhost:${port}`);
});
}

// Webpack will replace 'require' with '__webpack_require__'
// '__non_webpack_require__' is a proxy to Node 'require'
// The below code is to ensure that the server is run only when not requiring the bundle.
declare const __non_webpack_require__: NodeRequire;
const mainModule = __non_webpack_require__.main;
const moduleFilename = mainModule && mainModule.filename || '';
if (moduleFilename === __filename || moduleFilename.includes('iisnode')) {
run();
}

export * from './src/main.server';
50 changes: 50 additions & 0 deletions server.ts.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import 'zone.js/dist/zone-node';
import 'reflect-metadata';
import {enableProdMode} from '@angular/core';
// Express Engine
import {ngExpressEngine} from '@nguniversal/express-engine';
// Import module map for lazy loading
import {provideModuleMap} from '@nguniversal/module-map-ngfactory-loader';

import * as express from 'express';
import {join} from 'path';

// Faster server renders w/ Prod mode (dev mode never needed)
enableProdMode();

// Express server
const app = express();

const PORT = process.env.PORT || 4000;
const DIST_FOLDER = join(process.cwd(), 'dist/browser');

// * NOTE :: leave this as require() since this file is built Dynamically from webpack
const {AppServerModuleNgFactory, LAZY_MODULE_MAP} = require('./dist/server/main');

// Our Universal express-engine (found @ https://github.com/angular/universal/tree/master/modules/express-engine)
app.engine('html', ngExpressEngine({
bootstrap: AppServerModuleNgFactory,
providers: [
provideModuleMap(LAZY_MODULE_MAP)
]
}));

app.set('view engine', 'html');
app.set('views', DIST_FOLDER);

// Example Express Rest API endpoints
// app.get('/api/**', (req, res) => { });
// Server static files from /browser
app.get('*.*', express.static(DIST_FOLDER, {
maxAge: '1y'
}));

// All regular routes use the Universal engine
app.get('*', (req, res) => {
res.render('index', { req });
});

// Start up the Node server
app.listen(PORT, () => {
console.log(`Node Express server listening on http://localhost:${PORT}`);
});
File renamed without changes.
27 changes: 27 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';

const routes: Routes = [
{
path: '',
redirectTo: 'home',
pathMatch: 'full'
},
{
path: 'home',
loadChildren: () => import('./home/home.module').then(m => m.HomeModule)
},
{
path: 'getting-started',
loadChildren: () => import('./getting-started/getting-started.module').then(m => m.GettingStartedModule)
},
];

@NgModule({
imports: [RouterModule.forRoot(routes, {
initialNavigation: 'enabled'
})],
exports: [RouterModule]
})
export class AppRoutingModule {
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion demo/src/app/app.module.ts → src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ import {OverlayModule} from '@angular/cdk/overlay';
// Add .withServerTransition() to support Universal rendering.
// The application ID can be any identifier which is unique on
// the page.
BrowserModule.withServerTransition({appId: 'ngx-material-pages-demo-id'}),
BrowserModule.withServerTransition({appId: 'demo'}),
ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production}),
BrowserAnimationsModule,
FormsModule,
Original file line number Diff line number Diff line change
@@ -3,16 +3,14 @@ import {ServerModule} from '@angular/platform-server';

import {AppModule} from './app.module';
import {AppComponent} from './app.component';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';

@NgModule({
imports: [
// The AppServerModule should import your AppModule followed
// by the ServerModule from @angular/platform-server.
AppModule,
ServerModule,
ModuleMapLoaderModule
],
ServerModule
],
// Since the bootstrapped component is not inherited from your
// imported AppModule, it needs to be repeated here.
bootstrap: [AppComponent],
Loading