-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
65 lines (56 loc) · 1.56 KB
/
gulpfile.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
var elixir = require('laravel-elixir')
require('laravel-elixir-eslint');
require('./tasks/swPrecache.task.js');
require('./tasks/concatScripts.task.js')
require('laravel-elixir-karma')
require('./tasks/bower.task.js')
if (!elixir.config.production) {
require('./tasks/phpcs.task.js')
}
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Sass
| file for our application, as well as publishing vendor resources.
|
*/
elixir(function (mix) {
var jsOutputFolder = config.js.outputFolder
var cssOutputFolder = config.css.outputFolder
var fontsOutputFolder = config.fonts.outputFolder
var buildPath = config.buildPath
var assets = [
'public/js/final.js',
'public/css/final.css'
],
scripts = [
'./public/js/vendor.js',
'./public/js/app.js',
'./public/dist/js/app.js'
],
styles = [
'./public/css/vendor.css',
'./public/css/mystyles.css'
],
karmaJsDir = [
jsOutputFolder + '/vendor.js',
jsOutputFolder + '/app.js',
]
mix
.bower()
.concatScripts(scripts, 'final.js')
.styles(styles, './public/css/final.css')
.version(assets)
.swPrecache()
.browserSync({
proxy: 'localhost:8000'
})
.karma({
jsDir: karmaJsDir
})
mix
.copy(fontsOutputFolder, buildPath + '/fonts')
})