This repository has been archived by the owner on Jan 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.mix.js
86 lines (65 loc) · 1.73 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
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
const mix = require('laravel-mix');
const express = require('express')
const connectSSI = require('connect-ssi')
const app = express()
app.use(connectSSI({
ext: '.html',
baseDir: './'
}));
app.use(express.static('./'))
app.use(function(req, res, next) {
res.status(404);
res.send('404: File Not Found');
});
app.listen(3080, function () {
console.log('Express Begun Successfully')
})
mix.autoload({})
mix.browserSync({
proxy: 'localhost:3080',
files: ['**/*']
});
mix.webpackConfig({
resolve: {
alias: {
'vue$': 'vue/dist/vue.js',
'jquery$': "jquery/src/jquery",
"velocity": 'velocity-animate/velocity.min.js',
"ScrollMagic": 'scrollmagic/scrollmagic/uncompressed/ScrollMagic.js',
"animation.velocity": 'scrollmagic/scrollmagic/minified/plugins/animation.velocity.min.js',
"debug.addIndicators": 'scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators.js',
}
}
});
/**
* Sudo Styles
*/
/* Folder, Name */
var styles = [
[ '404', '404' ],
[ 'about', 'about' ],
[ 'home', 'home' ],
[ 'projects', 'projects' ],
[ 'vote', 'vote' ],
[ 'sponsorship', 'sponsorship' ],
[ 'sudo-global', 'sudo-global' ],
]
var fip = { includePaths: ['node_modules/foundation-sites/scss/', 'scss/sudo-global/styles/']};
for(index in styles) {
var folder = styles[index][0]
var name = styles[index][1]
mix.sass('scss/' + folder + '/styles/' + name + '.scss', folder + '/styles', fip)
}
/**
* Sudo Script
*/
/* Folder, Name */
var scripts = [
[ 'sudo-global', 'sudo-global' ],
[ 'vote', 'vote' ],
]
for(index in scripts) {
var folder = scripts[index][0]
var name = scripts[index][1]
mix.js(folder + '/scripts/' + name + '.js', folder + '/scripts/min/' + name + '.min.js')
}