From 673f60c89017643a853e6829af19eac5f6a79d00 Mon Sep 17 00:00:00 2001 From: Jack Date: Mon, 25 May 2020 15:00:16 -0700 Subject: [PATCH] Finish first draft of v4 tasks --- gulpfile.js | 2 +- package-lock.json | 600 ++++++++++++++++++++++++++-- package.json | 2 +- tasks/admin/components/init.js | 2 +- tasks/admin/components/update.js | 2 +- tasks/admin/distributions/init.js | 2 +- tasks/admin/distributions/update.js | 2 +- tasks/admin/register.js | 4 +- tasks/build.js | 12 +- tasks/build/assets.js | 5 +- tasks/build/css.js | 11 +- tasks/build/javascript.js | 8 +- tasks/check-install.js | 19 +- tasks/clean.js | 6 +- tasks/config/admin/github.js | 2 +- tasks/config/project/install.js | 100 ++--- tasks/config/project/release.js | 2 +- tasks/docs/build.js | 9 +- tasks/docs/metadata.js | 10 +- tasks/docs/serve.js | 283 +++++++------ tasks/rtl/watch.js | 15 +- tasks/version.js | 5 +- tasks/watch.js | 8 +- 23 files changed, 864 insertions(+), 247 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index dbdb783ce..6e5829dfc 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -54,7 +54,7 @@ gulp.task('watch', watch); gulp.task('build', build); gulp.task('build-javascript', buildJS); gulp.task('build-css', buildCSS); -gulp.task('build-assets',buildAssets); +gulp.task('build-assets', buildAssets); gulp.task('clean', clean); gulp.task('version', version); diff --git a/package-lock.json b/package-lock.json index fa8ff2dfe..646b7409f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,9 +1,181 @@ { "name": "semantic-ui", - "version": "2.4.2", + "version": "2.5.0", "lockfileVersion": 1, "requires": true, "dependencies": { + "@octokit/auth-token": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.1.tgz", + "integrity": "sha512-NB81O5h39KfHYGtgfWr2booRxp2bWOJoqbWwbyUg2hw6h35ArWYlAST5B3XwAkbdcx13yt84hFXyFP5X0QToWA==", + "dev": true, + "requires": { + "@octokit/types": "^4.0.1" + } + }, + "@octokit/core": { + "version": "2.5.3", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-2.5.3.tgz", + "integrity": "sha512-23AHK9xBW0v79Ck8h5U+5iA4MW7aosqv+Yr6uZXolVGNzzHwryNH5wM386/6+etiKUTwLFZTqyMU9oQpIBZcFA==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.0", + "@octokit/graphql": "^4.3.1", + "@octokit/request": "^5.4.0", + "@octokit/types": "^4.0.1", + "before-after-hook": "^2.1.0", + "universal-user-agent": "^5.0.0" + } + }, + "@octokit/endpoint": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.1.tgz", + "integrity": "sha512-pOPHaSz57SFT/m3R5P8MUu4wLPszokn5pXcB/pzavLTQf2jbU+6iayTvzaY6/BiotuRS0qyEUkx3QglT4U958A==", + "dev": true, + "requires": { + "@octokit/types": "^2.11.1", + "is-plain-object": "^3.0.0", + "universal-user-agent": "^5.0.0" + }, + "dependencies": { + "@octokit/types": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", + "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + }, + "is-plain-object": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "dev": true, + "requires": { + "isobject": "^4.0.0" + } + }, + "isobject": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "dev": true + } + } + }, + "@octokit/graphql": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.0.tgz", + "integrity": "sha512-StJWfn0M1QfhL3NKBz31e1TdDNZrHLLS57J2hin92SIfzlOVBuUaRkp31AGkGOAFOAVtyEX6ZiZcsjcJDjeb5g==", + "dev": true, + "requires": { + "@octokit/request": "^5.3.0", + "@octokit/types": "^4.0.1", + "universal-user-agent": "^5.0.0" + } + }, + "@octokit/plugin-paginate-rest": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.1.tgz", + "integrity": "sha512-/tHpIF2XpN40AyhIq295YRjb4g7Q5eKob0qM3thYJ0Z+CgmNsWKM/fWse/SUR8+LdprP1O4ZzSKQE+71TCwK+w==", + "dev": true, + "requires": { + "@octokit/types": "^4.0.1" + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz", + "integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "3.12.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.12.2.tgz", + "integrity": "sha512-QUfJ6nriHpwTxf8As99kEyDQV4AGQvypsM8Xyx5rsWi6JY7rzjOkZrleRrFq0aiNcQo7acM4bwaXq462OKTJ9w==", + "dev": true, + "requires": { + "@octokit/types": "^4.0.0", + "deprecation": "^2.3.1" + } + }, + "@octokit/request": { + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.4.tgz", + "integrity": "sha512-vqv1lz41c6VTxUvF9nM+a6U+vvP3vGk7drDpr0DVQg4zyqlOiKVrY17DLD6de5okj+YLHKcoqaUZTBtlNZ1BtQ==", + "dev": true, + "requires": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.0.0", + "@octokit/types": "^4.0.1", + "deprecation": "^2.0.0", + "is-plain-object": "^3.0.0", + "node-fetch": "^2.3.0", + "once": "^1.4.0", + "universal-user-agent": "^5.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", + "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", + "dev": true, + "requires": { + "isobject": "^4.0.0" + } + }, + "isobject": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", + "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==", + "dev": true + } + } + }, + "@octokit/request-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.1.tgz", + "integrity": "sha512-5lqBDJ9/TOehK82VvomQ6zFiZjPeSom8fLkFVLuYL3sKiIb5RB8iN/lenLkY7oBmyQcGP7FBMGiIZTO8jufaRQ==", + "dev": true, + "requires": { + "@octokit/types": "^4.0.1", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "@octokit/rest": { + "version": "17.9.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-17.9.2.tgz", + "integrity": "sha512-UXxiE0HhGQAPB3WDHTEu7lYMHH2uRcs/9f26XyHpGGiiXht8hgHWEk6fA7WglwwEvnj8V7mkJOgIntnij132UA==", + "dev": true, + "requires": { + "@octokit/core": "^2.4.3", + "@octokit/plugin-paginate-rest": "^2.2.0", + "@octokit/plugin-request-log": "^1.0.0", + "@octokit/plugin-rest-endpoint-methods": "^3.12.2" + } + }, + "@octokit/types": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-4.0.2.tgz", + "integrity": "sha512-+4X6qfhT/fk/5FD66395NrFLxCzD6FsGlpPwfwvnukdyfYbhiZB/FJltiT1XM5Q63rGGBSf9FPaNV3WpNHm54A==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + }, + "@types/node": { + "version": "14.0.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", + "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==", + "dev": true + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, "accord": { "version": "0.29.0", "resolved": "https://registry.npmjs.org/accord/-/accord-0.29.0.tgz", @@ -461,6 +633,12 @@ "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=" }, + "before-after-hook": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "dev": true + }, "better-console": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/better-console/-/better-console-1.0.1.tgz", @@ -853,6 +1031,11 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", @@ -923,6 +1106,15 @@ } } }, + "config-chain": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz", + "integrity": "sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==", + "requires": { + "ini": "^1.3.4", + "proto-list": "~1.2.1" + } + }, "convert-source-map": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz", @@ -947,6 +1139,27 @@ "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "css": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", @@ -1030,6 +1243,11 @@ "is-obj": "^1.0.0" } }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + }, "default-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", @@ -1085,11 +1303,22 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "optional": true }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true + }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=" }, + "detect-indent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.0.0.tgz", + "integrity": "sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA==" + }, "diff": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.8.tgz", @@ -1180,11 +1409,38 @@ "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==" }, + "editorconfig": { + "version": "0.15.3", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.3.tgz", + "integrity": "sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g==", + "requires": { + "commander": "^2.19.0", + "lru-cache": "^4.1.5", + "semver": "^5.6.0", + "sigmund": "^1.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "electron-to-chromium": { "version": "1.3.451", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.451.tgz", "integrity": "sha512-2fvco0F2bBIgqzO8GRP0Jt/91pdrf9KfZ5FsmkYkjERmIJG585cFeFZV4+CO6oTmU3HmCTgfcZuEa7kW8VUh3A==" }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", @@ -1268,6 +1524,21 @@ } } }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", @@ -1461,7 +1732,7 @@ }, "commander": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/commander/-/commander-2.1.0.tgz", "integrity": "sha1-0SG7roYNmZKj1Re6lvVliOR8Z4E=" } } @@ -2170,6 +2441,27 @@ "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", "dev": true }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -2184,12 +2476,6 @@ "assert-plus": "^1.0.0" } }, - "github": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/github/-/github-14.0.0.tgz", - "integrity": "sha512-34/VqwhYGeYN0VHBSH49TmRWMF7emy32qjK6POiW47T/QI2u/cpuKsmrWt7a218ew/73dF4dQSJE68/HXdNfPw==", - "dev": true - }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -3073,6 +3359,79 @@ "through2": "^2.0.1" } }, + "gulp-json-editor": { + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/gulp-json-editor/-/gulp-json-editor-2.5.4.tgz", + "integrity": "sha512-3IdMYsSACfLFYipet9Rmpag7PEU059KnR6TWgfuAfz+ftyzN8yaEvf9vXAD5b9K9v711Ymcpqe6vWGQYfQJ/uQ==", + "requires": { + "deepmerge": "^4.2.1", + "detect-indent": "^6.0.0", + "js-beautify": "^1.10.2", + "plugin-error": "^1.0.1", + "through2": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, "gulp-less": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/gulp-less/-/gulp-less-4.0.1.tgz", @@ -3471,6 +3830,11 @@ } } }, + "gulp4-run-sequence": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gulp4-run-sequence/-/gulp4-run-sequence-1.0.1.tgz", + "integrity": "sha512-6w845e/gi5TOc9OHmHtpEfumIiwKg7dj9vvapOeN9bzN4jPpSYlHNQ3TZzT9jyeafHVM4ALHFizSxQyRiZDIjw==" + }, "gulplog": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", @@ -3867,6 +4231,12 @@ "is-unc-path": "^1.0.0" } }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -3927,6 +4297,38 @@ "textextensions": "2" } }, + "jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" + }, + "js-beautify": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.11.0.tgz", + "integrity": "sha512-a26B+Cx7USQGSWnz9YxgJNMmML/QG2nqIaL7VVYPCXbqiKz8PN0waSNvroMtvAK6tY7g/wPdNWGEP+JTNIBr6A==", + "requires": { + "config-chain": "^1.1.12", + "editorconfig": "^0.15.3", + "glob": "^7.1.3", + "mkdirp": "~1.0.3", + "nopt": "^4.0.3" + }, + "dependencies": { + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + } + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -4085,6 +4487,21 @@ "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", "optional": true }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "optional": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "optional": true, + "requires": { + "minimist": "^1.2.5" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4380,6 +4797,21 @@ "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "macos-release": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", + "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==", + "dev": true + }, "make-error": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", @@ -4658,19 +5090,9 @@ } }, "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" - } - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" }, "ms": { "version": "2.0.0", @@ -4706,6 +5128,18 @@ "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "dev": true + }, "node-notifier": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz", @@ -4737,6 +5171,15 @@ "is": "^3.2.1" } }, + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", @@ -4769,6 +5212,15 @@ "once": "^1.3.2" } }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, "num2fraction": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", @@ -4973,8 +5425,7 @@ "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { "version": "1.4.0", @@ -4984,11 +5435,36 @@ "lcid": "^1.0.0" } }, + "os-name": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", + "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "dev": true, + "requires": { + "macos-release": "^2.2.0", + "windows-release": "^3.1.0" + } + }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -5079,6 +5555,12 @@ "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, "path-parse": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", @@ -5320,12 +5802,22 @@ "inquirer": "3.2.x" } }, + "proto-list": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", + "integrity": "sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=" + }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "optional": true }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, "psl": { "version": "1.1.29", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", @@ -5957,6 +6449,19 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, "postcss": { "version": "6.0.23", "resolved": "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz", @@ -6061,11 +6566,31 @@ "split-string": "^3.0.1" } }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, "shellwords": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=" + }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", @@ -6452,6 +6977,12 @@ "strip-bom-buf": "^1.0.0" } }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, "strip-json-comments": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", @@ -6820,6 +7351,15 @@ } } }, + "universal-user-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz", + "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -7114,6 +7654,15 @@ "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" }, + "windows-release": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.0.tgz", + "integrity": "sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ==", + "dev": true, + "requires": { + "execa": "^1.0.0" + } + }, "wordwrap": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", @@ -7168,6 +7717,11 @@ "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, "yamljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", diff --git a/package.json b/package.json index 1c2d44849..2cc88b801 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "yamljs": "^0.3.0" }, "devDependencies": { - "github": "^14.0.0", + "@octokit/rest": "^17.9.2", "gulp-concat-filenames": "*", "gulp-debug": "^4.0.0", "gulp-git": "^2.10.1", diff --git a/tasks/admin/components/init.js b/tasks/admin/components/init.js index 168f8dfc0..1f8b7cf8c 100644 --- a/tasks/admin/components/init.js +++ b/tasks/admin/components/init.js @@ -21,7 +21,7 @@ var fs = require('fs'), path = require('path'), git = require('gulp-git'), - githubAPI = require('github'), + githubAPI = require('@octokit/rest'), mkdirp = require('mkdirp'), // admin files diff --git a/tasks/admin/components/update.js b/tasks/admin/components/update.js index d69501b47..0c6ff696a 100644 --- a/tasks/admin/components/update.js +++ b/tasks/admin/components/update.js @@ -20,7 +20,7 @@ var fs = require('fs'), path = require('path'), git = require('gulp-git'), - githubAPI = require('github'), + githubAPI = require('@octokit/rest'), requireDotFile = require('require-dot-file'), // admin files diff --git a/tasks/admin/distributions/init.js b/tasks/admin/distributions/init.js index 8ed75a0ca..12b51802e 100644 --- a/tasks/admin/distributions/init.js +++ b/tasks/admin/distributions/init.js @@ -21,7 +21,7 @@ var fs = require('fs'), path = require('path'), git = require('gulp-git'), - githubAPI = require('github'), + githubAPI = require('@octokit/rest'), mkdirp = require('mkdirp'), // admin files diff --git a/tasks/admin/distributions/update.js b/tasks/admin/distributions/update.js index 1fce7d2e8..fc9150096 100644 --- a/tasks/admin/distributions/update.js +++ b/tasks/admin/distributions/update.js @@ -20,7 +20,7 @@ var fs = require('fs'), path = require('path'), git = require('gulp-git'), - githubAPI = require('github'), + githubAPI = require('@octokit/rest'), requireDotFile = require('require-dot-file'), // admin files diff --git a/tasks/admin/register.js b/tasks/admin/register.js index d45dd2916..6e383ca04 100644 --- a/tasks/admin/register.js +++ b/tasks/admin/register.js @@ -8,7 +8,7 @@ * Registers component with NPM */ -var +let // node dependencies process = require('child_process'), @@ -35,7 +35,7 @@ module.exports = function(callback) { callback(); return; } - var + let repo = repos[index].toLowerCase(), outputDirectory = release.outputRoot + repo + '/', exec = process.exec, diff --git a/tasks/build.js b/tasks/build.js index 0765dbbbb..e738952aa 100644 --- a/tasks/build.js +++ b/tasks/build.js @@ -15,7 +15,7 @@ let buildAssets = require('./build/assets'), // rtl - buildRTL = require('./rtl/build'), + buildRTL = require('./rtl/build'), // task sequence tasks = [], @@ -25,18 +25,18 @@ let build ; - if(config.rtl == 'both') { tasks.push(buildRTL); } -tasks.push(buildJS); -tasks.push(buildCSS); -tasks.push(buildAssets); - if(config.rtl === true || config.rtl === 'Yes') { tasks.push(buildRTL); } +else { + tasks.push(buildJS); + tasks.push(buildCSS); + tasks.push(buildAssets); +} build = parallel(tasks); diff --git a/tasks/build/assets.js b/tasks/build/assets.js index 59e40303a..185685aca 100644 --- a/tasks/build/assets.js +++ b/tasks/build/assets.js @@ -8,6 +8,7 @@ var // gulp dependencies chmod = require('gulp-chmod'), gulpif = require('gulp-if'), + print = require('gulp-print').default, // config config = require('../config/user'), @@ -20,6 +21,7 @@ var source = config.paths.source, log = tasks.log, + {series, parallel} = gulp, buildAssets ; @@ -31,6 +33,7 @@ buildAssets = function(callback) { // copy assets return gulp.src(source.themes + '/**/assets/**/*.*') .pipe(gulpif(config.hasPermission, chmod(config.permission))) + .pipe(print(log.created)) .pipe(gulp.dest(output.themes)) ; @@ -39,4 +42,4 @@ buildAssets = function(callback) { /* Export with Metadata */ buildAssets.displayName = 'build-assets'; buildAssets.description = 'Builds all assets'; -module.exports = buildAssets; +module.exports = series(buildAssets); diff --git a/tasks/build/css.js b/tasks/build/css.js index da067e48b..2944206fb 100644 --- a/tasks/build/css.js +++ b/tasks/build/css.js @@ -38,20 +38,21 @@ var log = tasks.log, settings = tasks.settings, + {series, parallel} = gulp, + buildCSS ; // add internal tasks (concat release) require('../collections/internal')(gulp); -buildCSS = function(callback) { - - var +buildCSS = function(taskCallback) { + let tasksCompleted = 0, maybeCallback = function() { tasksCompleted++; if(tasksCompleted === 2) { - callback(); + taskCallback(); } }, @@ -118,4 +119,4 @@ buildCSS = function(callback) { /* Export with Metadata */ buildCSS.displayName = 'build-css'; buildCSS.description = 'Builds all css from source'; -module.exports = buildCSS; +module.exports = series(buildCSS); diff --git a/tasks/build/javascript.js b/tasks/build/javascript.js index 12c096cb3..b6f88b6f6 100644 --- a/tasks/build/javascript.js +++ b/tasks/build/javascript.js @@ -2,7 +2,7 @@ Build Task *******************************/ -var +let gulp = require('gulp'), // node dependencies @@ -35,6 +35,8 @@ var log = tasks.log, settings = tasks.settings, + {series, parallel} = gulp, + buildJavascript ; @@ -43,7 +45,7 @@ require('../collections/internal')(gulp); buildJavascript = function(callback) { - var + let stream, compressedStream, uncompressedStream @@ -81,4 +83,4 @@ buildJavascript = function(callback) { /* Export with Metadata */ buildJavascript.displayName = 'build-javascript'; buildJavascript.description = 'Builds all javascript from source'; -module.exports = buildJavascript; +module.exports = series(buildJavascript); diff --git a/tasks/check-install.js b/tasks/check-install.js index 7200e75bf..a5fdf465e 100644 --- a/tasks/check-install.js +++ b/tasks/check-install.js @@ -15,17 +15,14 @@ var // export task checkInstall = function() { - setTimeout(function() { - if( !install.isSetup() ) { - console.log('Starting install...'); - gulp.start('install'); - return; - } - else { - gulp.start('watch'); - } - }, 50); // Delay to allow console.clear to remove messages from check event - + if( !install.isSetup() ) { + console.log('Starting install...'); + gulp.start('install'); + return; + } + else { + gulp.start('watch'); + } }; diff --git a/tasks/clean.js b/tasks/clean.js index b6ae511f9..2f73dc110 100644 --- a/tasks/clean.js +++ b/tasks/clean.js @@ -3,10 +3,14 @@ *******************************/ var + gulp = require('gulp'), + del = require('del'), config = require('./config/user'), tasks = require('./config/tasks'), + {series, parallel} = gulp, + clean ; @@ -17,4 +21,4 @@ clean = function(callback) { clean.displayName = 'clean'; clean.description = 'Cleans dist folder'; -module.exports = clean; +module.exports = series(clean); diff --git a/tasks/config/admin/github.js b/tasks/config/admin/github.js index 6f0f4c27e..a2c9e20bf 100644 --- a/tasks/config/admin/github.js +++ b/tasks/config/admin/github.js @@ -8,7 +8,7 @@ var fs = require('fs'), path = require('path'), - githubAPI = require('github'), + githubAPI = require('@octokit/rest'), // stores oauth info for GitHub API oAuthConfig = path.join(__dirname, 'oauth.js'), diff --git a/tasks/config/project/install.js b/tasks/config/project/install.js index 2d0f9848d..7a3b10e8d 100644 --- a/tasks/config/project/install.js +++ b/tasks/config/project/install.js @@ -353,56 +353,56 @@ module.exports = { // duplicated manually from tasks/defaults.js with additional property choices: [ - { name: "reset", checked: true }, - { name: "site", checked: true }, - { name: "button", checked: true }, - { name: "container", checked: true }, - { name: "divider", checked: true }, - { name: "flag", checked: true }, - { name: "header", checked: true }, - { name: "icon", checked: true }, - { name: "image", checked: true }, - { name: "input", checked: true }, - { name: "label", checked: true }, - { name: "list", checked: true }, - { name: "loader", checked: true }, - { name: "placeholder", checked: true }, - { name: "rail", checked: true }, - { name: "reveal", checked: true }, - { name: "segment", checked: true }, - { name: "step", checked: true }, - { name: "breadcrumb", checked: true }, - { name: "form", checked: true }, - { name: "grid", checked: true }, - { name: "menu", checked: true }, - { name: "message", checked: true }, - { name: "table", checked: true }, - { name: "ad", checked: true }, - { name: "card", checked: true }, - { name: "comment", checked: true }, - { name: "feed", checked: true }, - { name: "item", checked: true }, - { name: "statistic", checked: true }, - { name: "accordion", checked: true }, - { name: "checkbox", checked: true }, - { name: "dimmer", checked: true }, - { name: "dropdown", checked: true }, - { name: "embed", checked: true }, - { name: "modal", checked: true }, - { name: "nag", checked: true }, - { name: "popup", checked: true }, - { name: "progress", checked: true }, - { name: "rating", checked: true }, - { name: "search", checked: true }, - { name: "shape", checked: true }, - { name: "sidebar", checked: true }, - { name: "sticky", checked: true }, - { name: "tab", checked: true }, - { name: "transition", checked: true }, - { name: "api", checked: true }, - { name: "form", checked: true }, - { name: "state", checked: true }, - { name: "visibility", checked: true } + { name: 'reset', checked: true }, + { name: 'site', checked: true }, + { name: 'button', checked: true }, + { name: 'container', checked: true }, + { name: 'divider', checked: true }, + { name: 'flag', checked: true }, + { name: 'header', checked: true }, + { name: 'icon', checked: true }, + { name: 'image', checked: true }, + { name: 'input', checked: true }, + { name: 'label', checked: true }, + { name: 'list', checked: true }, + { name: 'loader', checked: true }, + { name: 'placeholder', checked: true }, + { name: 'rail', checked: true }, + { name: 'reveal', checked: true }, + { name: 'segment', checked: true }, + { name: 'step', checked: true }, + { name: 'breadcrumb', checked: true }, + { name: 'form', checked: true }, + { name: 'grid', checked: true }, + { name: 'menu', checked: true }, + { name: 'message', checked: true }, + { name: 'table', checked: true }, + { name: 'ad', checked: true }, + { name: 'card', checked: true }, + { name: 'comment', checked: true }, + { name: 'feed', checked: true }, + { name: 'item', checked: true }, + { name: 'statistic', checked: true }, + { name: 'accordion', checked: true }, + { name: 'checkbox', checked: true }, + { name: 'dimmer', checked: true }, + { name: 'dropdown', checked: true }, + { name: 'embed', checked: true }, + { name: 'modal', checked: true }, + { name: 'nag', checked: true }, + { name: 'popup', checked: true }, + { name: 'progress', checked: true }, + { name: 'rating', checked: true }, + { name: 'search', checked: true }, + { name: 'shape', checked: true }, + { name: 'sidebar', checked: true }, + { name: 'sticky', checked: true }, + { name: 'tab', checked: true }, + { name: 'transition', checked: true }, + { name: 'api', checked: true }, + { name: 'form', checked: true }, + { name: 'state', checked: true }, + { name: 'visibility', checked: true } ], when: when.notAuto }, diff --git a/tasks/config/project/release.js b/tasks/config/project/release.js index 865811d3a..2f784b71c 100644 --- a/tasks/config/project/release.js +++ b/tasks/config/project/release.js @@ -54,7 +54,7 @@ module.exports = { + ' * <%= repository %>' + '\n' + ' * <%= url %>' + '\n' + ' *' + '\n' - + ' * Copyright 2014 Contributors' + '\n' + + ' * Copyright ' + new Date().getFullYear() + ' Contributors' + '\n' + ' * Released under the MIT license' + '\n' + ' * http://opensource.org/licenses/MIT' + '\n' + ' *' + '\n' diff --git a/tasks/docs/build.js b/tasks/docs/build.js index 0a1fc222d..24ab02ce3 100644 --- a/tasks/docs/build.js +++ b/tasks/docs/build.js @@ -2,7 +2,7 @@ Build Docs *******************************/ -var +let gulp = require('gulp'), // node dependencies @@ -36,6 +36,8 @@ var // metadata parsing metadata = require('./metadata'), + {series, parallel} = gulp, + // shorthand globs, assets, @@ -82,7 +84,8 @@ buildDocs = function(callback) { gulp.src(config.paths.template.eco + globs.eco) .pipe(map(metadata.parser)) .on('end', function() { - fs.writeFile(output.metadata + '/metadata.json', JSON.stringify(metadata.result, null, 2)); + let jsonString = JSON.stringify(metadata.result, null, 2); + fs.writeFileSync(output.metadata + '/metadata.json', jsonString); }) ; @@ -193,4 +196,4 @@ buildDocs = function(callback) { /* Export with Metadata */ buildDocs.displayName = 'build-docs'; buildDocs.description = 'Build all files and add to SUI Docs'; -module.exports = buildDocs; +module.exports = series(buildDocs); diff --git a/tasks/docs/metadata.js b/tasks/docs/metadata.js index bfc86305d..b0497866e 100644 --- a/tasks/docs/metadata.js +++ b/tasks/docs/metadata.js @@ -3,14 +3,14 @@ Summarize Docs *******************************/ -var +let // node dependencies console = require('better-console'), fs = require('fs'), YAML = require('yamljs') ; -var data = {}; +let data = {}; /** * Test for prefix in string. @@ -20,7 +20,7 @@ var data = {}; */ function startsWith(str, prefix) { return str.indexOf(prefix) === 0; -}; +} function inArray(needle, haystack) { var length = haystack.length; @@ -48,7 +48,7 @@ function parser(file, callback) { try { - var + let /** @type {string} */ text = String(file.contents.toString('utf8')), lines = text.split('\n'), @@ -67,7 +67,7 @@ function parser(file, callback) { filename = filename.substring(position + key.length + 1, filename.length); - var + let lineCount = lines.length, active = false, yaml = [], diff --git a/tasks/docs/serve.js b/tasks/docs/serve.js index 295fc8922..e77f8e916 100644 --- a/tasks/docs/serve.js +++ b/tasks/docs/serve.js @@ -31,6 +31,8 @@ var configSetup = require('../config/project/config'), install = require('../config/project/install'), + {series, parallel} = gulp, + // shorthand banner = tasks.banner, comments = tasks.regExp.comments, @@ -42,6 +44,21 @@ var output, source, + watchSRC, + watchSRCCallback, + + watchExamples, + watchExamplesCallback, + + watchCSS, + watchCSSCallback, + + watchJS, + watchJSCallback, + + watchAssets, + watchAssetsCallback, + serveDocs ; @@ -63,10 +80,12 @@ serveDocs = function () { Copy Source ---------------*/ - gulp + watchSRC = gulp .watch([ 'src/**/*.*' - ], function(file) { + ]) + ; + watchSRCCallback = function(file) { console.clear(); return gulp.src(file.path, { base: 'src/' @@ -74,146 +93,160 @@ serveDocs = function () { .pipe(gulp.dest(output.less)) .pipe(print(log.created)) ; - }) + }; + watchSRC + .on('change', watchSRCCallback) + .on('add', watchSRCCallback) ; /*-------------- Copy Examples ---------------*/ - gulp + watchExamples = gulp .watch([ 'examples/**/*.*' - ], function(file) { - console.clear(); - return gulp.src(file.path, { - base: 'examples/' - }) - .pipe(gulp.dest(output.examples)) - .pipe(print(log.created)) - ; - }) + ]) + ; + + watchExamplesCallback = function(file) { + console.clear(); + return gulp.src(file.path, { + base: 'examples/' + }) + .pipe(gulp.dest(output.examples)) + .pipe(print(log.created)) + ; + }; + watchSRC + .on('change', watchExamplesCallback) + .on('add', watchExamplesCallback) ; + /*-------------- Watch CSS ---------------*/ - gulp + watchCSS = gulp .watch([ source.config, source.definitions + '/**/*.less', source.site + '/**/*.{overrides,variables}', source.themes + '/**/*.{overrides,variables}' - ], function(file) { - - var - lessPath, + ]) + ; + watchCSSCallback = function(file) { + let + lessPath, + + stream, + compressedStream, + uncompressedStream, + + isDefinition, + isPackagedTheme, + isSiteTheme, + isConfig + ; + + // log modified file + gulp.src(file.path) + .pipe(print(log.modified)) + ; + + /*-------------- + Find Source + ---------------*/ + + // recompile on *.override , *.variable change + isConfig = (file.path.indexOf('theme.config') !== -1 || file.path.indexOf('site.variables') !== -1); + isPackagedTheme = (file.path.indexOf(source.themes) !== -1); + isSiteTheme = (file.path.indexOf(source.site) !== -1); + isDefinition = (file.path.indexOf(source.definitions) !== -1); + + if(isConfig) { + // console.info('Rebuilding all files'); + // cant rebuild paths are wrong + // gulp.start('build-docs'); + return; + } + else if(isPackagedTheme) { + console.log('Change detected in packaged theme'); + lessPath = replaceExt(file.path, '.less'); + lessPath = lessPath.replace(tasks.regExp.theme, source.definitions); + } + else if(isSiteTheme) { + console.log('Change detected in site theme'); + lessPath = replaceExt(file.path, '.less'); + lessPath = lessPath.replace(source.site, source.definitions); + } + else { + console.log('Change detected in definition'); + lessPath = file.path; + } + + /*-------------- + Create CSS + ---------------*/ + + if( fs.existsSync(lessPath) ) { + + // unified css stream + stream = gulp.src(lessPath) + .pipe(plumber()) + .pipe(less(settings.less)) + .pipe(replace(comments.variables.in, comments.variables.out)) + .pipe(replace(comments.large.in, comments.large.out)) + .pipe(replace(comments.small.in, comments.small.out)) + .pipe(replace(comments.tiny.in, comments.tiny.out)) + .pipe(autoprefixer(settings.prefix)) + .pipe(gulpif(config.hasPermission, chmod(config.permission))) + ; - stream, - compressedStream, - uncompressedStream, + // use 2 concurrent streams from same pipe + uncompressedStream = stream.pipe(clone()); + compressedStream = stream.pipe(clone()); - isDefinition, - isPackagedTheme, - isSiteTheme, - isConfig + uncompressedStream + .pipe(plumber()) + .pipe(replace(assets.source, assets.uncompressed)) + .pipe(header(banner, settings.header)) + .pipe(gulp.dest(output.uncompressed)) + .pipe(print(log.created)) + .on('end', function() { + gulp.start('package uncompressed docs css'); + }) ; - // log modified file - gulp.src(file.path) - .pipe(print(log.modified)) + compressedStream + .pipe(plumber()) + .pipe(replace(assets.source, assets.compressed)) + .pipe(minifyCSS(settings.minify)) + .pipe(rename(settings.rename.minCSS)) + .pipe(header(banner, settings.header)) + .pipe(gulp.dest(output.compressed)) + .pipe(print(log.created)) + .on('end', function() { + gulp.start('package compressed docs css'); + }) ; - /*-------------- - Find Source - ---------------*/ - - // recompile on *.override , *.variable change - isConfig = (file.path.indexOf('theme.config') !== -1 || file.path.indexOf('site.variables') !== -1); - isPackagedTheme = (file.path.indexOf(source.themes) !== -1); - isSiteTheme = (file.path.indexOf(source.site) !== -1); - isDefinition = (file.path.indexOf(source.definitions) !== -1); - - if(isConfig) { - // console.info('Rebuilding all files'); - // cant rebuild paths are wrong - // gulp.start('build-docs'); - return; - } - else if(isPackagedTheme) { - console.log('Change detected in packaged theme'); - lessPath = replaceExt(file.path, '.less'); - lessPath = lessPath.replace(tasks.regExp.theme, source.definitions); - } - else if(isSiteTheme) { - console.log('Change detected in site theme'); - lessPath = replaceExt(file.path, '.less'); - lessPath = lessPath.replace(source.site, source.definitions); - } - else { - console.log('Change detected in definition'); - lessPath = file.path; - } - - /*-------------- - Create CSS - ---------------*/ - - if( fs.existsSync(lessPath) ) { - - // unified css stream - stream = gulp.src(lessPath) - .pipe(plumber()) - .pipe(less(settings.less)) - .pipe(replace(comments.variables.in, comments.variables.out)) - .pipe(replace(comments.large.in, comments.large.out)) - .pipe(replace(comments.small.in, comments.small.out)) - .pipe(replace(comments.tiny.in, comments.tiny.out)) - .pipe(autoprefixer(settings.prefix)) - .pipe(gulpif(config.hasPermission, chmod(config.permission))) - ; - - // use 2 concurrent streams from same pipe - uncompressedStream = stream.pipe(clone()); - compressedStream = stream.pipe(clone()); - - uncompressedStream - .pipe(plumber()) - .pipe(replace(assets.source, assets.uncompressed)) - .pipe(header(banner, settings.header)) - .pipe(gulp.dest(output.uncompressed)) - .pipe(print(log.created)) - .on('end', function() { - gulp.start('package uncompressed docs css'); - }) - ; - - compressedStream - .pipe(plumber()) - .pipe(replace(assets.source, assets.compressed)) - .pipe(minifyCSS(settings.minify)) - .pipe(rename(settings.rename.minCSS)) - .pipe(header(banner, settings.header)) - .pipe(gulp.dest(output.compressed)) - .pipe(print(log.created)) - .on('end', function() { - gulp.start('package compressed docs css'); - }) - ; - - } - else { - console.log('Cannot find UI definition at path', lessPath); - } - }) + } + else { + console.log('Cannot find UI definition at path', lessPath); + } + }; + watchCSS + .on('add', watchCSSCallback) + .on('change', watchCSSCallback) ; /*-------------- Watch JS ---------------*/ - gulp + watchJS = gulp .watch([ source.definitions + '/**/*.js' ], function(file) { @@ -234,22 +267,32 @@ serveDocs = function () { }) ; + watchJS + .on('add', watchJSCallback) + .on('change', watchJSCallback) + ; + /*-------------- Watch Assets ---------------*/ // only copy assets that match component names (or their plural) - gulp + watchAssets = gulp .watch([ source.themes + '/**/assets/**/' + globs.components + '?(s).*' - ], function(file) { - // copy assets - gulp.src(file.path, { base: source.themes }) - .pipe(gulpif(config.hasPermission, chmod(config.permission))) - .pipe(gulp.dest(output.themes)) - .pipe(print(log.created)) - ; - }) + ]) + ; + // copy assets + watchAssetsCallback = function(file) { + gulp.src(file.path, { base: source.themes }) + .pipe(gulpif(config.hasPermission, chmod(config.permission))) + .pipe(gulp.dest(output.themes)) + .pipe(print(log.created)) + ; + }; + watchAssets + .on('add', watchAssetsCallback) + .on('change', watchAssetsCallback) ; diff --git a/tasks/rtl/watch.js b/tasks/rtl/watch.js index abc55ea7b..8d9b39d6c 100644 --- a/tasks/rtl/watch.js +++ b/tasks/rtl/watch.js @@ -2,7 +2,7 @@ Watch Task *******************************/ -var +let gulp = require('gulp'), // node deps @@ -42,7 +42,16 @@ var log = tasks.log, settings = tasks.settings, - watchRTL + watchRTL, + + // individual watch tasks + watchCSS, + watchJS, + watchAssets, + + watchCSSCallback, + watchJSCallback, + watchAssetsCallback ; @@ -71,7 +80,7 @@ watchRTL = function(callback) { source.themes + '/**/*.{overrides,variables}' ], function(file) { - var + let lessPath, stream, diff --git a/tasks/version.js b/tasks/version.js index 832a22854..adce62f2c 100644 --- a/tasks/version.js +++ b/tasks/version.js @@ -3,7 +3,10 @@ *******************************/ let + gulp = require('gulp'), release = require('./config/project/release'), + + {series, parallel} = gulp, version ; @@ -14,4 +17,4 @@ version = function(callback) { /* Export with Metadata */ version.displayName = 'version'; version.description = 'Displays current version of Semantic'; -module.exports = version; +module.exports = series(version); diff --git a/tasks/watch.js b/tasks/watch.js index 94f1c9154..e84993a77 100644 --- a/tasks/watch.js +++ b/tasks/watch.js @@ -41,6 +41,8 @@ let log = tasks.log, settings = tasks.settings, + {series, parallel} = gulp, + watch, // individual watch tasks @@ -199,7 +201,6 @@ watch = function(callback) { watchCSS .on('change', watchCSSCallback) .on('add', watchCSSCallback) - .close() ; /*-------------- @@ -232,7 +233,6 @@ watch = function(callback) { watchJS .on('change', watchJSCallback) .on('add', watchJSCallback) - .close() ; /*-------------- @@ -256,14 +256,12 @@ watch = function(callback) { watchAssets .on('change', watchAssetsCallback) .on('add', watchAssetsCallback) - .close() ; - }; /* Export with Metadata */ watch.displayName = 'watch'; watch.description = 'Watch for site/theme changes'; -module.exports = watch; +module.exports = series(watch);