forked from silverbux/laravel-angular-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
74 lines (67 loc) · 2.09 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
66
67
68
69
70
71
72
73
74
var elixir = require('laravel-elixir')
require('./tasks/concatScripts.task.js')
require('laravel-elixir-karma')
require('./tasks/angular.task.js')
require('./tasks/bower.task.js')
require('./tasks/ngHtml2Js.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/partials.js',
'./public/js/app.js',
'./public/dist/js/app.js',
'./node_modules/textangular/dist/textAngular-rangy.min.js',
'./node_modules/textangular/dist/textAngular-sanitize.min.js',
'./node_modules/textangular/dist/textAngular.min.js'
],
styles = [
'./public/css/vendor.css',
'./public/css/app.css',
'./node_modules/textangular/dist/textAngular.css'
],
karmaJsDir = [
jsOutputFolder + '/vendor.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/ng-describe/dist/ng-describe.js',
jsOutputFolder + '/partials.js',
jsOutputFolder + '/app.js',
'tests/angular/**/*.spec.js'
]
mix
.bower()
.angular('./angular/')
.ngHtml2Js('./angular/**/*.html')
.concatScripts(scripts, 'final.js')
.sass('./angular/**/*.scss', 'public/css')
.styles(styles, './public/css/final.css')
.version(assets)
.browserSync({
proxy: 'localhost:8000'
})
.karma({
jsDir: karmaJsDir
})
mix
.copy(fontsOutputFolder, buildPath + '/fonts')
})