-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile-config.js
48 lines (43 loc) · 1.59 KB
/
gulpfile-config.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
/* Import Node.js modules */
let environments = require('gulp-environments'),
autoprefixer = require('autoprefixer');
let config = {
sourceDir: "./app/web",
buildDir: "./app/web",
sourceFiles: "./app/web/scss/**/*.scss",
portalStyles: {
sourceDir: "./app/web/scss",
sourceFiles: "./app/web/scss/portal.scss",
destinationDir: "./app/web/css",
mapsDir: "./maps", // relative to the destination directory
postcss: [
autoprefixer({browsers: ["last 5 versions", "> .5% in NG", "not ie < 11"]})
]
},
siteStyles: {
sourceDir: "./app/web/scss",
sourceFiles: "./app/web/scss/site.scss",
destinationDir: "./app/web/css",
mapsDir: "./maps", // relative to the destination directory
postcss: [
autoprefixer({browsers: ["last 5 versions", "> .5% in NG", "not ie < 11"]})
]
},
scripts: {
shouldTranspile: true, // set to true/false to transpile higher javascript versions
sourceDir: "./app/web/js",
sourceFiles: ["./app/web/js/**/*.js"],
destinationDir: "./app/web/js-dist"
},
images: {
shouldMinify: false,
sourceDir: "./app/web/img",
sourceFiles: "./app/web/img/**/*",
destinationDir: "./app/web/img" // save minified images in the same directory
}
};
/* Add sourcemaps on all environments except production */
config.sourcemaps = !(environments.production());
/* Minify build files on all environments except development */
config.minify = !(environments.development());
module.exports = {config};