-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor(chlorophyll): update structure and use relative paths closes #281 * build(charts): output scss and compiled css closes #280 * chore(deps): update * chore(extract): add build and release config
- Loading branch information
Showing
135 changed files
with
881 additions
and
841 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
apps/angular-lib-dev/src/app/green-charts/green-charts-routing.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { GreenChartsComponent } from './green-charts.component'; | ||
|
||
const routes: Routes = [{ path: '', component: GreenChartsComponent }]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class GreenChartsRoutingModule { } |
Empty file.
25 changes: 25 additions & 0 deletions
25
apps/angular-lib-dev/src/app/green-charts/green-charts.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component } from '@angular/core' | ||
import { ChartSettings } from '@sebgroup/green-charts' | ||
|
||
@Component({ | ||
selector: 'green-green-charts', | ||
template: `<ngg-chart [settings]="settings"></ngg-chart>`, | ||
styleUrls: ['./green-charts.component.css'], | ||
}) | ||
export class GreenChartsComponent { | ||
settings: ChartSettings = { | ||
data: [ | ||
{ | ||
name: 'Antal', | ||
type: 'bar', | ||
values: [234, 197, 97, 12], | ||
}, | ||
], | ||
categories: [ | ||
'Signerade avtal (SEB)', | ||
'Påbörjade trials (Oxceed)', | ||
'Aktiverade prenumerationer', | ||
'Avslutade prenumerationer (endast efter avslutad ordinarie pren.)', | ||
], | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
apps/angular-lib-dev/src/app/green-charts/green-charts.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { NgModule } from '@angular/core' | ||
import { CommonModule } from '@angular/common' | ||
|
||
import { GreenChartsRoutingModule } from './green-charts-routing.module' | ||
import { GreenChartsComponent } from './green-charts.component' | ||
import { NggChartsModule } from '@sebgroup/green-angular-charts' | ||
|
||
@NgModule({ | ||
declarations: [GreenChartsComponent], | ||
imports: [CommonModule, NggChartsModule, GreenChartsRoutingModule], | ||
}) | ||
export class GreenChartsModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* You can add global styles to this file, and also import other style files */ | ||
|
||
@use './libs/chlorophyll/src/lib' with ( | ||
$font-path: '../fonts' | ||
); | ||
@use './libs/chlorophyll/scss' with ($font-path: '../fonts'); | ||
|
||
@use './libs/charts/scss' as charts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
<Meta title="Get started" /> | ||
|
||
# Install | ||
|
||
``` | ||
npm install @sebgroup/green-angular-charts --save | ||
``` | ||
|
||
# Import chart module | ||
We recommend import `NggChartsModule` into a shared module eg. `SharedModule` that can be imported into other, preferably lazy loaded modules when needed. | ||
```ts | ||
import { NggChartsModule } from '@sebgroup/green-angular-charts' | ||
|
||
@NgModule({ | ||
declarations: [...], | ||
imports: [ | ||
... | ||
NggChartsModule | ||
], | ||
exports: [ | ||
NggChartsModule | ||
] | ||
}) | ||
export class SharedModule {} | ||
``` | ||
|
||
# Import styling | ||
We recommend setting up your Angular project to use scss (SASS) for css preprocessing. | ||
|
||
Once configured to use scss, it's just a matter of including the scss to your main styles file, typically it would be `styles.scss` located at the root of the `src` folder unless you've changed it. | ||
Don't forget to add the base styles for green as they're needed too (example with minimal dependencies will be added later). | ||
|
||
### Add scss | ||
`{project}/src/styles.scss` | ||
|
||
```css | ||
// import base styles from green/chlorophyll | ||
@use '~@sebgroup/chlorophyll/scss' with ($font-path: '../fonts'); | ||
|
||
// import chart styles from green-charts | ||
@use "~@sebgroup/green-charts/scss" as charts; | ||
``` | ||
|
||
# Add and use component | ||
`{project}/src/app/ex-bar-chart/ex-bar-chart.component.ts` | ||
|
||
```ts | ||
import { Component } from '@angular/core' | ||
import { ChartSettings } from '@sebgroup/green-charts' | ||
|
||
@Component({ | ||
selector: 'ex-bar-chart', | ||
template: `<ngg-chart [settings]="settings"></ngg-chart>`, | ||
styleUrls: ['./green-charts.component.css'], | ||
}) | ||
export class BarChartsComponent { | ||
settings: ChartSettings = { | ||
data: [ | ||
{ | ||
name: 'Antal', | ||
type: 'bar', | ||
values: [234, 197, 97, 12], | ||
}, | ||
], | ||
categories: [ | ||
'Signerade avtal (SEB)', | ||
'Påbörjade trials (Oxceed)', | ||
'Aktiverade prenumerationer', | ||
'Avslutade prenumerationer (endast efter avslutad ordinarie pren.)', | ||
], | ||
} | ||
} | ||
``` | ||
|
||
### Have other needs? | ||
More examples and use cases coming soon! In the meantime create an [issue over at github](https://github.com/sebgroup/green/issues) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Meta } from '@storybook/addon-docs'; | ||
|
||
<Meta title="Get started" /> | ||
|
||
# Install | ||
|
||
``` | ||
npm install @sebgroup/green-angular --save | ||
``` | ||
|
||
# Import module | ||
We recommend import `NggModule` (or just the module you need for Angular Green) into a shared module eg. `SharedModule` that can be imported into other, preferably lazy loaded modules when needed. | ||
```ts | ||
import { NggModule } from '@sebgroup/green-angular' | ||
|
||
@NgModule({ | ||
declarations: [...], | ||
imports: [ | ||
... | ||
NggModule | ||
], | ||
exports: [ | ||
NggModule | ||
] | ||
}) | ||
export class SharedModule {} | ||
``` | ||
|
||
# Import styling | ||
We recommend setting up your Angular project to use scss (SASS) for css preprocessing. | ||
|
||
Once configured to use scss, it's just a matter of including the scss to your main styles file, typically it would be `styles.scss` located at the root of the `src` folder unless you've changed it. | ||
|
||
### Add scss | ||
`{project}/src/styles.scss` | ||
|
||
```css | ||
// import base styles from green/chlorophyll | ||
@use '~@sebgroup/chlorophyll/scss' with ($font-path: '../fonts'); | ||
``` | ||
|
||
### Have other needs? | ||
More examples and use cases coming soon! In the meantime create an [issue over at github](https://github.com/sebgroup/green/issues) | ||
|
||
|
6 changes: 3 additions & 3 deletions
6
libs/charts/src/scss/index.scss → libs/charts/scss/index.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
libs/charts/src/scss/shame.scss → libs/charts/scss/shame.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
import './scss/index.scss' | ||
export * from './lib' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.