Skip to content

Commit

Permalink
fix: scss bundles proper export
Browse files Browse the repository at this point in the history
  • Loading branch information
shlomiassaf committed May 24, 2021
1 parent 03bef46 commit c86b9b5
Show file tree
Hide file tree
Showing 9 changed files with 37 additions and 8 deletions.
15 changes: 15 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,11 @@
"glob": "**/*.scss",
"input": "libs/ngrid/theming",
"output": "dist/@pebula/ngrid/theming"
},
{
"glob": "*/theming/**/*.scss",
"input": "libs/ngrid",
"output": "dist/@pebula/ngrid"
}
]
},
Expand Down Expand Up @@ -528,6 +533,11 @@
"glob": "**/*.scss",
"input": "libs/ngrid-material/theming",
"output": "dist/@pebula/ngrid-material/theming"
},
{
"glob": "*/theming/**/*.scss",
"input": "libs/ngrid-material",
"output": "dist/@pebula/ngrid-material"
}
]
},
Expand Down Expand Up @@ -686,6 +696,11 @@
"glob": "**/*.scss",
"input": "libs/ngrid-bootstrap/theming",
"output": "dist/@pebula/ngrid-bootstrap/theming"
},
{
"glob": "*/theming/**/*.scss",
"input": "libs/ngrid-bootstrap",
"output": "dist/@pebula/ngrid-bootstrap"
}
]
},
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrid-dev-app/src/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ $ngrid-material-starter-theme: ngrid.define-light-theme($ngrid-material-starter-
@include mat.core($typography-config);
@include ngrid.ngrid-typography($typography-config);
@include mat.all-component-themes($ngrid-material-starter-theme);
@include ngrid.ngrid-theme($ngrid-material-starter-theme);
@include ngrid-material.all-ngrid-material-theme($ngrid-material-starter-theme);

html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }
Expand Down
2 changes: 1 addition & 1 deletion apps/ngrid-docs-app/src/styles/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $pbl-shell-theme: default-theme.shell-light-theme(mat.$blue-palette, mat.$light-
@include shell.render-shell-app-theme($pbl-shell-theme, $typography-config);

// @include ngrid.ngrid-theme($pbl-shell-theme);
@include ngrid-material.ngrid-material-theme($pbl-shell-theme);
@include ngrid-material.all-ngrid-material-theme($pbl-shell-theme);

@include ngrid.predefined-spacing($pbl-shell-theme);

Expand Down
3 changes: 2 additions & 1 deletion libs/ngrid-material/_index.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
@forward './theming/ngrid-material' show ngrid-material-theme;
@forward './theming/ngrid-material' show ngrid-material-theme, all-ngrid-material-theme;
@forward './context-menu/theming' show ngrid-material-context-menu-theme;
6 changes: 5 additions & 1 deletion libs/ngrid-material/theming/_ngrid-material.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@use '../../ngrid' as ngrid;
@use '../context-menu/src/theme' as context-menu;
@use '../context-menu/theming' as context-menu;

@mixin ngrid-material-theme($theme) {
@include ngrid.ngrid-theme($theme);
}

@mixin all-ngrid-material-theme($theme) {
@include ngrid.all-ngrid-theme($theme);
@include context-menu.ngrid-material-context-menu-theme($theme);
}
6 changes: 5 additions & 1 deletion libs/ngrid/_index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
@forward './theming/typography/typography' show define-typography-level, define-typography-config;
@forward './theming/palette' show $blue-palette, $grey-palette, $light-theme-palette, $dark-theme-palette, $spacing-theme-defaults;
@forward './theming/theming' show define-palette, get-color-from-palette, define-light-theme, define-dark-theme;
@forward './theming/style/render/ngrid' show ngrid-theme, ngrid-typography;

@forward './theming/style/render/ngrid' show all-ngrid-theme, ngrid-theme, ngrid-typography;
@forward './theming/style/render/ngrid-spacing.scss' show spacing-theme, predefined-spacing;

@forward './drag/theming' show ngrid-drag-plugin-theme;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@use 'sass:map';
@use 'sass:color';

@mixin drag-plugin-theme($theme) {
@mixin ngrid-drag-plugin-theme($theme) {
$primary: map.get($theme, primary);
$accent: map.get($theme, accent);
$warn: map.get($theme, warn);
Expand Down
9 changes: 7 additions & 2 deletions libs/ngrid/theming/style/render/ngrid.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
@use 'sass:map';
@use 'sass:color';

@use '../../../drag/theming' as drag;
@use '../base';
@use '../../typography/typography' as typography;
@use '../../typography/typography-utils' as typography-utils;
@use './cdk-table';
@use './ngrid-spacing';

@use '../plugins//drag.plugin' as drag;

@mixin ngrid-theme($theme) {
@include cdk-table.cdk-table-theme($theme);
Expand Down Expand Up @@ -87,7 +88,11 @@
}
}

@include drag.drag-plugin-theme($theme);
}

@mixin all-ngrid-theme($theme) {
@include ngrid-theme($theme);
@include drag.ngrid-drag-plugin-theme($theme);
}

@mixin ngrid-typography($config: null) {
Expand Down

0 comments on commit c86b9b5

Please sign in to comment.