sqlaravel 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +6 -6
- package/files/resources/config/serve.js +0 -72
- package/files/resources/gitignore +0 -25
@@ -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
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "sqlaravel",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.4",
|
4
4
|
"description": "Base to start projects in Laravel, simply and quickly",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -24,17 +24,17 @@
|
|
24
24
|
},
|
25
25
|
"homepage": "https://github.com/esutoraiki/sqLARAVEL#readme",
|
26
26
|
"dependencies": {
|
27
|
-
"del": "^
|
27
|
+
"del": "^7.0.0",
|
28
28
|
"gulp": "^4.0.2",
|
29
29
|
"gulp-eslint": "^6.0.0",
|
30
30
|
"gulp-jsonlint": "^1.3.2",
|
31
31
|
"gulp-postcss": "^9.0.1",
|
32
|
-
"gulp-sass": "^5.
|
33
|
-
"gulp-svgmin": "^4.0
|
32
|
+
"gulp-sass": "^5.1.0",
|
33
|
+
"gulp-svgmin": "^4.1.0",
|
34
34
|
"merge-stream": "^2.0.0",
|
35
|
-
"postcss": "^8.
|
35
|
+
"postcss": "^8.4.14",
|
36
36
|
"postcss-inline-svg": "^5.0.0",
|
37
|
-
"sass": "^1.
|
37
|
+
"sass": "^1.54.0",
|
38
38
|
"sisass": "^1.1.13"
|
39
39
|
}
|
40
40
|
}
|
@@ -1,72 +0,0 @@
|
|
1
|
-
const
|
2
|
-
http = require("http"),
|
3
|
-
fs = require("fs"),
|
4
|
-
path = require("path"),
|
5
|
-
|
6
|
-
arg = require("./arg.js").arg,
|
7
|
-
fn = require("./fn.js"),
|
8
|
-
|
9
|
-
// Arguments
|
10
|
-
port = Number(arg.port) || Number(arg.p) || 8125,
|
11
|
-
view = fn.stringToBoolean(arg.log) || false
|
12
|
-
;
|
13
|
-
|
14
|
-
http.createServer(function (request, response) {
|
15
|
-
if (view) {
|
16
|
-
let
|
17
|
-
timeElapsed = Date.now(),
|
18
|
-
t = new Date(timeElapsed),
|
19
|
-
hour = t.getHours() + ":" + t.getMinutes() + ":" + t.getSeconds()
|
20
|
-
;
|
21
|
-
|
22
|
-
console.log("["+ hour + "]", request.url);
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
var filePath = "." + request.url;
|
27
|
-
|
28
|
-
if (filePath == "./") {
|
29
|
-
filePath = "./index.html";
|
30
|
-
}
|
31
|
-
|
32
|
-
var extname = String(path.extname(filePath)).toLowerCase();
|
33
|
-
var contentType = "text/html";
|
34
|
-
var mimeTypes = {
|
35
|
-
".html": "text/html",
|
36
|
-
".js": "text/javascript",
|
37
|
-
".css": "text/css",
|
38
|
-
".json": "application/json",
|
39
|
-
".png": "image/png",
|
40
|
-
".jpg": "image/jpg",
|
41
|
-
".gif": "image/gif",
|
42
|
-
".wav": "audio/wav",
|
43
|
-
".mp4": "video/mp4",
|
44
|
-
".woff": "application/font-woff",
|
45
|
-
".ttf": "applilcation/font-ttf",
|
46
|
-
".eot": "application/vnd.ms-fontobject",
|
47
|
-
".otf": "application/font-otf",
|
48
|
-
".svg": "application/image/svg+xml",
|
49
|
-
".scss": "text/x-scss"
|
50
|
-
};
|
51
|
-
|
52
|
-
contentType = mimeTypes[extname] || "application/octect-stream";
|
53
|
-
fs.readFile(filePath, function (error, content) {
|
54
|
-
if (error) {
|
55
|
-
if (error.code === "ENOENT"){
|
56
|
-
fs.readFile("./404.html", function (error, content) {
|
57
|
-
response.writeHead(200, { "Content-Type": contentType });
|
58
|
-
response.end(content, "utf-8");
|
59
|
-
});
|
60
|
-
} else {
|
61
|
-
response.writeHead(500);
|
62
|
-
response.end("Sorry, check with the site admin for error: "+error.code+" ..\n");
|
63
|
-
response.end();
|
64
|
-
}
|
65
|
-
} else {
|
66
|
-
response.writeHead(200, { "Content-Type": contentType });
|
67
|
-
response.end(content, "utf-8");
|
68
|
-
}
|
69
|
-
});
|
70
|
-
}).listen(port);
|
71
|
-
|
72
|
-
console.log("Server running at http://localhost:" + port + "/");
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# Node artifact files
|
2
|
-
node_modules/
|
3
|
-
dist/
|
4
|
-
|
5
|
-
# Log files
|
6
|
-
*.log
|
7
|
-
|
8
|
-
# Generated by MacOS
|
9
|
-
.DS_Store
|
10
|
-
|
11
|
-
# Generated by Windows
|
12
|
-
Thumbs.db
|
13
|
-
|
14
|
-
# Applications
|
15
|
-
*.app
|
16
|
-
*.exe
|
17
|
-
*.war
|
18
|
-
.vscode
|
19
|
-
|
20
|
-
# Linux
|
21
|
-
*.vim
|
22
|
-
*.swp
|
23
|
-
*.swo
|
24
|
-
*.out
|
25
|
-
*.*~
|