Skip to content
This repository was archived by the owner on May 25, 2021. It is now read-only.

Commit 87edd2d

Browse files
santiago-elustondomascarenhas
authored andcommitted
Add demos to monorepo (#17)
1 parent 5980bc6 commit 87edd2d

File tree

104 files changed

+9982
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+9982
-0
lines changed

demos/README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Augury Labs Demos
2+
3+
## Instructions
4+
5+
1) build Augury Labs workspace (from the repository root)
6+
* `yarn` (from repo root)
7+
* `yarn build` or `yarn build:watch` (from repo root)
8+
2) serve specific demo project (from the specific demo directory)
9+
* `yarn` (from demo dir)
10+
* `yarn start:augury` or `yarn start` (from demo dir)
11+
12+
## Configuration patterns of Augury Labs demos
13+
14+
### These demos are not part of the Augury Labs yarn workspace.
15+
16+
This is because, while all Augury Labs packages needs to interoperate and share dependencies, demos
17+
have particular individual needs that may clash with each other and cause various complications.
18+
Some Examples:
19+
* Demos might want to showcase Augury's compatibility with particular versions of Angular.
20+
* Projects built using the standard `@angular/cli` do not play nice with lerna/yarn workspaces.
21+
22+
As such, they have their dependencies installed separately. Dependencies are kept in the demo's own `node_modules` folder.
23+
24+
### Demos do not declare `@augury/*` packages in their package.json
25+
26+
Since they are installed independently, in order for the demos to use the `@augury/*` modules directly from `packages/*`, they do not declare these dependencies, as doing so would result in the `@augury/*` packages being fetched from the npm registry.
27+
28+
To accomplish this, the demo projects rely on the workspace to have been built a priori. The undeclared packages are then found by the node module resolver in the `node_modules` folder at the repository root.
29+
30+
This allows us to run watchers on the workspace as well as individual demo projects, triggering reloads on changes to either workspace or demo code.
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

