Skip to content

Commit 6881f89

Browse files
committed
feat(ng-styled): rename
1 parent a3a7b36 commit 6881f89

162 files changed

Lines changed: 2096 additions & 518 deletions

File tree

Some content is hidden

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

.commitlintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'scope-enum': [
2525
2,
2626
'always',
27-
['docs', 'test', 'package', 'website', 'angular-jss'],
27+
['docs', 'test', 'package', 'website', 'ng-styled'],
2828
],
2929
},
3030
ignores: [(message) => message.toLowerCase().startsWith('wip')],

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# These are supported funding model platforms
2+
custom: ['https://www.paypal.me/rafalwolak']
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
16+
1. Go to '...'
17+
2. Click on '....'
18+
3. Scroll down to '....'
19+
4. See error
20+
21+
**Expected behavior**
22+
A clear and concise description of what you expected to happen.
23+
24+
**Screenshots**
25+
If applicable, add screenshots to help explain your problem.
26+
27+
**Desktop (please complete the following information):**
28+
29+
- OS: [e.g. iOS]
30+
- Browser [e.g. chrome, safari]
31+
- Version [e.g. 22]
32+
33+
**Smartphone (please complete the following information):**
34+
35+
- Device: [e.g. iPhone6]
36+
- OS: [e.g. iOS8.1]
37+
- Browser [e.g. stock browser, safari]
38+
- Version [e.g. 22]
39+
40+
**Additional context**
41+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323

2424
- name: Install Dependencies 🔧
2525
run: npm install --no-package-lock
26-
- run: npm run build -- --prod --baseHref=/angular-jss/
26+
- run: npm run build -- --prod --baseHref=/ng-styled/
2727

2828
- name: Deploy to GitHub Pages 🚀
2929
uses: peaceiris/actions-gh-pages@v3
3030
with:
3131
github_token: ${{ secrets.GITHUB_TOKEN }}
32-
publish_dir: ./dist/apps/webpage
32+
publish_dir: ./dist/apps/ng-styled-webpage

README.md

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
2-
# Angular JSS
1+
# NgStyled
32

43
<img width="20%" height="20%" src="./logo.svg">
54

