Skip to content

Commit 588be15

Browse files
committed
refactor(docs): corrected the packages name
1 parent 3c0fd9d commit 588be15

File tree

8 files changed

+20
-22
lines changed

8 files changed

+20
-22
lines changed

docs/API.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ console.log("Needs polyfill:", result.hasRuntimeRules);
166166
The package includes a command-line tool for build-time transformation:
167167

168168
```bash
169-
npx css-if-transform input.css output.css [options]
169+
npx css-if-polyfill input.css output.css [options]
170170
```
171171

172172
### CLI Options
@@ -179,13 +179,13 @@ npx css-if-transform input.css output.css [options]
179179

180180
```bash
181181
# Basic transformation
182-
npx css-if-transform styles.css optimized.css
182+
npx css-if-polyfill styles.css optimized.css
183183

184184
# With minification and statistics
185-
npx css-if-transform styles.css optimized.css --minify --stats
185+
npx css-if-polyfill styles.css optimized.css --minify --stats
186186

187187
# Output to stdout with stats
188-
npx css-if-transform styles.css --stats
188+
npx css-if-polyfill styles.css --stats
189189
```
190190

191191
## CSS Syntax

docs/refactoring/FINAL_INTEGRATION_REPORT.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The CSS if() polyfill has been successfully modernized and integrated with a hyb
4545

4646
### 3. Developer Experience
4747

48-
- **CLI Tool**: `npx css-if-transform` for build-time processing
48+
- **CLI Tool**: `npx css-if-polyfill` for build-time processing
4949
- **Build Integration Ready**: PostCSS/Webpack plugin foundation
5050
- **Comprehensive Statistics**: Detailed transformation reporting
5151
- **Progressive Enhancement**: Gradual adoption path
@@ -112,7 +112,7 @@ The CSS if() polyfill has been successfully modernized and integrated with a hyb
112112
### 1. Build-time Only (Optimal Performance)
113113

114114
```bash
115-
npx css-if-transform styles.css optimized.css --minify --stats
115+
npx css-if-polyfill styles.css optimized.css --minify --stats
116116
```
117117

118118
- **Use Case**: Static conditions only (`media()`, `supports()`)
@@ -195,7 +195,6 @@ CSSIfPolyfill.init();
195195

196196
### Immediate Opportunities
197197

198-
- **PostCSS Plugin**: Official plugin for seamless build integration
199198
- **Webpack Loader**: Dedicated loader for automatic transformation
200199
- **Vite Plugin**: Integration with modern build tools
201200
- **Source Maps**: Debug support for transformed CSS

docs/refactoring/INTEGRATION_GUIDE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ graph TD
8181

8282
```bash
8383
# Transform CSS file
84-
npx css-if-transform input.css output.css
84+
npx css-if-polyfill input.css output.css
8585

8686
# With minification and stats
87-
npx css-if-transform input.css output.css --minify --stats
87+
npx css-if-polyfill input.css output.css --minify --stats
8888

8989
# Output to stdout
90-
npx css-if-transform input.css --stats
90+
npx css-if-polyfill input.css --stats
9191
```
9292

9393
#### Programmatic Usage
@@ -229,7 +229,8 @@ module.exports = {
229229
plugins: [
230230
function cssIfTransform() {
231231
return {
232-
postcssPlugin: "css-if-transform",
232+
postcssPlugin:
233+
"postcss-if-function",
233234
Once(root) {
234235
const result =
235236
buildTimeTransform(
@@ -260,7 +261,7 @@ import { buildTimeTransform } from "css-if-polyfill";
260261
export default {
261262
plugins: [
262263
{
263-
name: "css-if-transform",
264+
name: "css-if-polyfill",
264265
transform(code, id) {
265266
if (id.endsWith(".css")) {
266267
const result = buildTimeTransform(code);
@@ -295,7 +296,6 @@ export default {
295296

296297
### Planned Enhancements
297298

298-
- **PostCSS Plugin**: Official plugin for build tools
299299
- **Webpack Loader**: Dedicated webpack loader
300300
- **Source Maps**: Support for CSS source maps
301301
- **CSS Nesting**: Integration with CSS nesting proposals

docs/refactoring/INTEGRATION_SUMMARY.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
### 1. Build-time Only (Optimal Performance)
115115

116116
```bash
117-
npx css-if-transform input.css output.css --minify
117+
npx css-if-polyfill input.css output.css --minify
118118
```
119119

120120
### 2. Hybrid Mode (Best Flexibility)
@@ -147,7 +147,6 @@ init();
147147

148148
### Immediate Enhancements
149149

150-
- PostCSS plugin for seamless build tool integration
151150
- Webpack loader for automatic transformation
152151
- Source map support for debugging
153152

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/css-if-polyfill/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ npm install css-if-polyfill
5353

5454
```bash
5555
# Transform CSS during build
56-
npx css-if-transform input.css output.css --minify --stats
56+
npx css-if-polyfill input.css output.css --minify --stats
5757
```
5858

5959
### Runtime Processing

packages/css-if-polyfill/bin/cli.js

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const help = `
1414
CSS if() Build-time Transformation CLI
1515
1616
Usage:
17-
npx css-if-transform <input.css> [output.css] [options]
17+
npx css-if-polyfill <input.css> [output.css] [options]
1818
node bin/cli.js <input.css> [output.css] [options]
1919
2020
Options:
@@ -23,9 +23,9 @@ Options:
2323
--help Show this help message
2424
2525
Examples:
26-
npx css-if-transform input.css output.css
27-
npx css-if-transform input.css output.css --minify --stats
28-
npx css-if-transform input.css --stats (outputs to stdout)
26+
npx css-if-polyfill input.css output.css
27+
npx css-if-polyfill input.css output.css --minify --stats
28+
npx css-if-polyfill input.css --stats (outputs to stdout)
2929
`;
3030

3131
const parseArguments = () => {

packages/css-if-polyfill/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"license": "MIT",
1515
"bin": {
16-
"css-if-transform": "bin/cli.js"
16+
"css-if-polyfill": "bin/cli.js"
1717
},
1818
"main": "dist/index.cjs",
1919
"types": "dist/index.d.ts",

0 commit comments

Comments
 (0)