-
Notifications
You must be signed in to change notification settings - Fork 803
Expand file tree
/
Copy pathindex.js
More file actions
57 lines (47 loc) · 1.43 KB
/
index.js
File metadata and controls
57 lines (47 loc) · 1.43 KB
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
/**
* This is the project directory configuration file.
*
* It's located in the root directory, because It's used in
* build tools and src/ files.
*/
const fs = require('fs');
const path = require('path');
const dotenv = require('dotenv');
// Main directories
const config = {
ROOT_DIR: path.resolve(__dirname, '../'), // Root dir
TMP_DIR: path.resolve(__dirname, '../.tmp'), // Tmp dir
NPM_DIR: path.resolve(__dirname, '../node_modules'), // Npm dir
SRC_DIR: path.resolve(__dirname, '../src'), // Source files
DIST_DIR: path.resolve(__dirname, '../dist'), // Build destination
};
// Project paths
const paths = {
assets: [
config.SRC_DIR + "/_assets/**/*",
config.NPM_DIR + "/bootstrap/fonts/**.*"
],
styles: {
all: config.SRC_DIR + "/**/*.scss",
main: config.SRC_DIR + "/main.scss",
},
scripts: {
all: config.SRC_DIR + "/**/!(_context|*.helper)*.js",
main: config.SRC_DIR + "/main.js",
},
helpers: config.SRC_DIR + "/**/*.helper.js",
pages: config.SRC_DIR + "/**/*.page.hbs",
partials: config.SRC_DIR + "/**/*.hbs",
mainPage: "Dashboard",
};
config.paths = paths;
// Environment
const envFilePath = fs.existsSync(path.resolve(__dirname, '../.env')) ?
path.resolve(__dirname, '../.env') :
path.resolve(__dirname, '../.env.example');
const ENV = dotenv.load({
path: envFilePath,
silent: true
});
config.ENV = ENV;
module.exports = config;