Skip to content

Commit

Permalink
feat: update to Angular 13 (akveo#2944)
Browse files Browse the repository at this point in the history
  • Loading branch information
yggg authored Nov 12, 2021
1 parent 9b525f4 commit ed8cd04
Show file tree
Hide file tree
Showing 57 changed files with 58,964 additions and 13,488 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npm run build:packages
Expand All @@ -16,14 +16,27 @@ jobs:
name: built-packages
path: 'dist/'
retention-days: 1
# Remove once Angular drop support for RxJS@6
build-packages-rxjs-7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- run: |
npm ci
npm install rxjs@7.4.0
npm run build:packages
build-docs:
needs: build-packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- run: npm ci
- run: npm run docs:build
build-playground:
Expand All @@ -33,7 +46,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- run: npm ci
- uses: actions/download-artifact@v2
with:
Expand All @@ -46,7 +59,7 @@ jobs:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: '14'
# node-version: '16'
# - run: npm ci
# - run: npm run ci:lint
# e2e:
Expand All @@ -56,7 +69,7 @@ jobs:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: '14'
# node-version: '16'
# - run: npm ci
# - uses: actions/download-artifact@v2
# with:
Expand Down Expand Up @@ -87,7 +100,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- run: npm ci
- uses: actions/download-artifact@v2
with:
Expand Down Expand Up @@ -119,7 +132,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- uses: actions/download-artifact@v2
with:
name: built-packages
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ node_modules
!.vscode/extensions.json

# misc
/.angular/cache
/packages-smoke/.angular/cache
/.sass-cache
/connect.lock
/coverage/*
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.6
16.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h2>{{ themeName }} Theme</h2>
<tbody>
<tr *ngFor="let prop of filtered">
<td>
<a [routerLink]="" fragment="{{ prop.name }}">{{ prop.name }}</a>
<a [routerLink]="[]" fragment="{{ prop.name }}">{{ prop.name }}</a>
</td>

<td ngdColorSwatch>{{ prop.value }}</td>
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/auth/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const routes: Routes = [
Last but not least - install the component styles into your styles.scss ([more details](docs/design-system/enable-customizable-theme)):
```scss
@import '~@nebular/auth/styles/globals';
@import '@nebular/auth/styles/globals';

// ...

Expand Down
4 changes: 2 additions & 2 deletions docs/articles/design-system/css-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Starting with Nebular 4, Nebular can run in custom CSS properties mode in a simp
To enable the mode, find your `themes.scss` and set the `$nb-enable-css-custom-properties` to `true`:

```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/default';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/default';

$nb-enable-css-custom-properties: true; // <-- enable css custom properties

Expand Down
20 changes: 10 additions & 10 deletions docs/articles/design-system/custom-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ In our case `aquamarine` theme is a colored one, let's use `dark` as a parent.
Now, let's register the new theme in `themes.scss`:

```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/dark';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/dark';


$nb-themes: nb-register-theme((
Expand Down Expand Up @@ -61,8 +61,8 @@ Let's modify them and put our aquamarine colors, starting with white for `color-
for `color-basic-1100`:
```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/dark';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/dark';

$nb-themes: nb-register-theme((
color-basic-100: white,
Expand All @@ -86,8 +86,8 @@ In a case we need to tweak the color more accurately, we can change how basic co
For example, we can make the theme backgrounds and borders lighter, by using basic color lighter for one grade up:
```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/dark';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/dark';

$nb-themes: nb-register-theme((
color-basic-100: white,
Expand Down Expand Up @@ -121,8 +121,8 @@ $nb-themes: nb-register-theme((
Since we changed backgrounds to a lighter ones, we might need to change elements shadow, making it lighter as well:
```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/dark';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/dark';

$nb-themes: nb-register-theme((
color-basic-100: white,
Expand Down Expand Up @@ -159,8 +159,8 @@ Texts color may also be affected by the backgrounds change. In our case, `disabl
color as a background. Let's make it one shade lighter:
```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/dark';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/dark';

$nb-themes: nb-register-theme((
color-basic-100: white,
Expand Down
14 changes: 7 additions & 7 deletions docs/articles/design-system/enable-customizable-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Create a `themes.scss` in your `src` folder and import a theme of your choice:

```scss
// import Nebular Theme System and the default theme
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/default';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/default';

```
<hr>
Expand All @@ -29,8 +29,8 @@ To adjust some of the theme variables, we need to register our changes using `nb
Let's make text color lighter and disabled text - darker:

```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/default';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/default';

$nb-themes: nb-register-theme((
text-basic-color: color-basic-800, // <- we setting color-basic-800 instead of color-basic-1000
Expand All @@ -42,8 +42,8 @@ We can also modify a primary color, for example make it violet.
[Eva Colors](https://colors.eva.design?utm_campaign=eva_design%20-%20eva%20colors%20-%20nebular%20docs%20link&utm_source=nebular&utm_medium=referral&utm_content=enable_customizable_theme_primary_color) is a great tool to generate colors pallet from a given brand color.

```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/default';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/default';

$nb-themes: nb-register-theme((

Expand Down Expand Up @@ -72,7 +72,7 @@ The last thing, find your `styles.scss` (or create one and add it into `angular.
@import 'themes';

// framework component styles
@import '~@nebular/theme/styles/globals';
@import '@nebular/theme/styles/globals';

// install the framework styles
@include nb-install() {
Expand Down
6 changes: 3 additions & 3 deletions docs/articles/design-system/multiple-runtime-themes.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ This mode comes in handy when you need to have multiple themes and be able to ch
Assuming you already have the `themes.scss` file with the `default` theme enabled, let's add a second theme:

```scss
@import '~@nebular/theme/styles/theming';
@import '~@nebular/theme/styles/themes/default';
@import '~@nebular/theme/styles/themes/dark';
@import '@nebular/theme/styles/theming';
@import '@nebular/theme/styles/themes/default';
@import '@nebular/theme/styles/themes/dark';

$nb-themes: nb-register-theme((
text-basic-color: color-basic-800, // some styles we changed
Expand Down
12 changes: 0 additions & 12 deletions docs/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@
* BROWSER POLYFILLS
*/

/**
* IE11 requires the following for NgClass support on SVG elements
*/
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
Expand Down
Loading

0 comments on commit ed8cd04

Please sign in to comment.