infographic-cli 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -8,8 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
  ## [0.1.0] - 2025-01-20
9
9
 
10
10
  ### Added
11
- - Initial release of `@antv/infographic-cli`
12
- - Simple command `ifgc` to render infographics from .info files to SVG
11
+ - Initial release of `infographic-cli`
12
+ - Simple command `ifgc` to render infographics from .ifgc files to SVG
13
13
  - Support for 236+ built-in infographic templates
14
14
  - `template` command to list all available templates
15
15
  - Theme support (`--theme` option)
@@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
  - Comprehensive test suite (26 tests)
20
20
 
21
21
  ### Features
22
- - Render from file: `ifgc -i input.info -o output.svg`
22
+ - Render from file: `ifgc -i input.ifgc -o output.svg`
23
23
  - Render from stdin: `echo "..." | ifgc -o output.svg`
24
24
  - List templates: `ifgc template`
25
25
  - Automatic output file naming (defaults to input.svg)
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # @antv/infographic-cli
1
+ # infographic-cli
2
2
 
3
- [![npm version](https://badge.fury.io/js/%40antv%2Finfographic-cli.svg)](https://www.npmjs.com/package/@antv/infographic-cli)
3
+ [![npm version](https://badge.fury.io/js/infographic-cli.svg)](https://www.npmjs.com/package/infographic-cli)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
- [![Node.js Version](https://img.shields.io/node/v/%40antv%2Finfographic-cli.svg)](https://www.npmjs.com/package/@antv/infographic-cli)
5
+ [![Node.js Version](https://img.shields.io/node/v/infographic-cli.svg)](https://www.npmjs.com/package/infographic-cli)
6
6
 
7
7
  Command-line interface for [AntV Infographic](https://github.com/antvis/Infographic) - render declarative infographic syntax to SVG images.
8
8
 
@@ -10,7 +10,7 @@ Command-line interface for [AntV Infographic](https://github.com/antvis/Infograp
10
10
 
11
11
  ```bash
12
12
  # Install
13
- npm install -g @antv/infographic-cli
13
+ npm install -g infographic-cli
14
14
 
15
15
  # Render from stdin
16
16
  echo 'infographic list-row-simple-horizontal-arrow
@@ -21,7 +21,7 @@ data
21
21
  - label Step 2' | ifgc -o output.svg
22
22
 
23
23
  # Render from file
24
- ifgc -i input.info -o output.svg
24
+ ifgc -i input.ifgc -o output.svg
25
25
 
26
26
  # List available templates
27
27
  ifgc template
@@ -30,7 +30,7 @@ ifgc template
30
30
  ## Installation
31
31
 
32
32
  ```bash
33
- npm install -g @antv/infographic-cli
33
+ npm install -g infographic-cli
34
34
  ```
35
35
 
36
36
  This installs two commands: `ifgc` (short) and `infographic` (long).
@@ -41,23 +41,23 @@ This installs two commands: `ifgc` (short) and `infographic` (long).
41
41
 
42
42
  ```bash
43
43
  # From file (output defaults to input.svg)
44
- ifgc -i input.info
44
+ ifgc -i input.ifgc
45
45
 
46
46
  # Specify output file
47
- ifgc -i input.info -o output.svg
47
+ ifgc -i input.ifgc -o output.svg
48
48
 
49
49
  # From stdin
50
50
  echo '...' | ifgc -o output.svg
51
51
 
52
52
  # From stdin with file input
53
- cat input.info | ifgc -o output.svg
53
+ cat input.ifgc | ifgc -o output.svg
54
54
  ```
55
55
 
56
56
  ### Options
57
57
 
58
58
  | Option | Description |
59
59
  |--------|-------------|
60
- | `-i, --input <file>` | Input .info file (omit to read from stdin) |
60
+ | `-i, --input <file>` | Input .ifgc file (omit to read from stdin) |
61
61
  | `-o, --output <file>` | Output file (default: input.svg) |
62
62
  | `--background <color>` | Background color (default: transparent) |
63
63
  | `-c, --config <file>` | JSON configuration file |
@@ -77,7 +77,7 @@ Visit [AntV Infographic](https://github.com/antvis/Infographic) to see template
77
77
  ### Example 1: Simple Step List
78
78
 
79
79
  ```bash
80
- cat > steps.info << EOF
80
+ cat > steps.ifgc << EOF
81
81
  infographic list-row-simple-horizontal-arrow
82
82
  data
83
83
  title Getting Started
@@ -91,13 +91,13 @@ data
91
91
  desc Export and share
92
92
  EOF
93
93
 
94
- ifgc -i steps.info -o steps.svg
94
+ ifgc -i steps.ifgc -o steps.svg
95
95
  ```
96
96
 
97
97
  ### Example 2: Timeline
98
98
 
99
99
  ```bash
100
- cat > timeline.info << EOF
100
+ cat > timeline.ifgc << EOF
101
101
  infographic timeline-horizontal-basic-date
102
102
  data
103
103
  title Project Roadmap
@@ -112,13 +112,13 @@ data
112
112
  desc Launch
113
113
  EOF
114
114
 
115
- ifgc -i timeline.info -o timeline.svg
115
+ ifgc -i timeline.ifgc -o timeline.svg
116
116
  ```
117
117
 
118
118
  ### Example 3: Using Theme
119
119
 
120
120
  ```bash
121
- cat > swot.info << EOF
121
+ cat > swot.ifgc << EOF
122
122
  infographic compare-quadrant-four-areas-card
123
123
  data
124
124
  title SWOT Analysis
@@ -133,7 +133,7 @@ data
133
133
  desc External risks
134
134
  EOF
135
135
 
136
- ifgc -i swot.info -o swot.svg -t dark
136
+ ifgc -i swot.ifgc -o swot.svg -t dark
137
137
  ```
138
138
 
139
139
  ### Example 4: From stdin
package/dist/index.js CHANGED
@@ -13,7 +13,7 @@ program
13
13
  .version(packageJson.default.version);
14
14
  // Main options (render by default, like mmdc)
15
15
  program
16
- .option('-i, --input <file>', 'Input .info file (omit to read from stdin)')
16
+ .option('-i, --input <file>', 'Input .ifgc file (omit to read from stdin)')
17
17
  .option('-o, --output <file>', 'Output file (default: input file with .svg extension)')
18
18
  .option('--background <color>', 'Background color (default: transparent)', 'transparent')
19
19
  .option('-c, --config <file>', 'JSON configuration file')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "infographic-cli",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Command-line interface for AntV Infographic",
5
5
  "license": "MIT",
6
6
  "author": "lyw405",