forked from zeriontech/tokenbox-ico-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
65 lines (58 loc) · 1.97 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
const elixir = require('laravel-elixir');
require('laravel-elixir-postcss');
Elixir.config.sourcemaps = true;
Elixir.config.assetsPath = './resources/assets/';
Elixir.config.publicPath = './public/assets/';
var paths = {
srcFront : Elixir.config.assetsPath + 'front/',
destFront : Elixir.config.publicPath + 'front/',
srcDashboard : Elixir.config.assetsPath + 'dashboard/',
destDashboard : Elixir.config.publicPath + 'dashboard/',
node : './node_modules/'
};
elixir((mix) => {
// <START> Frontend Compilation
processors = [
require('precss'),
require('postcss-assets')({
baseUrl: 'public/',
loadPaths: ['assets/front/img/'],
relative: true,
cachebuster: true
}),
require('autoprefixer')({
browsers: ['last 2 version', 'safari 5', 'opera 12.1', 'ios 6', 'android 4']
}),
require('cssnano')({
convertValues: {
length: false
},
discardComments: {
removeAll: true
}
}),
];
mix.postcss('app.css', {
srcDir : paths.srcFront + 'sass/',
output : paths.destFront + 'css/',
plugins : processors
});
mix.scripts([
paths.node + 'jquery/dist/jquery.min.js',
paths.node + 'scrollreveal/dist/scrollreveal.min.js',
paths.node + 'slick-carousel/slick/slick.js',
paths.node + 'waypoints/lib/jquery.waypoints.min.js',
paths.node + 'waypoints/src/shortcuts/inview.js',
paths.node + 'intl-tel-input/build/js/intlTelInput.min.js',
'vendors/*.js'
], paths.destFront + 'js/vendors.min.js', paths.srcFront + 'js');
mix.scripts([
'components/*.js',
'app.js',
], paths.destFront + 'js/app.min.js', paths.srcFront + 'js');
mix.browserSync({
proxy: 'tokenbox.dev',
port: 8000,
files: ['public/**/*.css', 'public/**/*.js']
});
});