Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 14bb183

Browse files
committed
add example
1 parent bf8c09f commit 14bb183

Some content is hidden

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

47 files changed

+673
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
dist/
2+
node_modules/
3+
out-tsc/
4+
debug.log
5+
npm-debug.log
6+
src/**/*.js
7+
!src/demo/systemjs.config.js
8+
!src/demo/systemjs.config.lib.js
9+
*.js.map
10+
e2e/**/*.js
11+
e2e/**/*.js.map
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Ignore eveything by default.
2+
/*
3+
4+
# Only publish these files/folders:
5+
!dist/
6+
!LICENSE
7+
!package.json
8+
!README.md
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2014-2016 Google, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Angular QuickStart Lib
2+
[![Build Status][travis-badge]][travis-badge-url]
3+
4+
This is a simple library quickstart for Angular libraries.
5+
6+
Features:
7+
- a simple a library
8+
- unit tests for the library
9+
- a demo application that consumes the library in JIT mode and runs in watch mode
10+
- an integration app that consumes the library in JIT and AOT mode and runs e2e tests
11+
12+
Common tasks are present as npm scripts:
13+
14+
- `npm start` to run a live-reload server with the demo app
15+
- `npm run test` to test in watch mode, or `npm run test:once` to only run once
16+
- `npm run build` to build the library
17+
- `npm run lint` to lint
18+
- `npm run clean` to clean
19+
- `npm run integration` to run the integration e2e tests
20+
- `npm install ./relative/path/to/lib` after `npm run build` to test locally in another app
21+
22+
If you need to debug the integration app, please check `./integration/README.md`.
23+
24+
[travis-badge]: https://travis-ci.org/filipesilva/angular-quickstart-lib.svg?branch=master
25+
[travis-badge-url]: https://travis-ci.org/filipesilva/angular-quickstart-lib
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
node_modules
2+
npm-debug.log
3+
src/**/*.js
4+
!src/systemjs.config.js
5+
*.js.map
6+
e2e/**/*.js
7+
e2e/**/*.js.map
8+
out-tsc/*
9+
dist/*
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Integration App
2+
3+
This is a simplified version of https://github.com/angular/quickstart used to test the built lib.
4+
5+
## npm scripts
6+
7+
We've captured many of the most useful commands in npm scripts defined in the `package.json`:
8+
9+
* `npm start` - runs the compiler and a server at the same time, both in "watch mode".
10+
* `npm run e2e` - compiles the app and run e2e tests.
11+
* `npm run e2e:aot` - compiles and the app with AOT and run e2e tests.
12+
13+
14+
If you need to manually test a library build, follow these steps:
15+
```
16+
# starting at the project root, build the library
17+
npm run build
18+
# clean the integration app
19+
npm run preintegration
20+
cd integration
21+
npm install
22+
```
23+
24+
Now the library is installed in your integration app.
25+
26+
You can use `npm start` to start a live reload server running the app in JIT mode, or `npm run build && npm run serve:aot` to run a static server in AOT mode.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"server": {
3+
"baseDir": "dist"
4+
}
5+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"open": false,
3+
"logLevel": "silent",
4+
"port": 8080,
5+
"server": {
6+
"baseDir": "dist",
7+
"middleware": {
8+
"0": null
9+
}
10+
}
11+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"open": false,
3+
"logLevel": "silent",
4+
"port": 8080,
5+
"server": {
6+
"baseDir": "src",
7+
"routes": {
8+
"/node_modules": "node_modules"
9+
},
10+
"middleware": {
11+
"0": null
12+
}
13+
}
14+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"server": {
3+
"baseDir": "src",
4+
"routes": {
5+
"/node_modules": "node_modules"
6+
}
7+
}
8+
}

0 commit comments

Comments
 (0)