Skip to content

Commit aee9284

Browse files
Move example to docs
1 parent a9b09a8 commit aee9284

File tree

4 files changed

+237
-0
lines changed

4 files changed

+237
-0
lines changed

docs/package-wizard.tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<toc-element topic="usage.topic" />
1212
<toc-element topic="development.topic" >
1313
<toc-element topic="schema.topic" />
14+
<toc-element topic="example.topic" />
1415
</toc-element>
1516
<toc-element topic="receipts.topic" />
1617
<toc-element topic="license.topic" toc-title="License" />

docs/snippets/.gitkeep

Whitespace-only changes.

docs/snippets/example.json

Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
{
2+
"$schema": "https://package-wizard.com/schemas/schema-v2.json",
3+
"wizard": {
4+
"install": true,
5+
"clean": true
6+
},
7+
"project": {
8+
"url": "https://example.com",
9+
"title": "The best",
10+
"description": "The best of the best"
11+
},
12+
"repository": {
13+
"organization": "package-wizard",
14+
"name": "installer",
15+
"domain": "github.com"
16+
},
17+
"authors": [
18+
{
19+
"name": "Andrey Helldar",
20+
"email": "[email protected]"
21+
}
22+
],
23+
"variables": [
24+
{
25+
"type": "year",
26+
"replace": ["%year%"]
27+
},
28+
{
29+
"type": "year-range",
30+
"replace": ["%year%"],
31+
"start": "2021"
32+
},
33+
{
34+
"type": "date",
35+
"format": "Y-m-d",
36+
"replace": ["%dateYMD%"]
37+
},
38+
{
39+
"type": "date",
40+
"format": "d m Y",
41+
"replace": ["%dateDMY%"]
42+
}
43+
],
44+
"replaces": [
45+
{
46+
"replace": ["%namespace%"],
47+
"with": "PackageWizard"
48+
},
49+
{
50+
"replace": ["%appName%"],
51+
"with": "Installer"
52+
}
53+
],
54+
"renames": [
55+
{
56+
"type": "path",
57+
"source": "baz/file.json",
58+
"target": "baz/some.json"
59+
},
60+
{
61+
"type": "path",
62+
"source": "baz",
63+
"target": "qwerty"
64+
},
65+
{
66+
"type": "filename",
67+
"source": "qwerty.stub",
68+
"target": "qwerty.json"
69+
},
70+
{
71+
"type": "filename",
72+
"source": "foo/some.stub",
73+
"target": "foo/some.json",
74+
"recursive": false
75+
},
76+
{
77+
"type": "filename",
78+
"source": "qwerty",
79+
"target": "foo",
80+
"basename": true
81+
}
82+
],
83+
"removes": [
84+
"bar/some1",
85+
"bar/some2/file.json"
86+
],
87+
"copies": [
88+
{
89+
"source": "foo/file.json",
90+
"target": "resources/data/file.json"
91+
},
92+
{
93+
"source": "foo/folder/",
94+
"target": "public/images/folder"
95+
}
96+
],
97+
"dependencies": [
98+
{
99+
"name": "laravel/sail",
100+
"remove": true
101+
},
102+
{
103+
"name": "laravel/pail",
104+
"remove": true
105+
}
106+
],
107+
"questions": [
108+
{
109+
"type": "license",
110+
"default": "mit",
111+
"replace": ["%license%"]
112+
},
113+
{
114+
"type": "string",
115+
"title": "Any question",
116+
"default": "why not",
117+
"required": false,
118+
"replace": ["%someQuestion%"],
119+
"with": {
120+
"slug": false,
121+
"lowercase": false,
122+
"uppercase": false,
123+
"camelcase": false,
124+
"snake_case": false,
125+
"filename": false,
126+
"urlQuery": false
127+
}
128+
},
129+
{
130+
"type": "regex",
131+
"title": "Enter the task number",
132+
"required": true,
133+
"replace": ["/(Foo-\\d+)/"],
134+
"format": "App-%d"
135+
},
136+
{
137+
"type": "url",
138+
"title": "Enter the URL",
139+
"required": true,
140+
"replace": ["%someUrl%"]
141+
},
142+
{
143+
"id": "foo1",
144+
"type": "choice",
145+
"title": "Select any option",
146+
"options": {
147+
"foo": "Foo option",
148+
"bar": "Bar option"
149+
},
150+
"default": "foo",
151+
"required": false,
152+
"replace": ["%someChoice%"]
153+
},
154+
{
155+
"type": "copy",
156+
"title": "Copy any files or folders?",
157+
"default": false,
158+
"paths": [
159+
{
160+
"source": "bar/file.json",
161+
"target": "resources/data/file.json"
162+
},
163+
{
164+
"source": "bar/folder/",
165+
"target": "public/images/folder"
166+
}
167+
],
168+
"condition": {
169+
"type": "when",
170+
"id": "foo1",
171+
"equals": "foo"
172+
}
173+
},
174+
{
175+
"type": "remove",
176+
"title": "Remove files or folders?",
177+
"default": true,
178+
"paths": [
179+
"bar/some3",
180+
"bar/some4/file.json"
181+
],
182+
"condition": {
183+
"type": "when",
184+
"id": "foo1",
185+
"equals": "bar"
186+
}
187+
},
188+
{
189+
"type": "dependency",
190+
"title": "To establish any dependencies?",
191+
"default": true,
192+
"dependencies": [
193+
{
194+
"name": "dragon-code/laravel-deploy-operations",
195+
"version": "^6.4"
196+
},
197+
{
198+
"name": "dragon-code/laravel-cache"
199+
},
200+
{
201+
"name": "dragon-code/pretty-routes",
202+
"version": "^3.6",
203+
"dev": true
204+
}
205+
],
206+
"condition": {
207+
"type": "unless",
208+
"id": "foo1",
209+
"equals": "foo"
210+
}
211+
},
212+
{
213+
"type": "dependency",
214+
"title": "To remove any dependencies?",
215+
"default": false,
216+
"remove": true,
217+
"dependencies": [
218+
{ "name": "laravel/sail" },
219+
{ "name": "laravel/pail" }
220+
]
221+
}
222+
]
223+
}

docs/topics/example.topic

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE topic
3+
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
4+
<topic
5+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6+
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
7+
title="Example" id="example">
8+
9+
<code-block
10+
lang="json"
11+
src="example.json"
12+
/>
13+
</topic>

0 commit comments

Comments
 (0)