-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.swrc.js
127 lines (116 loc) · 3.65 KB
/
.swrc.js
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
module.exports = {
workspaces: {
src: 'src',
dist: 'dist'
},
start: {
compile: {
js: {
babel: true,
uglify: true,
exclude: {
requireBrowser: [
// You can use a file extension or an absolute path
'.min.js',
'.mjs'
]
}
},
css: {
autoprefixer: true,
uglifycss: true
},
html: {
minify: true,
htmlImportLikeSass: true, // If true, ignores the compilation when a HTML file name starts with _
exclude: {
htmlImport: [] // You can use an absolute path
}
},
htaccess: {
minify: true
},
php: {
minify: true
},
exclude: [ // You can use a file extension or an absolute path to exclude any file from compiling
'.min.css',
'.min.js'
]
},
localhost: {
enabled: true,
port: 3030
}
},
options: {
autoUpdate: true // Updates only for patch and minor versions
},
/* ----------------------------------------------------------------------- */
/* ----------------- A D V A N C E D O P T I O N S ----------------- */
/* ----------------------------------------------------------------------- */
ftp: { // Keeps empty to ignore the FTP connection
start: { // Becareful! Set access FTP data on an external .env or add the “.swrc.js” to .gitignore
root: '',
host: '',
port: 21,
user: '',
pass: '',
secure: true, // If the server doesn't use SSL certification, set "explict"
chmod: { // You can remove it to keep the server CHMOD default
dir: 755,
file: 644,
recursive: true
},
isWindowsServer: false
},
build: { } // Keeps empty to use the same data as set in "ftp.start"
},
/**
* You can duplicate "start.compile" in "build" and set different "start" and "build" settings
* If you don't specify the "build.compile", it will use the settings from "start.compile"
**/
build: {
level: 0, // Compression level of zip output (0: fast, ..., 9: slow)
output: 'release', // Generate a zip and creates the root content from this name (example: "release.zip", on extract: "./release/...")
deployZipToServer: false
},
plugins: {
/**
* Put simple-web-cli language plug-ins modules and path to an auto executable script to compile in other languages
* Works on both "build" and "start"
**/
compiler: [],
// You can create an easy to read code and on compiling, replace the specified strings:
stringReplace: {
strings: {
'*your-code-string*': { // always starts and ends this string with *
start: 'my-start-output',
build: 'my-build-output'
}
},
languages: {
html: true,
php: true,
phtml: true,
scss: true,
css: true,
htaccess: true,
js: true,
sql: false,
others: false
}
},
/**
* You can create a mirror project folder and add static resource files to replace temporary development files by this on compiling:
* It can works joint with "replace-string" and accepts any type of file
**/
resourceReplace: {
src: '.resources',
replace: {
start: false,
build: true
}
}
}
};