sqlaravel 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/files/resources/{gulpfile.js → a.js} +8 -8
- package/files/resources/gulpfile.mjs +216 -0
- package/files/resources/{assets/js → js}/core/fn.js +0 -0
- package/files/resources/{assets/scss → scss}/_instance.scss +0 -0
- package/files/resources/{assets/scss → scss}/components/.remove +0 -0
- package/files/resources/{assets/scss → scss}/main.scss +0 -0
- package/files/resources/{assets/scss → scss}/svg/svg.scss +0 -0
- package/package.json +1 -1
@@ -13,8 +13,8 @@ const
|
|
13
13
|
|
14
14
|
// NOTE: foler core and sisass last element of array
|
15
15
|
paths_scss = [
|
16
|
-
"
|
17
|
-
"
|
16
|
+
"scss/",
|
17
|
+
"scss/core/",
|
18
18
|
"node_modules/sisass/src/scss/"
|
19
19
|
],
|
20
20
|
paths_dest_css = [
|
@@ -22,20 +22,20 @@ const
|
|
22
22
|
"../public/css/components/"
|
23
23
|
],
|
24
24
|
paths_compile_scss = [
|
25
|
-
"
|
26
|
-
"
|
25
|
+
"scss/*.scss",
|
26
|
+
"scss/components/*.scss"
|
27
27
|
],
|
28
28
|
|
29
|
-
path_svg = "
|
30
|
-
path_dest_svg = "
|
29
|
+
path_svg = "scss/svg/*.scss",
|
30
|
+
path_dest_svg = "css/svg/",
|
31
31
|
|
32
32
|
path_img_svg = "../public/img/svg/*.svg",
|
33
33
|
path_orig_img_svg = "../public/img/svg/orig/*.svg",
|
34
34
|
path_dest_img_svg = "../public/img/svg/",
|
35
35
|
|
36
36
|
paths_js = [
|
37
|
-
"
|
38
|
-
"
|
37
|
+
"js/*.js",
|
38
|
+
"js/components/*.js"
|
39
39
|
]
|
40
40
|
;
|
41
41
|
|
@@ -0,0 +1,216 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import gulp from "gulp";
|
4
|
+
import dartSass from "sass";
|
5
|
+
import gulpSass from "gulp-sass";
|
6
|
+
import { deleteAsync } from "del";
|
7
|
+
import merge from "merge-stream";
|
8
|
+
import eslint from "gulp-eslint";
|
9
|
+
import uglify from "gulp-uglify";
|
10
|
+
|
11
|
+
const
|
12
|
+
{ series, parallel, src, dest, task, watch } = gulp,
|
13
|
+
sass = gulpSass(dartSass);
|
14
|
+
;
|
15
|
+
|
16
|
+
const
|
17
|
+
/*
|
18
|
+
svgmin = require("gulp-svgmin"),
|
19
|
+
postcss = require("gulp-postcss"),
|
20
|
+
postinlinesvg = require("postcss-inline-svg"),
|
21
|
+
jsonlint = require("gulp-jsonlint"),
|
22
|
+
*/
|
23
|
+
|
24
|
+
paths = {
|
25
|
+
js: {
|
26
|
+
src: [
|
27
|
+
"js/*.js"
|
28
|
+
|
29
|
+
],
|
30
|
+
dest: [
|
31
|
+
"../public/js/"
|
32
|
+
]
|
33
|
+
}
|
34
|
+
},
|
35
|
+
|
36
|
+
// NOTE: foler core and sisass last element of array
|
37
|
+
paths_scss = [
|
38
|
+
"assets/scss/",
|
39
|
+
"assets/scss/core/",
|
40
|
+
"node_modules/sisass/src/scss/"
|
41
|
+
],
|
42
|
+
paths_dest_css = [
|
43
|
+
"../public/css/",
|
44
|
+
"../public/css/components/"
|
45
|
+
],
|
46
|
+
paths_compile_scss = [
|
47
|
+
"assets/scss/*.scss",
|
48
|
+
"assets/scss/components/*.scss"
|
49
|
+
],
|
50
|
+
|
51
|
+
path_svg = "assets/scss/svg/*.scss",
|
52
|
+
path_dest_svg = "assets/css/svg/",
|
53
|
+
|
54
|
+
path_img_svg = "../public/img/svg/*.svg",
|
55
|
+
path_orig_img_svg = "../public/img/svg/orig/*.svg",
|
56
|
+
path_dest_img_svg = "../public/img/svg/",
|
57
|
+
|
58
|
+
paths_js = [
|
59
|
+
"assets/js/*.js",
|
60
|
+
"assets/js/components/*.js"
|
61
|
+
]
|
62
|
+
;
|
63
|
+
|
64
|
+
/*
|
65
|
+
gulp.task("delete_svg", function () {
|
66
|
+
console.log("");
|
67
|
+
console.log("---- SVG ----");
|
68
|
+
|
69
|
+
return del(path_img_svg);
|
70
|
+
});
|
71
|
+
|
72
|
+
gulp.task("svgmin", function () {
|
73
|
+
return gulp.src(path_orig_img_svg)
|
74
|
+
.pipe(svgmin(
|
75
|
+
{ removeStyleElement: true },
|
76
|
+
{ removeComments: true }
|
77
|
+
))
|
78
|
+
.pipe(gulp.dest(path_dest_img_svg));
|
79
|
+
})
|
80
|
+
|
81
|
+
gulp.task("process_svg", function () {
|
82
|
+
return gulp.src(path_dest_svg + "*.css")
|
83
|
+
.pipe(postcss([
|
84
|
+
postinlinesvg({
|
85
|
+
removeFill: true
|
86
|
+
})
|
87
|
+
]))
|
88
|
+
.pipe(gulp.dest(path_dest_svg));
|
89
|
+
})
|
90
|
+
|
91
|
+
gulp.task("css_svg", function () {
|
92
|
+
console.log("");
|
93
|
+
console.log("---- Styles SVG ----");
|
94
|
+
|
95
|
+
return gulp.src(path_svg)
|
96
|
+
.pipe(sass({
|
97
|
+
outputStyle: "compressed",
|
98
|
+
includePaths: paths_scss
|
99
|
+
}).on("error", sass.logError))
|
100
|
+
.pipe(gulp.dest(path_dest_svg));
|
101
|
+
});
|
102
|
+
|
103
|
+
gulp.task("scss", function () {
|
104
|
+
console.log("");
|
105
|
+
console.log("---- Styles ----");
|
106
|
+
|
107
|
+
let task_array = [];
|
108
|
+
|
109
|
+
for (let i = 0; i < paths_compile_scss.length; i++) {
|
110
|
+
task_array[i] = gulp.src(paths_compile_scss[i])
|
111
|
+
.pipe(sass({
|
112
|
+
outputStyle: "compressed",
|
113
|
+
includePaths: paths_scss
|
114
|
+
}).on("error", sass.logError))
|
115
|
+
.pipe(gulp.dest(paths_dest_css[i]));
|
116
|
+
}
|
117
|
+
|
118
|
+
console.log("");
|
119
|
+
return merge(...task_array);
|
120
|
+
});
|
121
|
+
*/
|
122
|
+
|
123
|
+
task("lint", function() {
|
124
|
+
console.log("");
|
125
|
+
console.log("---- ES-LINT ----");
|
126
|
+
|
127
|
+
let task_array = [];
|
128
|
+
|
129
|
+
for (let i = 0; i < paths.js.src.length; i++) {
|
130
|
+
task_array[i] = src(paths.js.src[i])
|
131
|
+
.pipe(eslint({}))
|
132
|
+
.pipe(eslint.format())
|
133
|
+
.pipe(eslint.results(results => {
|
134
|
+
// Called once for all ESLint results.
|
135
|
+
console.log(`Total Results: ${results.length}`);
|
136
|
+
console.log(`Total Warnings: ${results.warningCount}`);
|
137
|
+
console.log(`Total Errors: ${results.errorCount}`);
|
138
|
+
console.log("");
|
139
|
+
}));
|
140
|
+
}
|
141
|
+
|
142
|
+
console.log("");
|
143
|
+
return merge(...task_array);
|
144
|
+
});
|
145
|
+
|
146
|
+
task("js", function () {
|
147
|
+
console.log("");
|
148
|
+
console.log("---- JS ----");
|
149
|
+
|
150
|
+
let task_array = [];
|
151
|
+
|
152
|
+
for (let i = 0; i < paths.js.src.length; i++) {
|
153
|
+
task_array[i] = src(paths.js.src[i])
|
154
|
+
.pipe(uglify())
|
155
|
+
.pipe(gulp.dest(paths.js.dest));
|
156
|
+
}
|
157
|
+
|
158
|
+
console.log("");
|
159
|
+
return merge(...task_array);
|
160
|
+
});
|
161
|
+
|
162
|
+
/*
|
163
|
+
gulp.task("jsonlint", function () {
|
164
|
+
console.log("");
|
165
|
+
console.log("---- JSON-LINT ----");
|
166
|
+
|
167
|
+
let
|
168
|
+
myCustomReporter = function (file) {
|
169
|
+
log("File " + file.path + " is not valid JSON.");
|
170
|
+
}
|
171
|
+
;
|
172
|
+
|
173
|
+
return gulp.src("assets/json/*.json")
|
174
|
+
.pipe(jsonlint())
|
175
|
+
.pipe(jsonlint.reporter(myCustomReporter));
|
176
|
+
});
|
177
|
+
*/
|
178
|
+
|
179
|
+
/*
|
180
|
+
task("watch", function () {
|
181
|
+
console.log("");
|
182
|
+
console.log("---- INICIADO WATCH ----");
|
183
|
+
|
184
|
+
gulp.watch(paths_js, gulp.series("lint")).on("change");
|
185
|
+
|
186
|
+
/*
|
187
|
+
gulp.watch("assets/json/*.json", gulp.series("jsonlint")).on("change");
|
188
|
+
|
189
|
+
gulp.watch(paths_compile_scss, gulp.series("scss")).on("change");
|
190
|
+
gulp.watch(path_svg, gulp.series("css_svg", "process_svg")).on("change");
|
191
|
+
gulp.watch(path_orig_img_svg, gulp.series(
|
192
|
+
"delete_svg",
|
193
|
+
"svgmin",
|
194
|
+
"css_svg",
|
195
|
+
"process_svg"
|
196
|
+
)).on("change");
|
197
|
+
|
198
|
+
gulp.watch("assets/scss/core/*.scss", gulp.parallel(
|
199
|
+
"scss",
|
200
|
+
gulp.series("css_svg", "process_svg")
|
201
|
+
)).on("change");
|
202
|
+
*/
|
203
|
+
/*
|
204
|
+
});
|
205
|
+
*/
|
206
|
+
|
207
|
+
function watchFiles() {
|
208
|
+
console.log("");
|
209
|
+
console.log("---- INICIADO WATCH ----");
|
210
|
+
|
211
|
+
watch(paths.js.src, series("lint", "js"));
|
212
|
+
// gulp.watch(paths.styles.src, styles);
|
213
|
+
}
|
214
|
+
|
215
|
+
export { watchFiles as watch };
|
216
|
+
export default watchFiles;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|