-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject-paths.js
46 lines (45 loc) · 1.5 KB
/
project-paths.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
let ProjectPaths = function(environments) {
this.envs = envs = environments;
let _this = this;
this.toPUBLIC = function() {
let path = './';
return path;
// index.html (main page) is in the "public" folder
};
this.toPUBLICPath = function() {
let path = '/';
return path;
// index.html (main page) is in the "public" folder
};
this.toSRC = function() {
let path = './src/';
return path;
// your source folder where your source js, sass, ts, ... folders will be
};
this.toDIST = function() {
let path = "assets/";
if (envs.devServer) {
path = './' + path;
} else {
// path = "assets/"; //+ "distFolder"
}
return path
// your output folder where your compiled js, css, ... folders will be
};
this.toAssetsExport = function() {
let path = _this.toDIST() +'export/';
return path;
// your source folder where your source js, sass, ts, ... folders will be
};
this.styles = function() {
return _this.toSRC() + 'sass/ui'
// allows you to call quickly files from the sass folder (e.g: require(@styles/_variables.sass)). See Webpack Aliases
};
this.toAssets = function() {
// From the css output to the assets directory
let path = _this.toSRC() + 'assets/';
return path;
// adjusts css path files depending on the environment
}
};
module.exports = ProjectPaths;