You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
refactor: update preboot to conform to Angular Library spec
* Still maintains compatibility with non-Angular library for
direct import
* AOT compatible, compiled with Angular v5
* Removes separate ServerPreboot and BrowserPreboot and respective
options in favor of combining them into one module
* Allows for top-level imports on everything
* Add build for ES5 and ES2015 bundles
* Add karma testing capability
* Credit to angular-quickstart-lib for a lot of the scaffolding
* Credit to flex-layout and material packages for remaining work
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+13-10Lines changed: 13 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Contributing to Preboot
2
2
3
-
We would love for you to contribute to Angular 2 and help make it even better than it is
3
+
We would love for you to contribute to Preboot and help make it even better than it is
4
4
today! As a contributor, here are the guidelines we would like you to follow:
5
5
6
6
-[Code of Conduct](#coc)
@@ -13,12 +13,13 @@ today! As a contributor, here are the guidelines we would like you to follow:
13
13
-[Signing the CLA](#cla)
14
14
15
15
## <aname="coc"></a> Code of Conduct
16
-
Help us keep Angular open and inclusive. Please read and follow our [Code of Conduct][coc].
16
+
Help us keep Preboot open and inclusive. Please read and follow our [Code of Conduct][coc].
17
17
18
18
## <aname="question"></a> Got a Question or Problem?
19
19
20
20
If you have questions about how to *use* Preboot, please direct them to [Gitter][gitter].
21
-
There is also a [Slack](https://angular-universal.slack.com) ground that we would be hapy to invite you to. Just ping [@jeffwhelpley](https://twitter.com/jeffwhelpley)
21
+
There is also a [Slack](https://angular-universal.slack.com) ground that we would be happy to invite you to.
22
+
Just ping [@jeffwhelpley](https://twitter.com/jeffwhelpley)
22
23
or [@gdi2290](https://twitter.com/gdi2290) on [Twitter](https://twitter.com) or [Gitter][gitter].
23
24
24
25
## <aname="issue"></a> Found an Issue?
@@ -29,8 +30,7 @@ If you find a bug in the source code or a mistake in the documentation, you can
29
30
## <aname="feature"></a> Want a Feature?
30
31
You can *request* a new feature by [submitting an issue](#submit-issue) to our [GitHub
31
32
Repository][github]. If you would like to *implement* a new feature, please submit an issue with
32
-
a proposal for your work first, to be sure that we can use it. Angular 2 is in developer preview
33
-
and we are not ready to accept major contributions ahead of the full release.
33
+
a proposal for your work first, to be sure that we can use it.
34
34
Please consider what kind of change it is:
35
35
36
36
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
@@ -50,7 +50,7 @@ chances of your issue being dealt with quickly:
50
50
51
51
***Overview of the Issue** - if an error is being thrown a non-minified stack trace helps
52
52
***Preboot Version** - what version is affected
53
-
***Motivation for or Use Case** - explain what are you trying to do and why the current behavior is a bug for you
53
+
***Motivation for or Use Case** - explain what you are trying to do and why the current behavior is a bug for you
54
54
***Browsers and Operating System** - is this a problem with all browsers?
55
55
***Reproduce the Error** - provide a live example (using [Plunker][plunker],
56
56
[JSFiddle][jsfiddle] or [Runnable][runnable]) or a unambiguous set of steps
@@ -95,7 +95,7 @@ Before you submit your Pull Request (PR) consider the following guidelines:
95
95
* In GitHub, send a pull request to `preboot:master`.
96
96
* If we suggest changes then:
97
97
* Make the required updates.
98
-
* Re-run the Angular 2 test suitesfor JS and Dart to ensure tests are still passing.
98
+
* Re-run the Preboot test suites to ensure tests are still passing.
99
99
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
100
100
101
101
```shell
@@ -167,7 +167,8 @@ Any line of the commit message cannot be longer 100 characters! This allows the
167
167
to read on GitHub as well as in various git tools.
168
168
169
169
### Revert
170
-
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
170
+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
171
+
In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
171
172
172
173
### Type
173
174
Must be one of the following:
@@ -180,7 +181,8 @@ Must be one of the following:
180
181
***refactor**: A code change that neither fixes a bug nor adds a feature
181
182
***perf**: A code change that improves performance
182
183
***test**: Adding missing tests or correcting existing tests
183
-
***build** Changes that affect the build system, CI configuration or external dependencies (example scopes: gulp, broccoli, npm)
184
+
***build** Changes that affect the build system, CI configuration or external dependencies
185
+
(example scopes: gulp, broccoli, npm)
184
186
***chore**: Other changes that don't modify `src` or `test` files
185
187
186
188
### Scope
@@ -202,7 +204,8 @@ The body should include the motivation for the change and contrast this with pre
202
204
The footer should contain any information about **Breaking Changes** and is also the place to
203
205
reference GitHub issues that this commit **Closes**.
204
206
205
-
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.
207
+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit
208
+
message is then used for this.
206
209
207
210
A detailed explanation can be found in this [document][commit-message-format].
Copy file name to clipboardExpand all lines: README.md
+42-72Lines changed: 42 additions & 72 deletions
Original file line number
Diff line number
Diff line change
@@ -21,62 +21,38 @@ cd into your app root and run the following command:
21
21
npm i preboot --save
22
22
```
23
23
24
-
There are two parts of preboot (server configuration and browser configuration). For each part of preboot, there is a slightly different API for Angular and non-Angular apps. The following sections covers these 4 different configurations:
24
+
The following sections covers the three different configurations of preboot:
The key part here for preboot is to include `ServerPrebootModule.recordEvents({ appRoot: 'app-root' })` where the `appRoot`
53
-
is the selector to find the root of your application. The options you can pass into `recordEvents()` are in the [PrebootRecordOptions](#PrebootRecordOptions) section below. In most cases, however, you will only need to specify the `appRoot`.
54
-
55
-
#### Angular Browser Configuration
56
-
57
-
```
58
-
import { NgModule } from '@angular/core';
59
-
import { BrowserModule } from '@angular/platform-browser';
60
-
import { BrowserPrebootModule } from 'preboot/browser';
61
-
import { AppComponent } from './app.component';
62
-
63
-
@NgModule({
64
-
declarations: [AppComponent],
65
-
imports: [
66
-
BrowserModule,
67
-
BrowserPrebootModule.replayEvents()
42
+
PrebootModule.withConfig({ appRoot: 'app-root' })
68
43
],
69
44
bootstrap: [AppComponent]
70
45
})
71
46
exportclassAppModule { }
72
47
```
73
48
74
-
The key part here for preboot is to include `BrowserPrebootModule.replayEvents()`. You can optionally pass an object into `replayEvents()` that is detailed in the [PrebootReplayOptions](#PrebootReplayOptions) section further below. In most cases, however, you can just rely on the preset defaults.
49
+
The key part here for preboot is to include `PrebootModule.withConfig({ appRoot: 'app-root' })` where the `appRoot`
50
+
is the selector(s) to find the root of your application. The options you can pass into `withConfig()` are in the [PrebootOptions](#PrebootOptions) section below. In most cases, however, you will only need to specify the `appRoot`.
75
51
76
52
#### Non-Angular Server Configuration
77
53
78
54
```
79
-
import { getInlinePrebootCode } from 'preboot/record';
55
+
import { getInlinePrebootCode } from 'preboot';
80
56
81
57
const prebootOptions = {}; // see PrebootRecordOptions section below
0 commit comments