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
Copy file name to clipboardExpand all lines: README.md
+25-31Lines changed: 25 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,30 +1,8 @@
1
1
# PostCSS Angular Inline
2
2
3
-
## Overview
4
-
5
3
A [PostCSS](https://github.com/postcss/postcss) syntax plugin to process inline CSS styles in Angular components, enabling the use of PostCSS transformations and Stylelint.
6
4
7
-
**Current Version:**`0.1.0`
8
-
9
-
## Usage with PostCSS
10
-
11
-
1. Install via npm:
12
-
13
-
```bash
14
-
npm install --save-dev postcss-angular-inline
15
-
```
16
-
17
-
2. Configure PostCSS:
18
-
19
-
```javascript
20
-
// postcss.config.js
21
-
module.exports= {
22
-
syntax:"postcss-angular-inline",
23
-
plugins: [
24
-
// Your PostCSS plugins
25
-
],
26
-
};
27
-
```
5
+
> **Note:** Generally, you don't need a syntax plugin for Angular unless you're using inline styles. It's common practice to generate styles outside of the component, but if you choose to use inline styles, this plugin enables PostCSS transformations and Stylelint integration.
28
6
29
7
## Usage with Stylelint
30
8
@@ -39,19 +17,15 @@ To use Stylelint with this syntax plugin and confine linting to only .component.
39
17
2. Create a .stylelintrc.json Configuration File
40
18
41
19
```json
42
-
// .stylelintrc.json
43
20
{
44
21
"extends": ["stylelint-config-standard"],
45
22
"overrides": [
46
23
{
47
24
"files": ["**/*.component.ts"],
48
-
"customSyntax": "postcss-angular-inline",
49
-
"rules": {
50
-
// Your Stylelint rules
51
-
},
52
-
},
53
-
],
54
-
};
25
+
"customSyntax": "postcss-angular-inline"
26
+
}
27
+
]
28
+
}
55
29
```
56
30
57
31
3. Run Stylelint on .component.ts Files
@@ -60,6 +34,26 @@ To use Stylelint with this syntax plugin and confine linting to only .component.
60
34
npx stylelint "**/*.component.ts"
61
35
```
62
36
37
+
## Usage with PostCSS
38
+
39
+
1. Install via npm:
40
+
41
+
```bash
42
+
npm install --save-dev postcss-angular-inline
43
+
```
44
+
45
+
2. Configure PostCSS:
46
+
47
+
```javascript
48
+
// postcss.config.js
49
+
module.exports= {
50
+
syntax:"postcss-angular-inline",
51
+
plugins: [
52
+
// Your PostCSS plugins
53
+
],
54
+
};
55
+
```
56
+
63
57
## Roadmap to Version 1.0.0
64
58
65
59
The following features and improvements are planned before the official 1.0.0 release:
0 commit comments