@pi-r/gulp 0.6.0 → 0.6.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/README.md +2 -0
- package/index.js +13 -3
- package/package.json +4 -4
- package/types/index.d.ts +1 -1
package/README.md
CHANGED
package/index.js
CHANGED
|
@@ -61,8 +61,20 @@ class Gulp extends Task {
|
|
|
61
61
|
if ((0, types_1.isObject)(gulpfile)) {
|
|
62
62
|
({ path: gulpfile, tasks, opts } = gulpfile);
|
|
63
63
|
}
|
|
64
|
-
if ((0, types_1.isString)(gulpfile) && Task.isPath(gulpfile = path.resolve(gulpfile), true) && ((0, types_1.isString)(task) ||
|
|
64
|
+
if ((0, types_1.isString)(gulpfile) && Task.isPath(gulpfile = path.resolve(gulpfile), true) && ((0, types_1.isString)(task) || this.canRead(gulpfile, { ownPermissionOnly: true }))) {
|
|
65
65
|
if (!scheduled.has((0, types_1.isString)(task) ? task : task = JSON.stringify(task))) {
|
|
66
|
+
try {
|
|
67
|
+
const buffer = item.sourceUTF8 || item.buffer;
|
|
68
|
+
if (buffer) {
|
|
69
|
+
fs.writeFileSync(localUri, buffer);
|
|
70
|
+
delete item.sourceUTF8;
|
|
71
|
+
delete item.buffer;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
this.writeFail(["Unable to write file" /* ERR_MESSAGE.WRITE_FILE */, path.basename(localUri)], err, 32 /* LOG_TYPE.FILE */);
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
66
78
|
let dirMap = taskMap.get(task);
|
|
67
79
|
if (!dirMap) {
|
|
68
80
|
taskMap.set(task, dirMap = new Map());
|
|
@@ -73,8 +85,6 @@ class Gulp extends Task {
|
|
|
73
85
|
}
|
|
74
86
|
sourceDir.items.push(localUri);
|
|
75
87
|
scheduled.add(task);
|
|
76
|
-
delete item.sourceUTF8;
|
|
77
|
-
delete item.buffer;
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
90
|
else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-r/gulp",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "Gulp task constructor for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "https://github.com/anpham6/pi-r.git",
|
|
11
|
+
"url": "git+https://github.com/anpham6/pi-r.git",
|
|
12
12
|
"directory": "src/module/gulp"
|
|
13
13
|
},
|
|
14
14
|
"keywords": [
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/pi-r#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/task": "^0.8.
|
|
24
|
-
"@e-mc/types": "^0.8.
|
|
23
|
+
"@e-mc/task": "^0.8.4",
|
|
24
|
+
"@e-mc/types": "^0.8.4",
|
|
25
25
|
"gulp": "^4.0.2",
|
|
26
26
|
"gulp-cli": "^2.3.0",
|
|
27
27
|
"strip-ansi": "6.0.1",
|
package/types/index.d.ts
CHANGED