forked from szerko/Respond2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
94 lines (73 loc) · 2.14 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
const gulp = require('gulp');
const gutil = require('gulp-util');
const zip = require('gulp-zip');
const concat = require('gulp-concat');
const minify = require('gulp-minify');
// create a zip for the release
gulp.task('create-zip', function() {
var bundlePaths = [
'app/**/*',
'bootstrap/**/*',
'database/**/*',
'design/**/*',
'public/app/**/*',
'public/assets/**/*',
'public/favicon.ico',
'public/inline.46a703d2d28a5bc1f465.bundle.js',
'public/main.0f89cbc80238ee5e7d6b.bundle.js',
'public/polyfills.670184bbc1da14b1de67.bundle.js',
'public/scripts.f4b7c9895a1886684c5e.bundle.js',
'public/styles.e1308664689d3e858888.bundle.css',
'public/install/**/*',
'public/themes/bootstrap/**/*',
'public/themes/foundation/**/*',
'public/themes/material/**/*',
'public/.htaccess',
'public/index.html',
'public/index.php',
'resources/emails/**/*',
'resources/views/**/*',
'storage/**/*',
'tests/**/*',
'typings/**/*',
'vendor/**/*',
'.env.example',
'artisan',
'LICENSE'
];
return gulp.src(bundlePaths, {base: './', follow: true})
.pipe(zip('release.zip'))
.pipe(gulp.dest('./dist'));
});
// copy respond-ui
gulp.task('copy-respond-ui', function() {
// copy folders
var libs = [
'node_modules/respond-ui/dist/**/*'
];
return gulp.src(libs, {base: './node_modules/respond-ui/dist/'})
.pipe(gulp.dest('public'));
});
// copy folders
gulp.task('copy-folders', function() {
// copy folders
var libs = [
'node_modules/hashedit/**/*'
];
return gulp.src(libs, {base: './node_modules/'})
.pipe(gulp.dest('public/app/libs'));
});
// copy js
gulp.task('copy-js', function() {
return gulp.src([])
.pipe(gulp.dest('public/app/libs/'));
});
// copy static files
gulp.task('copy-css', function() {
return gulp.src([])
.pipe(gulp.dest('public/app/libs/'));
});
// copy
gulp.task('default', gulp.series(['copy-folders', 'copy-respond-ui']));
// create a zip file for the project in dist/release.zip
gulp.task('zip', gulp.series(['create-zip']));