Skip to content

Commit 1b4ae09

Browse files
committed
Install "patch-package" package, to patch panini to make it work with absolute paths and add patch
See: foundation/panini#169
1 parent b388d2e commit 1b4ae09

File tree

3 files changed

+285
-6
lines changed

3 files changed

+285
-6
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
"stylelint-config-standard": "~18.2.0"
5959
},
6060
"scripts": {
61+
"prepare": "patch-package",
6162
"babel": "gulp babel",
6263
"clean": "gulp clean",
6364
"csslint": "gulp csslint",
@@ -73,5 +74,9 @@
7374
"watch": "gulp watch",
7475
"email": "gulp email",
7576
"test": "./node_modules/eslint/bin/eslint.js *.js helper/*.js task/*.js"
77+
},
78+
"devDependencies": {
79+
"patch-package": "^5.1.1",
80+
"postinstall-prepare": "^1.0.1"
7681
}
7782
}

patches/panini+1.6.3.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
patch-package
2+
--- a/node_modules/panini/lib/utils.js
3+
+++ b/node_modules/panini/lib/utils.js
4+
@@ -16,7 +16,12 @@ exports.loadFiles = function(dir, pattern) {
5+
dir = !Array.isArray(dir) ? [dir] : dir;
6+
7+
for (var i in dir) {
8+
- files = files.concat(glob.sync(path.join(process.cwd(), dir[i], pattern)));
9+
+ var filePath = [process.cwd(), dir[i], pattern];
10+
+ if(path.isAbsolute(dir[i])) {
11+
+ filePath.shift();
12+
+ }
13+
+
14+
+ files = files.concat(glob.sync(path.join.apply(null, filePath)));
15+
}
16+
17+
return files;

0 commit comments

Comments
 (0)