From 5604348fccbeac6d2f74e82495f6774ca631d2c1 Mon Sep 17 00:00:00 2001 From: Byron Duvall Date: Mon, 29 Oct 2018 14:45:24 -0400 Subject: [PATCH 1/6] patch singularitygs for gulp-sass 3.0 --- package.json | 4 +++- patches/singularitygs+1.8.0.patch | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 patches/singularitygs+1.8.0.patch diff --git a/package.json b/package.json index 3a1b3c0..87f7b2c 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "butler": "gulp develop", "linting": "gulp test", "deploy": "gulp deploy", - "postinstall": "./config/butler.config.sh" + "postinstall": "./config/butler.config.sh", + "prepare": "patch-package" }, "repository": { "type": "git", @@ -32,6 +33,7 @@ "gulp-sass": "^3.0", "install": "^0.5.4", "npm": "^3.7.5", + "patch-package": "^5.1.1", "postcss-reporter": "^1.3.3", "postcss-scss": "^0.1.6", "singularitygs": "^1.7.0", diff --git a/patches/singularitygs+1.8.0.patch b/patches/singularitygs+1.8.0.patch new file mode 100644 index 0000000..5106f59 --- /dev/null +++ b/patches/singularitygs+1.8.0.patch @@ -0,0 +1,25 @@ +patch-package +--- a/node_modules/singularitygs/stylesheets/singularitygs/_api.scss ++++ b/node_modules/singularitygs/stylesheets/singularitygs/_api.scss +@@ -56,11 +56,19 @@ + $Right: (); + + @if $Direction == 'both' or $From == 'left' or ($Direction == 'rtl' and $From == 'opposite') { +- $Left: call('output-#{$output-style}', map-merge($Span-Map, ('direction': left))); ++ @if (function-exists('get-function')) { ++ $Left: call(get-function('output-#{$output-style}'), map-merge($Span-Map, ('direction': left))); ++ } @else { ++ $Left: call('output-#{$output-style}', map-merge($Span-Map, ('direction': left))); ++ } + } + + @if $Direction == 'both' or $From == 'right' or ($Direction == 'ltr' and $From == 'opposite') { +- $Right: call('output-#{$output-style}', map-merge($Span-Map, ('direction': right))); ++ @if (function-exists('get-function')) { ++ $Right: call(get-function('output-#{$output-style}'), map-merge($Span-Map, ('direction': right))); ++ } @else { ++ $Right: call('output-#{$output-style}', map-merge($Span-Map, ('direction': right))); ++ } + } + + $Left-Keys: map-keys($Left); From 0fb90021a0ec781fbcaafd5598982dfe57a557b5 Mon Sep 17 00:00:00 2001 From: Byron Duvall Date: Mon, 29 Oct 2018 15:04:34 -0400 Subject: [PATCH 2/6] make patch-package work with yarn --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 87f7b2c..7261b0a 100644 --- a/package.json +++ b/package.json @@ -39,5 +39,8 @@ "singularitygs": "^1.7.0", "stylelint": "^4.4.0", "stylelint-selector-bem-pattern": "^0.2.1" + }, + "devDependencies": { + "postinstall-prepare": "^1.0.1" } } From b4ac737a5995bd391a3fc6753f23ed259ce0ab45 Mon Sep 17 00:00:00 2001 From: Byron Duvall Date: Mon, 29 Oct 2018 15:11:45 -0400 Subject: [PATCH 3/6] reinstall patch package with yarn --- package.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7261b0a..93eb90a 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,7 @@ "butler": "gulp develop", "linting": "gulp test", "deploy": "gulp deploy", - "postinstall": "./config/butler.config.sh", - "prepare": "patch-package" + "postinstall": "./config/butler.config.sh" }, "repository": { "type": "git", @@ -33,7 +32,6 @@ "gulp-sass": "^3.0", "install": "^0.5.4", "npm": "^3.7.5", - "patch-package": "^5.1.1", "postcss-reporter": "^1.3.3", "postcss-scss": "^0.1.6", "singularitygs": "^1.7.0", @@ -41,6 +39,7 @@ "stylelint-selector-bem-pattern": "^0.2.1" }, "devDependencies": { + "patch-package": "^5.1.1", "postinstall-prepare": "^1.0.1" } } From b761f5ae7ff72dcb771949ab4925062a2b7051ab Mon Sep 17 00:00:00 2001 From: Byron Duvall Date: Mon, 29 Oct 2018 16:13:12 -0400 Subject: [PATCH 4/6] fix asap package url in shrinkwrap --- npm-shrinkwrap.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 63f2c6a..7343451 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -8268,7 +8268,7 @@ "asap": { "version": "2.0.4", "from": "asap@latest", - "resolved": "https://unpm.uberinternal.com/asap/-/asap-2.0.4.tgz" + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.4.tgz" }, "chownr": { "version": "1.0.1", From f7f84771eae6fd86269248c0aad3294a689bd5bf Mon Sep 17 00:00:00 2001 From: Byron Duvall Date: Mon, 29 Oct 2018 17:04:02 -0400 Subject: [PATCH 5/6] move patch-package out of dev --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 93eb90a..8b665f4 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "gulp-sass": "^3.0", "install": "^0.5.4", "npm": "^3.7.5", + "patch-package": "^5.1.1", "postcss-reporter": "^1.3.3", "postcss-scss": "^0.1.6", "singularitygs": "^1.7.0", @@ -39,7 +40,6 @@ "stylelint-selector-bem-pattern": "^0.2.1" }, "devDependencies": { - "patch-package": "^5.1.1", "postinstall-prepare": "^1.0.1" } } From 54f7241ee489f88526f3219096432c6fadeb14df Mon Sep 17 00:00:00 2001 From: Byron Duvall Date: Mon, 29 Oct 2018 17:21:00 -0400 Subject: [PATCH 6/6] copy patches to project on install --- config/butler.config.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/butler.config.sh b/config/butler.config.sh index 98f7f7e..9538698 100755 --- a/config/butler.config.sh +++ b/config/butler.config.sh @@ -35,6 +35,11 @@ if [ ! -e ../../conf/butler.defaults.js ]; then echo "" >> ../../conf/butler.defaults.js echo "module.exports = overrides;" >> ../../conf/butler.defaults.js + + if [ ! -e ../../patches ]; then + mkdir ../../patches + cp -r patches/* ../../patches + fi; fi; echo ""