sqlaravel 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
package/files/resources/a.js
DELETED
@@ -1,162 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
const
|
4
|
-
gulp = require("gulp"),
|
5
|
-
del = require("del"),
|
6
|
-
sass = require("gulp-sass")(require("sass")),
|
7
|
-
eslint = require("gulp-eslint"),
|
8
|
-
svgmin = require("gulp-svgmin"),
|
9
|
-
postcss = require("gulp-postcss"),
|
10
|
-
postinlinesvg = require("postcss-inline-svg"),
|
11
|
-
jsonlint = require("gulp-jsonlint"),
|
12
|
-
merge = require("merge-stream"),
|
13
|
-
|
14
|
-
// NOTE: foler core and sisass last element of array
|
15
|
-
paths_scss = [
|
16
|
-
"scss/",
|
17
|
-
"scss/core/",
|
18
|
-
"node_modules/sisass/src/scss/"
|
19
|
-
],
|
20
|
-
paths_dest_css = [
|
21
|
-
"../public/css/",
|
22
|
-
"../public/css/components/"
|
23
|
-
],
|
24
|
-
paths_compile_scss = [
|
25
|
-
"scss/*.scss",
|
26
|
-
"scss/components/*.scss"
|
27
|
-
],
|
28
|
-
|
29
|
-
path_svg = "scss/svg/*.scss",
|
30
|
-
path_dest_svg = "css/svg/",
|
31
|
-
|
32
|
-
path_img_svg = "../public/img/svg/*.svg",
|
33
|
-
path_orig_img_svg = "../public/img/svg/orig/*.svg",
|
34
|
-
path_dest_img_svg = "../public/img/svg/",
|
35
|
-
|
36
|
-
paths_js = [
|
37
|
-
"js/*.js",
|
38
|
-
"js/components/*.js"
|
39
|
-
]
|
40
|
-
;
|
41
|
-
|
42
|
-
gulp.task("delete_svg", function () {
|
43
|
-
console.log("");
|
44
|
-
console.log("---- SVG ----");
|
45
|
-
|
46
|
-
return del(path_img_svg);
|
47
|
-
});
|
48
|
-
|
49
|
-
gulp.task("svgmin", function () {
|
50
|
-
return gulp.src(path_orig_img_svg)
|
51
|
-
.pipe(svgmin(
|
52
|
-
{ removeStyleElement: true },
|
53
|
-
{ removeComments: true }
|
54
|
-
))
|
55
|
-
.pipe(gulp.dest(path_dest_img_svg));
|
56
|
-
})
|
57
|
-
|
58
|
-
gulp.task("process_svg", function () {
|
59
|
-
return gulp.src(path_dest_svg + "*.css")
|
60
|
-
.pipe(postcss([
|
61
|
-
postinlinesvg({
|
62
|
-
removeFill: true
|
63
|
-
})
|
64
|
-
]))
|
65
|
-
.pipe(gulp.dest(path_dest_svg));
|
66
|
-
})
|
67
|
-
|
68
|
-
gulp.task("css_svg", function () {
|
69
|
-
console.log("");
|
70
|
-
console.log("---- Styles SVG ----");
|
71
|
-
|
72
|
-
return gulp.src(path_svg)
|
73
|
-
.pipe(sass({
|
74
|
-
outputStyle: "compressed",
|
75
|
-
includePaths: paths_scss
|
76
|
-
}).on("error", sass.logError))
|
77
|
-
.pipe(gulp.dest(path_dest_svg));
|
78
|
-
});
|
79
|
-
|
80
|
-
gulp.task("scss", function () {
|
81
|
-
console.log("");
|
82
|
-
console.log("---- Styles ----");
|
83
|
-
|
84
|
-
let task_array = [];
|
85
|
-
|
86
|
-
for (let i = 0; i < paths_compile_scss.length; i++) {
|
87
|
-
task_array[i] = gulp.src(paths_compile_scss[i])
|
88
|
-
.pipe(sass({
|
89
|
-
outputStyle: "compressed",
|
90
|
-
includePaths: paths_scss
|
91
|
-
}).on("error", sass.logError))
|
92
|
-
.pipe(gulp.dest(paths_dest_css[i]));
|
93
|
-
}
|
94
|
-
|
95
|
-
console.log("");
|
96
|
-
return merge(...task_array);
|
97
|
-
});
|
98
|
-
|
99
|
-
gulp.task("lint", function() {
|
100
|
-
console.log("");
|
101
|
-
console.log("---- ES-LINT ----");
|
102
|
-
|
103
|
-
let task_array = [];
|
104
|
-
|
105
|
-
for (let i = 0; i < paths_js.length; i++) {
|
106
|
-
task_array[i] = gulp.src(paths_js[i])
|
107
|
-
.pipe(eslint({}))
|
108
|
-
.pipe(eslint.format())
|
109
|
-
.pipe(eslint.results(results => {
|
110
|
-
// Called once for all ESLint results.
|
111
|
-
console.log(`Total Results: ${results.length}`);
|
112
|
-
console.log(`Total Warnings: ${results.warningCount}`);
|
113
|
-
console.log(`Total Errors: ${results.errorCount}`);
|
114
|
-
|
115
|
-
console.log("");
|
116
|
-
}));
|
117
|
-
}
|
118
|
-
|
119
|
-
console.log("");
|
120
|
-
return merge(...task_array);
|
121
|
-
|
122
|
-
});
|
123
|
-
|
124
|
-
gulp.task("jsonlint", function () {
|
125
|
-
console.log("");
|
126
|
-
console.log("---- JSON-LINT ----");
|
127
|
-
|
128
|
-
let
|
129
|
-
myCustomReporter = function (file) {
|
130
|
-
log("File " + file.path + " is not valid JSON.");
|
131
|
-
}
|
132
|
-
;
|
133
|
-
|
134
|
-
return gulp.src("assets/json/*.json")
|
135
|
-
.pipe(jsonlint())
|
136
|
-
.pipe(jsonlint.reporter(myCustomReporter));
|
137
|
-
});
|
138
|
-
|
139
|
-
gulp.task("watch", function () {
|
140
|
-
console.log("");
|
141
|
-
console.log("---- INICIADO WATCH ----");
|
142
|
-
|
143
|
-
gulp.watch(paths_js, gulp.series("lint")).on("change");
|
144
|
-
|
145
|
-
gulp.watch("assets/json/*.json", gulp.series("jsonlint")).on("change");
|
146
|
-
|
147
|
-
gulp.watch(paths_compile_scss, gulp.series("scss")).on("change");
|
148
|
-
gulp.watch(path_svg, gulp.series("css_svg", "process_svg")).on("change");
|
149
|
-
gulp.watch(path_orig_img_svg, gulp.series(
|
150
|
-
"delete_svg",
|
151
|
-
"svgmin",
|
152
|
-
"css_svg",
|
153
|
-
"process_svg"
|
154
|
-
)).on("change");
|
155
|
-
|
156
|
-
gulp.watch("assets/scss/core/*.scss", gulp.parallel(
|
157
|
-
"scss",
|
158
|
-
gulp.series("css_svg", "process_svg")
|
159
|
-
)).on("change");
|
160
|
-
});
|
161
|
-
|
162
|
-
gulp.task("default", gulp.series("watch"));
|