Skip to content

Commit e5e9d9c

Browse files
committed
chore: update README and package.json for release
1 parent eee9ded commit e5e9d9c

File tree

4 files changed

+112
-5
lines changed

4 files changed

+112
-5
lines changed

README.md

Lines changed: 90 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,90 @@
1-
# postcss-angular-inline
2-
PostCSS syntax for parsing inline CSS of Angular components
1+
# PostCSS Angular Inline
2+
3+
## Overview
4+
5+
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+
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+
```
28+
29+
## Usage with Stylelint
30+
31+
To use Stylelint with this syntax plugin and confine linting to only .component.ts files, follow these steps:
32+
33+
1. Install Stylelint and Necessary Plugins
34+
35+
```bash
36+
npm install --save-dev stylelint stylelint-config-standard postcss-angular-inline
37+
```
38+
39+
2. Create a .stylelintrc.json Configuration File
40+
41+
```json
42+
// .stylelintrc.json
43+
{
44+
"extends": ["stylelint-config-standard"],
45+
"overrides": [
46+
{
47+
"files": ["**/*.component.ts"],
48+
"customSyntax": "postcss-angular-inline",
49+
"rules": {
50+
// Your Stylelint rules
51+
},
52+
},
53+
],
54+
};
55+
```
56+
57+
3. Run Stylelint on .component.ts Files
58+
59+
```bash
60+
npx stylelint "**/*.component.ts"
61+
```
62+
63+
## Roadmap to Version 1.0.0
64+
65+
The following features and improvements are planned before the official 1.0.0 release:
66+
67+
1. Better Typing (Target Version: 0.2.0)
68+
69+
- Improve TypeScript definitions for enhanced developer experience and code safety.
70+
71+
2. Testing (Target Version: 0.3.0)
72+
73+
- Enhance the test suite to ensure reliability and prevent regressions.
74+
75+
3. Support for Preprocessors (Target Version: 0.4.0)
76+
77+
- Add support for SCSS and LESS inline styles in Angular components.
78+
79+
4. Handling Empty Strings (Target Version: 0.5.0)
80+
81+
- Fix issues where empty inline styles are not correctly recognized or processed.
82+
83+
5. Preserving Escaped Newlines (Target Version: 0.6.0)
84+
- Ensure escaped newlines `\n` in strings are preserved and correctly represented in the output.
85+
86+
## Current Limitations
87+
88+
- Escaped newlines (\n) are not preserved, affecting tools like Stylelint.
89+
- Empty sources may not be handled correctly by Stylelint.
90+
- Does not support SCSS or LESS in inline styles.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,25 @@
11
{
22
"name": "postcss-angular-inline",
3-
"version": "1.0.0",
3+
"version": "0.1.0",
44
"description": "PostCSS syntax for parsing inline CSS of Angular components",
5+
"keywords": [
6+
"postcss",
7+
"angular",
8+
"inline-styles",
9+
"css",
10+
"syntax",
11+
"stylelint"
12+
],
13+
"repository": {
14+
"type": "git",
15+
"url": "git+https://github.com/blyedev/postcss-angular-inline.git"
16+
},
517
"main": "src/index.js",
18+
"files": [
19+
"src/",
20+
"README.md",
21+
"LICENSE"
22+
],
623
"author": "blyedev",
724
"license": "ISC",
825
"type": "module",

test/utils.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const dirPath = join(__dirname, "fixtures");
1515

1616
/**
1717
* Retrieves a test case
18+
*
1819
* @param {string} filename Path of fixture
1920
* @returns {Fixture} Retrieved fixture
2021
*/
@@ -26,6 +27,7 @@ export function getFixtureCode(filename) {
2627

2728
/**
2829
* Get all availible fixture paths
30+
*
2931
* @returns {string[]} All available fixture filenames
3032
*/
3133
export function getAllFixtureFilenames() {

0 commit comments

Comments
 (0)