Skip to content

Commit

Permalink
feat(): update examples with build scripts and CONTRIBUTING guide #183
Browse files Browse the repository at this point in the history
  • Loading branch information
Ks89 committed Aug 12, 2020
1 parent 3489aff commit 1610720
Show file tree
Hide file tree
Showing 16 changed files with 319 additions and 444 deletions.
74 changes: 40 additions & 34 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,61 +15,49 @@ Every time you'll run `npm install` inside an example's folder, you must rebuild
7. `cd ../..`
8. `cd examples/angular-cli-10`
9. `npm install`
10. `cd ../../..`
10. `cd ../..`
11. `cd examples/angular-cli-9`
12. `npm install`
13. `cd ../../..`
13. `cd ../..`
14. `cd examples/universal`
15. `npm install`
16. `cd ../../..`
16. `cd ../..`
17. `cd examples/angular-cli-material`
18. `npm install`
19. `cd ../../..`
19. `cd ../..`
20. `npm run build:all`
21. `npm run docs:typedoc` => try to open `./docs/typedoc/index.html` with the `internal library documentation`
22. `npm run docs:compodoc` => try to open `./docs/compodoc/index.html` with the `internal library documentation`
23. `npm test`
24. `npm run e2e`
21. `npm test`

# B. Run main angular-cli-10 example
1. `cd examples/angular-cli-10`
2. `npm start` => if everything is ok (also in browser's console), kill the process and go to the next step
3. `npm run build:main:dev`
4. `cd dist/apps/main/ && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
5. `cd ../../..`
6. `npm run build:main:prod`
7. `cd dist/apps/main/ && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
8. `cd ../../..`
# B. Run main example
1. `npm start` => if everything is ok (also in browser's console), kill the process and go to the next step
2. `npm run build:main:dev`
3. `cd dist/angular-modal-gallery && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
4. `cd ../..`
5. `npm run build:main:prod`
6. `cd dist/angular-modal-gallery && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
7. `cd ../..`

# C. Run angular-cli-9 example
1. `cd examples/angular-cli-9`
# C. Run angular-cli-10 example
1. `cd examples/angular-cli-10`
2. `npm start` => if everything is ok (also in browser's console), kill the process and go to the next step
3. `npm run build:dev`
4. `cd dist/angular-cli && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
5. `cd ../..`
6. `npm run build:prod`
7. `cd dist/angular-cli && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
8. `cd ../../../..`
8. `cd ../..`

# D. Run systemjs example
1. `cd examples/systemjs`
# D. Run angular-cli-9 example
1. `cd examples/angular-cli-9`
2. `npm start` => if everything is ok (also in browser's console), kill the process and go to the next step
3. `cd ../..`

# E. Run universal example
1. `cd examples/universal`
2. `npm run start` => if everything is ok (also in browser's console), kill the process and go to the next step
3. `npm run build:dev`
4. `cd dist/browser && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
4. `cd dist/angular-cli && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
5. `cd ../..`
6. `npm run build:prod`
7. `cd dist/browser && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
7. `cd dist/angular-cli && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
8. `cd ../..`
9. `npm run build:ssr && npm run serve:ssr` => if everything is ok (also in browser's console), kill the process and go to the next step
10. `npm run build:prerender && npm run serve:prerender` => if everything is ok (also in browser's console), kill the process and go to the next step
11. `cd ../..`

# F. Run angular-cli-material example
# E. Run angular-cli-material example
1. `cd examples/angular-cli-material`
2. `npm start` => if everything is ok (also in browser's console), kill the process and go to the next step
3. `npm run build:dev`
Expand All @@ -79,7 +67,25 @@ Every time you'll run `npm install` inside an example's folder, you must rebuild
7. `cd dist/angular-cli-material && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
8. `cd ../../../..`

# G. Create your pull request
# F. Run systemjs example
1. `cd examples/systemjs`
2. `npm start` => if everything is ok (also in browser's console), kill the process and go to the next step
3. `cd ../..`

# G. Run universal example
1. `cd examples/universal`
2. `npm run start` => if everything is ok (also in browser's console), kill the process and go to the next step
3. `npm run build:dev`
4. `cd dist/universal/browser && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
5. `cd ../../..`
6. `npm run build:prod`
7. `cd dist/universal/browser && lite-server` => if everything is ok (also in browser's console), kill the process and go to the next step
8. `cd ../../..`
9. `npm run build:ssr && npm run serve:ssr` => if everything is ok (also in browser's console), kill the process and go to the next step
10. `npm run prerender && npm run serve:ssr` => if everything is ok (also in browser's console), kill the process and go to the next step
11. `cd ../..`

# H. Create your pull request
1. **If it is ok, create your pull request specifying all the details**

<br/>
Expand Down
29 changes: 10 additions & 19 deletions examples/angular-cli-9/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion examples/angular-cli-9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"build": "npm run build:dev",
"build:dev": "ng build --aot",
"build:prod": "ng build --prod --aot",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ export class ModalGalleryExampleComponent implements OnDestroy {
constructor(private modalGalleryService: ModalGalleryService, private sanitizer: DomSanitizer) {}

// this variable is used only for example of auto navigation
private timeout: number | undefined;
// tslint:disable-next-line:no-any
private timeout: any;

openModalWithAutoClose(id: number, imagesArrayToUse: Image[], imageIndex: number, libConfig?: LibConfig): void {
const imageToShow: Image = imagesArrayToUse[imageIndex];
Expand Down
Loading

0 comments on commit 1610720

Please sign in to comment.