Skip to content

Commit 4d6a818

Browse files
docs(copy-task): Add docs to copy task options (#1464)
* docs(copy-task): Add docs to copy task options * remove ignore in older docs
1 parent 97539c7 commit 4d6a818

File tree

21 files changed

+1163
-0
lines changed

21 files changed

+1163
-0
lines changed

docs/output-targets/copy-tasks.md

+63
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,69 @@ The `copy` attribute on these output targets expects an array of objects corresp
2121
https://github.com/ionic-team/stencil/blob/6ed2d4e285544945949ad8e4802fe7f70e392636/src/declarations/stencil-public-compiler.ts#L1594-L1665
2222
```
2323

24+
## Options
25+
26+
A copy task can take the following options:
27+
28+
#### `src`
29+
30+
The source file path for a copy operation. This may be an absolute or relative path to a directory or a file, and may also include a glob pattern.
31+
32+
If the path is a relative path it will be treated as relative to `Config.srcDir`.
33+
34+
__Type:__ `string`
35+
36+
#### `dest`
37+
38+
An optional destination file path for a copy operation. This may be an absolute or relative path.
39+
40+
If relative, this will be treated as relative to the output directory for the output target for which this copy operation is configured.
41+
42+
__Type:__ `string`
43+
44+
#### `ignore`
45+
46+
An optional array of glob patterns to exclude from the copy operation.
47+
48+
__Type:__ `string[]`
49+
50+
__Default:__ `['**\/__mocks__/**', '**\/__fixtures__/**', '**\/dist/**', '**\/.{idea,git,cache,output,temp}/**', '.ds_store', '.gitignore', 'desktop.ini', 'thumbs.db']`
51+
52+
#### `warn`
53+
54+
Whether or not Stencil should issue warnings if it cannot find the specified source files or directories. Defaults to `false`.
55+
56+
To receive warnings if a copy task source can't be found set this to `true`.
57+
58+
__Type:__ `boolean`
59+
60+
#### `keepDirStructure`
61+
62+
Whether or not directory structure should be preserved when copying files from a source directory. Defaults to `true` if no `dest` path is supplied, else it defaults to `false`.
63+
64+
If this is set to `false`, all the files from a source directory will be copied directly to the destination directory, but if it's set to `true` they will be copied to a new directory inside the destination directory with the same name as their original source directory.
65+
66+
So if, for instance, `src` is set to `"images"` and `keepDirStructure` is set to `true` the copy task will then produce the following directory structure:
67+
68+
```
69+
images
70+
└── foo.png
71+
dist
72+
└── images
73+
└── foo.png
74+
```
75+
76+
Conversely if `keepDirStructure` is set to `false` then files in `images/` will be copied to `dist` without first creating a new subdirectory, resulting in the following directory structure:
77+
78+
```
79+
images
80+
└── foo.png
81+
dist
82+
└── foo.png
83+
```
84+
85+
If a `dest` path is supplied then `keepDirStructure` will default to `false`, so that Stencil will write the copied files directly into the `dest` directory without creating a new subdirectory. This behavior can be overridden by setting `keepDirStructure` to `true`.
86+
2487
## Examples
2588

2689
### Images in the `www` Output Target

versioned_docs/version-v4.0/output-targets/copy-tasks.md

+55
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,61 @@ The `copy` attribute on these output targets expects an array of objects corresp
2121
https://github.com/ionic-team/stencil/blob/6ed2d4e285544945949ad8e4802fe7f70e392636/src/declarations/stencil-public-compiler.ts#L1594-L1665
2222
```
2323

24+
## Options
25+
26+
A copy task can take the following options:
27+
28+
#### `src`
29+
30+
The source file path for a copy operation. This may be an absolute or relative path to a directory or a file, and may also include a glob pattern.
31+
32+
If the path is a relative path it will be treated as relative to `Config.srcDir`.
33+
34+
__Type:__ `string`
35+
36+
#### `dest`
37+
38+
An optional destination file path for a copy operation. This may be an absolute or relative path.
39+
40+
If relative, this will be treated as relative to the output directory for the output target for which this copy operation is configured.
41+
42+
__Type:__ `string`
43+
44+
#### `warn`
45+
46+
Whether or not Stencil should issue warnings if it cannot find the specified source files or directories. Defaults to `false`.
47+
48+
To receive warnings if a copy task source can't be found set this to `true`.
49+
50+
__Type:__ `boolean`
51+
52+
#### `keepDirStructure`
53+
54+
Whether or not directory structure should be preserved when copying files from a source directory. Defaults to `true` if no `dest` path is supplied, else it defaults to `false`.
55+
56+
If this is set to `false`, all the files from a source directory will be copied directly to the destination directory, but if it's set to `true` they will be copied to a new directory inside the destination directory with the same name as their original source directory.
57+
58+
So if, for instance, `src` is set to `"images"` and `keepDirStructure` is set to `true` the copy task will then produce the following directory structure:
59+
60+
```
61+
images
62+
└── foo.png
63+
dist
64+
└── images
65+
└── foo.png
66+
```
67+
68+
Conversely if `keepDirStructure` is set to `false` then files in `images/` will be copied to `dist` without first creating a new subdirectory, resulting in the following directory structure:
69+
70+
```
71+
images
72+
└── foo.png
73+
dist
74+
└── foo.png
75+
```
76+
77+
If a `dest` path is supplied then `keepDirStructure` will default to `false`, so that Stencil will write the copied files directly into the `dest` directory without creating a new subdirectory. This behavior can be overridden by setting `keepDirStructure` to `true`.
78+
2479
## Examples
2580

2681
### Images in the `www` Output Target

versioned_docs/version-v4.1/output-targets/copy-tasks.md

+55
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,61 @@ The `copy` attribute on these output targets expects an array of objects corresp
2121
https://github.com/ionic-team/stencil/blob/6ed2d4e285544945949ad8e4802fe7f70e392636/src/declarations/stencil-public-compiler.ts#L1594-L1665
2222
```
2323

24+
## Options
25+
26+
A copy task can take the following options:
27+
28+
#### `src`
29+
30+
The source file path for a copy operation. This may be an absolute or relative path to a directory or a file, and may also include a glob pattern.
31+
32+
If the path is a relative path it will be treated as relative to `Config.srcDir`.
33+
34+
__Type:__ `string`
35+
36+
#### `dest`
37+
38+
An optional destination file path for a copy operation. This may be an absolute or relative path.
39+
40+
If relative, this will be treated as relative to the output directory for the output target for which this copy operation is configured.
41+
42+
__Type:__ `string`
43+
44+
#### `warn`
45+
46+
Whether or not Stencil should issue warnings if it cannot find the specified source files or directories. Defaults to `false`.
47+
48+
To receive warnings if a copy task source can't be found set this to `true`.
49+
50+
__Type:__ `boolean`
51+
52+
#### `keepDirStructure`
53+
54+
Whether or not directory structure should be preserved when copying files from a source directory. Defaults to `true` if no `dest` path is supplied, else it defaults to `false`.
55+
56+
If this is set to `false`, all the files from a source directory will be copied directly to the destination directory, but if it's set to `true` they will be copied to a new directory inside the destination directory with the same name as their original source directory.
57+
58+
So if, for instance, `src` is set to `"images"` and `keepDirStructure` is set to `true` the copy task will then produce the following directory structure:
59+
60+
```
61+
images
62+
└── foo.png
63+
dist
64+
└── images
65+
└── foo.png
66+
```
67+
68+
Conversely if `keepDirStructure` is set to `false` then files in `images/` will be copied to `dist` without first creating a new subdirectory, resulting in the following directory structure:
69+
70+
```
71+
images
72+
└── foo.png
73+
dist
74+
└── foo.png
75+
```
76+
77+
If a `dest` path is supplied then `keepDirStructure` will default to `false`, so that Stencil will write the copied files directly into the `dest` directory without creating a new subdirectory. This behavior can be overridden by setting `keepDirStructure` to `true`.
78+
2479
## Examples
2580

2681
### Images in the `www` Output Target

versioned_docs/version-v4.10/output-targets/copy-tasks.md

+55
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,61 @@ The `copy` attribute on these output targets expects an array of objects corresp
2121
https://github.com/ionic-team/stencil/blob/6ed2d4e285544945949ad8e4802fe7f70e392636/src/declarations/stencil-public-compiler.ts#L1594-L1665
2222
```
2323

24+
## Options
25+
26+
A copy task can take the following options:
27+
28+
#### `src`
29+
30+
The source file path for a copy operation. This may be an absolute or relative path to a directory or a file, and may also include a glob pattern.
31+
32+
If the path is a relative path it will be treated as relative to `Config.srcDir`.
33+
34+
__Type:__ `string`
35+
36+
#### `dest`
37+
38+
An optional destination file path for a copy operation. This may be an absolute or relative path.
39+
40+
If relative, this will be treated as relative to the output directory for the output target for which this copy operation is configured.
41+
42+
__Type:__ `string`
43+
44+
#### `warn`
45+
46+
Whether or not Stencil should issue warnings if it cannot find the specified source files or directories. Defaults to `false`.
47+
48+
To receive warnings if a copy task source can't be found set this to `true`.
49+
50+
__Type:__ `boolean`
51+
52+
#### `keepDirStructure`
53+
54+
Whether or not directory structure should be preserved when copying files from a source directory. Defaults to `true` if no `dest` path is supplied, else it defaults to `false`.
55+
56+
If this is set to `false`, all the files from a source directory will be copied directly to the destination directory, but if it's set to `true` they will be copied to a new directory inside the destination directory with the same name as their original source directory.
57+
58+
So if, for instance, `src` is set to `"images"` and `keepDirStructure` is set to `true` the copy task will then produce the following directory structure:
59+
60+
```
61+
images
62+
└── foo.png
63+
dist
64+
└── images
65+
└── foo.png
66+
```
67+
68+
Conversely if `keepDirStructure` is set to `false` then files in `images/` will be copied to `dist` without first creating a new subdirectory, resulting in the following directory structure:
69+
70+
```
71+
images
72+
└── foo.png
73+
dist
74+
└── foo.png
75+
```
76+
77+
If a `dest` path is supplied then `keepDirStructure` will default to `false`, so that Stencil will write the copied files directly into the `dest` directory without creating a new subdirectory. This behavior can be overridden by setting `keepDirStructure` to `true`.
78+
2479
## Examples
2580

2681
### Images in the `www` Output Target

versioned_docs/version-v4.11/output-targets/copy-tasks.md

+55
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,61 @@ The `copy` attribute on these output targets expects an array of objects corresp
2121
https://github.com/ionic-team/stencil/blob/6ed2d4e285544945949ad8e4802fe7f70e392636/src/declarations/stencil-public-compiler.ts#L1594-L1665
2222
```
2323

24+
## Options
25+
26+
A copy task can take the following options:
27+
28+
#### `src`
29+
30+
The source file path for a copy operation. This may be an absolute or relative path to a directory or a file, and may also include a glob pattern.
31+
32+
If the path is a relative path it will be treated as relative to `Config.srcDir`.
33+
34+
__Type:__ `string`
35+
36+
#### `dest`
37+
38+
An optional destination file path for a copy operation. This may be an absolute or relative path.
39+
40+
If relative, this will be treated as relative to the output directory for the output target for which this copy operation is configured.
41+
42+
__Type:__ `string`
43+
44+
#### `warn`
45+
46+
Whether or not Stencil should issue warnings if it cannot find the specified source files or directories. Defaults to `false`.
47+
48+
To receive warnings if a copy task source can't be found set this to `true`.
49+
50+
__Type:__ `boolean`
51+
52+
#### `keepDirStructure`
53+
54+
Whether or not directory structure should be preserved when copying files from a source directory. Defaults to `true` if no `dest` path is supplied, else it defaults to `false`.
55+
56+
If this is set to `false`, all the files from a source directory will be copied directly to the destination directory, but if it's set to `true` they will be copied to a new directory inside the destination directory with the same name as their original source directory.
57+
58+
So if, for instance, `src` is set to `"images"` and `keepDirStructure` is set to `true` the copy task will then produce the following directory structure:
59+
60+
```
61+
images
62+
└── foo.png
63+
dist
64+
└── images
65+
└── foo.png
66+
```
67+
68+
Conversely if `keepDirStructure` is set to `false` then files in `images/` will be copied to `dist` without first creating a new subdirectory, resulting in the following directory structure:
69+
70+
```
71+
images
72+
└── foo.png
73+
dist
74+
└── foo.png
75+
```
76+
77+
If a `dest` path is supplied then `keepDirStructure` will default to `false`, so that Stencil will write the copied files directly into the `dest` directory without creating a new subdirectory. This behavior can be overridden by setting `keepDirStructure` to `true`.
78+
2479
## Examples
2580

2681
### Images in the `www` Output Target

versioned_docs/version-v4.12/output-targets/copy-tasks.md

+55
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,61 @@ The `copy` attribute on these output targets expects an array of objects corresp
2121
https://github.com/ionic-team/stencil/blob/6ed2d4e285544945949ad8e4802fe7f70e392636/src/declarations/stencil-public-compiler.ts#L1594-L1665
2222
```
2323

24+
## Options
25+
26+
A copy task can take the following options:
27+
28+
#### `src`
29+
30+
The source file path for a copy operation. This may be an absolute or relative path to a directory or a file, and may also include a glob pattern.
31+
32+
If the path is a relative path it will be treated as relative to `Config.srcDir`.
33+
34+
__Type:__ `string`
35+
36+
#### `dest`
37+
38+
An optional destination file path for a copy operation. This may be an absolute or relative path.
39+
40+
If relative, this will be treated as relative to the output directory for the output target for which this copy operation is configured.
41+
42+
__Type:__ `string`
43+
44+
#### `warn`
45+
46+
Whether or not Stencil should issue warnings if it cannot find the specified source files or directories. Defaults to `false`.
47+
48+
To receive warnings if a copy task source can't be found set this to `true`.
49+
50+
__Type:__ `boolean`
51+
52+
#### `keepDirStructure`
53+
54+
Whether or not directory structure should be preserved when copying files from a source directory. Defaults to `true` if no `dest` path is supplied, else it defaults to `false`.
55+
56+
If this is set to `false`, all the files from a source directory will be copied directly to the destination directory, but if it's set to `true` they will be copied to a new directory inside the destination directory with the same name as their original source directory.
57+
58+
So if, for instance, `src` is set to `"images"` and `keepDirStructure` is set to `true` the copy task will then produce the following directory structure:
59+
60+
```
61+
images
62+
└── foo.png
63+
dist
64+
└── images
65+
└── foo.png
66+
```
67+
68+
Conversely if `keepDirStructure` is set to `false` then files in `images/` will be copied to `dist` without first creating a new subdirectory, resulting in the following directory structure:
69+
70+
```
71+
images
72+
└── foo.png
73+
dist
74+
└── foo.png
75+
```
76+
77+
If a `dest` path is supplied then `keepDirStructure` will default to `false`, so that Stencil will write the copied files directly into the `dest` directory without creating a new subdirectory. This behavior can be overridden by setting `keepDirStructure` to `true`.
78+
2479
## Examples
2580

2681
### Images in the `www` Output Target

0 commit comments

Comments
 (0)