65
> [JSS](https://cssinjs.org/) integration with Angular
76
8-
[![Version](https://img.shields.io/npm/v/@design4pro/angular-jss.svg?style=flat-square)](https://npmjs.org/package/@design4pro/angular-jss)
9-
[![License](https://img.shields.io/npm/l/@design4pro/angular-jss.svg?style=flat-square)](https://github.com/design4pro/angular-jss/jss/blob/master/LICENSE.md)
10-
[![Downloads](https://img.shields.io/npm/dm/@design4pro/angular-jss.svg?style=flat-square)](https://npmjs.org/package/@design4pro/angular-jss)
11-
[![Size](https://img.shields.io/bundlephobia/minzip/@design4pro/angular-jss.svg?style=flat-square)](https://npmjs.org/package/@design4pro/angular-jss)
7+
[![Version](https://img.shields.io/npm/v/@design4pro/ng-styled.svg?style=flat-square)](https://npmjs.org/package/@design4pro/ng-styled)
8+
[![License](https://img.shields.io/npm/l/@design4pro/ng-styled.svg?style=flat-square)](https://github.com/design4pro/ng-styled/jss/blob/master/LICENSE.md)
9+
[![Downloads](https://img.shields.io/npm/dm/@design4pro/ng-styled.svg?style=flat-square)](https://npmjs.org/package/@design4pro/ng-styled)
10+
[![Size](https://img.shields.io/bundlephobia/minzip/@design4pro/ng-styled.svg?style=flat-square)](https://npmjs.org/package/@design4pro/ng-styled)
1211
[![design4pro](https://img.shields.io/badge/@-design4pro-383636?style=flat-square&labelColor=8f68d4)](https://github.com/design4pro/)
1312

1413
## Features
@@ -29,28 +28,28 @@
2928
Using `npm`:
3029

3130
```sh
32-
npm install @design4pro/angular-jss
31+
npm install @design4pro/ng-styled
3332
```
3433

3534
or using `yarn`:
3635

3736
```sh
38-
yarn add @design4pro/angular-jss
37+
yarn add @design4pro/ng-styled
3938
```
4039

4140
## Usage
4241

43-
Inject the `AngularJssModule` module into your root module:
42+
Inject the `StyledModule` module into your root module:
4443

4544
```ts
4645
import { NgModule } from '@angular/core';
4746
import { BrowserModule } from '@angular/platform-browser';
48-
import { AngularJssModule } from '@design4pro/angular-jss';
47+
import { StyledModule } from '@design4pro/ng-styled';
4948
import { AppComponent } from './app.component';
5049

5150
@NgModule({
5251
declarations: [AppComponent],
53-
imports: [BrowserModule, AngularJssModule.forRoot()],
52+
imports: [BrowserModule, StyledModule.forRoot()],
5453
providers: [],
5554
bootstrap: [AppComponent],
5655
})
@@ -61,10 +60,10 @@ Use class decorator `Styled` to add styles to your component:
6160

6261
```ts
6362
import { Component } from '@angular/core';
64-
import { Styled, StyledProp, Theme } from '@design4pro/angular-jss';
63+
import { Styled, StyledProp, Theme } from '@design4pro/ng-styled';
6564

6665
@Component({
67-
selector: 'angular-jss-root',
66+
selector: 'ng-styled-root',
6867
templateUrl: './app.component.html',
6968
styleUrls: ['./app.component.css'],
7069
})
@@ -73,7 +72,8 @@ import { Styled, StyledProp, Theme } from '@design4pro/angular-jss';
7372
injectGlobal({
7473
'@global': {
7574
':root': {
76-
'--background-color': (data: { backgroundColor: string }) => data.backgroundColor,
75+
'--background-color': (data: { backgroundColor: string }) =>
76+
data.backgroundColor,
7777
},
7878
},
7979
});
@@ -113,35 +113,32 @@ export class AppComponent {
113113
import { create, Jss } from 'jss';
114114
import extend from 'jss-plugin-extend';
115115
import propsSort from 'jss-plugin-props-sort';
116-
import { JssOptions } from '@design4pro/angular-jss';
116+
import { JssOptions, StyledModule, Theme } from '@design4pro/ng-styled';
117117

118118
const jss: Jss = create({
119119
// additional JSS plugins @see https://cssinjs.org/plugins?v=v10.9.0
120-
plugins: [
121-
extend(),
122-
propsSort()
123-
],
120+
plugins: [extend(), propsSort()],
124121
});
125122

126-
const jssOptions: JssOptions = {
123+
const options: JssOptions = {
127124
jss: jss,
128-
normalize: false // disable normalizing (normalize.css)
125+
normalize: false, // disable normalizing (normalize.css)
129126
};
130127

131128
const theme: Theme = {
132129
palette: {
133130
primary: {
134-
main: '#00bcd4' // use in decorator `theme.palette?.primary?.main`
131+
main: '#00bcd4', // use in decorator `theme.palette?.primary?.main`
135132
},
136133
secondary: {
137-
main: '#f50057'
138-
}
139-
}
134+
main: '#f50057',
135+
},
136+
},
140137
};
141138

142139
@NgModule({
143140
declarations: [AppComponent],
144-
imports: [BrowserModule, AngularJssModule.forRoot(jssOptions, theme)],
141+
imports: [BrowserModule, StyledModule.forRoot(options, theme)],
145142
providers: [],
146143
bootstrap: [AppComponent],
147144
})
@@ -150,4 +147,4 @@ export class AppModule {}
150147

151148
## License
152149

153-
[MIT](https://github.com/design4pro/angular-jss/blob/master/LICENSE.md) © DESIGN4 ᴾ ᴿ ᴼ
150+
[MIT](https://github.com/design4pro/ng-styled/blob/master/LICENSE.md) © DESIGN4 ᴾ ᴿ ᴼ

angular.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
{
22
"version": 2,
33
"projects": {
4-
"webpage": "apps/webpage",
5-
"webpage-e2e": "apps/webpage-e2e",
6-
"angular-jss": "libs/angular-jss"
4+
"ng-docs": "libs/ng-docs",
5+
"ng-polymorphic": "libs/ng-polymorphic",
6+
"ng-styled": "libs/ng-styled",
7+
"ng-styled-webpage": "apps/ng-styled-webpage",
8+
"ng-styled-webpage-e2e": "apps/ng-styled-webpage-e2e"
79
}
810
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"supportFile": "./src/support/index.ts",
77
"pluginsFile": false,
88
"video": true,
9-
"videosFolder": "../../dist/cypress/apps/webpage-e2e/videos",
10-
"screenshotsFolder": "../../dist/cypress/apps/webpage-e2e/screenshots",
9+
"videosFolder": "../../dist/cypress/apps/ng-styled-webpage-e2e/videos",
10+
"screenshotsFolder": "../../dist/cypress/apps/ng-styled-webpage-e2e/screenshots",
1111
"chromeWebSecurity": false
1212
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"root": "apps/ng-styled-webpage-e2e",
3+
"sourceRoot": "apps/ng-styled-webpage-e2e/src",
4+
"projectType": "application",
5+
"targets": {
6+
"e2e": {
7+
"executor": "@nrwl/cypress:cypress",
8+
"options": {
9+
"cypressConfig": "apps/ng-styled-webpage-e2e/cypress.json",
10+
"devServerTarget": "ng-styled-webpage:serve:development"
11+
},
12+
"configurations": {
13+
"production": {
14+
"devServerTarget": "ng-styled-webpage:serve:production"
15+
}
16+
}
17+
},
18+
"lint": {
19+
"executor": "@nrwl/linter:eslint",
20+
"outputs": ["{options.outputFile}"],
21+
"options": {
22+
"lintFilePatterns": ["apps/ng-styled-webpage-e2e/**/*.{js,ts}"]
23+
}
24+
}
25+
},
26+
"tags": [],
27+
"implicitDependencies": ["ng-styled-webpage"]
28+
}

0 commit comments

Comments
 (0)