-
Notifications
You must be signed in to change notification settings - Fork 7
/
copy-files-from-to.cjson
92 lines (85 loc) · 3.19 KB
/
copy-files-from-to.cjson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
// This is a CJSON file (JSON with comments)
{
"copyFiles": [
// In "development" mode, copy from the full version of the library, in all other modes, use the minified version
{
"from": {
"default": "https://raw.githubusercontent.com/jashkenas/underscore/1.9.1/underscore-min.js",
"development": "https://raw.githubusercontent.com/jashkenas/underscore/1.9.1/underscore.js"
},
"to": "scripts/underscore.js"
},
// Copy this file only in "pre-production" mode
{
"from": "https://raw.githubusercontent.com/jashkenas/underscore/1.9.1/underscore-min.js.map",
"to": {
"default": {
"skip": true
},
"pre-production": "scripts/underscore.js.map"
}
},
// Copy this file in "pre-production" and "production" mode only
{
"from": {
"default": {
"skip": true
},
"pre-production": "node_modules/native-promise-only/npo.js",
"production": "node_modules/native-promise-only/npo.js"
},
"to": "scripts/native-promise-only.js"
},
// Copy this file in all modes except "production" mode
{
"from": "https://raw.githubusercontent.com/webextensions/console-panel/v1.0.3/src/console-panel.js",
"to": {
"default": "scripts/console-panel/console-panel.js",
"production": {
"skip": true
}
}
},
// Copy the files matching the "glob" pattern
{
"from": "assets/**/*.jpg",
"to": "public/images/"
},
// Copy the files matching the "glob" pattern
{
"from": "assets/**/*",
"to": "public/images/"
},
// Copy the files matching the "glob" pattern (paste them directly into the "to" directory)
{
"from": "assets/**/*.*",
"to": "public/copy-to-flat-directory/",
"toFlat": true
},
// Copy the files matching the "glob" pattern
// Don't copy files from the assets/tmp folder
// Don't copy files starting with a . (i.e. the MacOS .DS_Store files)
// Note that this "dot" option overrides the global "ignoreDotFilesAndFolders" settings if set.
{
"from": ["assets/**/*", "!assets/tmp/**/*", { "dot": false }],
"to": "public/images/"
}
],
"copyFilesSettings": {
"whenFileExists": "notify-about-available-change",
"addReferenceToSourceOfOrigin": false,
"ignoreDotFilesAndFolders": true,
"removeSourceMappingURL": false,
"minifyJs": true, // via https://www.npmjs.com/package/terser
"minifyJsTerserOptions": { // Reference: https://terser.org/docs/options/
// Default options if "minifyJsTerserOptions" is not set
"compress": {
"sequences": false
},
"mangle": false,
"format": {
"semicolons": false
}
}
}
}