-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.mix.js
39 lines (36 loc) · 1.15 KB
/
webpack.mix.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
const mix = require("laravel-mix");
const { colors, colorLevels } = require("./src/colors.json");
const sidebarMenu = require("./src/sidebar-menu.json");
const classNameList = require("./src/class-list.json");
require("laravel-mix-nunjucks");
const srcPath = "src/";
mix.postCss(`${srcPath}css/BshadeUI.min.css`, "css/BshadeUI.min.css").postCss(`${srcPath}css/custom.css`, "css/custom.css").setPublicPath("dist").options({
processCssUrls: false,
});
mix.njk("src/*.njk", "dist/", {
ext: ".html",
marked: null,
watch: true,
data: {
web_title: "Bellshade Framework",
colors,
colorLevels,
sidebarMenu,
classNameList,
},
block: "content",
envOptions: {
watch: true,
noCache: true,
},
// manageEnv: (nunjucks) => {
// nunjucks.addFilter("containString", (str, containStr) => {
// if (!str.length) return false;
// return str.indexOf(containStr) >= 0;
// });
// nunjucks.addFilter("startsWith", (str, targetStr) => {
// if (!str.length) return false;
// return str.startsWith(targetStr);
// });
// },
});