demos/performance-profiler/.gitignore

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
8+
# dependencies
9+
/node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
testem.log
34+
/typings
35+
36+
# e2e
37+
/e2e/*.js
38+
/e2e/*.map
39+
40+
# System Files
41+
.DS_Store
42+
Thumbs.db

demos/performance-profiler/README.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# KitchenSinkDemo
2+
3+
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.6.2.
4+
5+
## Development server
6+
7+
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
8+
9+
## Code scaffolding
10+
11+
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
12+
13+
## Build
14+
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
16+
17+
## Running unit tests
18+
19+
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
20+
21+
## Running end-to-end tests
22+
23+
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
24+
25+
## Further help
26+
27+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
+161
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
{
2+
"version": 1,
3+
"newProjectRoot": "projects",
4+
"projects": {
5+
"kitchen-sink-demo": {
6+
"root": "",
7+
"projectType": "application",
8+
"architect": {
9+
"build": {
10+
"builder": "@angular-devkit/build-angular:browser",
11+
"options": {
12+
"outputPath": "dist",
13+
"index": "src/index.html",
14+
"main": "src/main.ts",
15+
"tsConfig": "src/tsconfig.app.json",
16+
"polyfills": "src/polyfills.ts",
17+
"assets": [
18+
{
19+
"glob": "**/*",
20+
"input": "src/assets",
21+
"output": "/assets"
22+
},
23+
{
24+
"glob": "favicon.ico",
25+
"input": "src",
26+
"output": "/"
27+
}
28+
],
29+
"styles": [
30+
{
31+
"input": "src/styles.css"
32+
}
33+
],
34+
"scripts": []
35+
},
36+
"configurations": {
37+
"production": {
38+
"optimization": true,
39+
"outputHashing": "all",
40+
"sourceMap": false,
41+
"extractCss": true,
42+
"namedChunks": false,
43+
"aot": true,
44+
"extractLicenses": true,
45+
"vendorChunk": false,
46+
"buildOptimizer": true,
47+
"fileReplacements": [
48+
{
49+
"src": "src/environments/environment.ts",
50+
"replaceWith": "src/environments/environment.prod.ts"
51+
}
52+
]
53+
},
54+
"augury": {
55+
"fileReplacements": [
56+
{
57+
"replace": "src/main.ts",
58+
"with": "src/main.augury.ts"
59+
}
60+
]
61+
}
62+
}
63+
},
64+
"serve": {
65+
"builder": "@angular-devkit/build-angular:dev-server",
66+
"options": {
67+
"browserTarget": "kitchen-sink-demo:build"
68+
},
69+
"configurations": {
70+
"production": {
71+
"browserTarget": "kitchen-sink-demo:build:production"
72+
},
73+
"augury": {
74+
"browserTarget": "kitchen-sink-demo:build:augury"
75+
}
76+
}
77+
},
78+
"extract-i18n": {
79+
"builder": "@angular-devkit/build-angular:extract-i18n",
80+
"options": {
81+
"browserTarget": "kitchen-sink-demo:build"
82+
}
83+
},
84+
"test": {
85+
"builder": "@angular-devkit/build-angular:karma",
86+
"options": {
87+
"main": "src/test.ts",
88+
"karmaConfig": "./karma.conf.js",
89+
"polyfills": "src/polyfills.ts",
90+
"tsConfig": "src/tsconfig.spec.json",
91+
"scripts": [],
92+
"styles": [
93+
{
94+
"input": "src/styles.css"
95+
}
96+
],
97+
"assets": [
98+
{
99+
"glob": "**/*",
100+
"input": "src/assets",
101+
"output": "/assets"
102+
},
103+
{
104+
"glob": "favicon.ico",
105+
"input": "src",
106+
"output": "/"
107+
}
108+
]
109+
}
110+
},
111+
"lint": {
112+
"builder": "@angular-devkit/build-angular:tslint",
113+
"options": {
114+
"tsConfig": [
115+
"src/tsconfig.app.json",
116+
"src/tsconfig.spec.json"
117+
],
118+
"exclude": [
119+
"**/node_modules/**"
120+
]
121+
}
122+
}
123+
}
124+
},
125+
"kitchen-sink-demo-e2e": {
126+
"root": "",
127+
"projectType": "application",
128+
"cli": {},
129+
"schematics": {},
130+
"architect": {
131+
"e2e": {
132+
"builder": "@angular-devkit/build-angular:protractor",
133+
"options": {
134+
"protractorConfig": "./protractor.conf.js",
135+
"devServerTarget": "kitchen-sink-demo:serve"
136+
}
137+
},
138+
"lint": {
139+
"builder": "@angular-devkit/build-angular:tslint",
140+
"options": {
141+
"tsConfig": [
142+
"e2e/tsconfig.e2e.json"
143+
],
144+
"exclude": [
145+
"**/node_modules/**"
146+
]
147+
}
148+
}
149+
}
150+
}
151+
},
152+
"schematics": {
153+
"@schematics/angular:component": {
154+
"prefix": "app",
155+
"styleext": "css"
156+
},
157+
"@schematics/angular:directive": {
158+
"prefix": "app"
159+
}
160+
}
161+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('kitchen-sink-demo App', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display welcome message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Welcome to app!');
13+
});
14+
});
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"baseUrl": "./",
6+
"module": "commonjs",
7+
"target": "es5",
8+
"types": [
9+
"jasmine",
10+
"jasminewd2",
11+
"node"
12+
]
13+
}
14+
}
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
// Karma configuration file, see link for more information
2+
// https://karma-runner.github.io/1.0/config/configuration-file.html
3+
4+
module.exports = function (config) {
5+
config.set({
6+
basePath: '',
7+
frameworks: ['jasmine', '@angular-devkit/build-angular'],
8+
plugins: [
9+
require('karma-jasmine'),
10+
require('karma-chrome-launcher'),
11+
require('karma-jasmine-html-reporter'),
12+
require('karma-coverage-istanbul-reporter'),
13+
require('@angular-devkit/build-angular/plugins/karma')
14+
],
15+
client:{
16+
clearContext: false // leave Jasmine Spec Runner output visible in browser
17+
},
18+
coverageIstanbulReporter: {
19+
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
20+
fixWebpackSourcePaths: true
21+
},
22+
angularCli: {
23+
environment: 'dev'
24+
},
25+
reporters: ['progress', 'kjhtml'],
26+
port: 9876,
27+
colors: true,
28+
logLevel: config.LOG_INFO,
29+
autoWatch: true,
30+
browsers: ['Chrome'],
31+
singleRun: false
32+
});
33+
};

0 commit comments

Comments
 (0)