diff --git a/.gitignore b/.gitignore index b036733..79ad53c 100755 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ /npm-debug.log* /yarn-error.log /package-lock.json +/.deploy_git # production /dist diff --git a/package.json b/package.json index b59f0bd..5ab1494 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,8 @@ "scripts": { "start": "umi dev", "build": "umi build", + "pub": "node scripts/pub.js", + "all": "npm run build && npm run pub", "test": "umi test", "lint:es": "eslint --ext .js src mock tests", "lint:ts": "tslint \"src/**/*.ts\" \"src/**/*.tsx\"" @@ -31,15 +33,21 @@ "@types/react-dom": "^16.9.0", "@types/react-test-renderer": "^16.0.3", "babel-eslint": "^10.0.2", + "bluebird": "^3.5.5", + "chalk": "^2.4.2", "eslint": "^6.2.1", "eslint-config-umi": "^1.5.0", "eslint-plugin-flowtype": "^4.2.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-react": "^7.11.1", + "hexo-fs": "^2.0.0", + "hexo-util": "^1.0.0", "husky": "^3.0.4", "lint-staged": "^9.2.3", + "moment": "^2.24.0", "react-test-renderer": "^16.7.0", + "swig-templates": "^2.0.3", "tslint": "^5.19.0", "tslint-eslint-rules": "^5.4.0", "tslint-react": "^4.0.0", diff --git a/scripts/config.js b/scripts/config.js new file mode 100644 index 0000000..a620c58 --- /dev/null +++ b/scripts/config.js @@ -0,0 +1,45 @@ +'use strict'; + +const rRepoURL = /^(?:(?:git|https?|git\+https|git\+ssh):\/\/)?(?:[^@]+@)?([^\/]+?)[\/:](.+?)\.git$/; // eslint-disable-line no-useless-escape +const rGithubPage = /\.github\.(io|com)$/; + +function parseRepo(repo) { + const split = repo.split(','); + const url = split.shift(); + let branch = split[0]; + + if (!branch && rRepoURL.test(url)) { + const match = url.match(rRepoURL); + const host = match[1]; + const path = match[2]; + + if (host === 'github.com') { + branch = rGithubPage.test(path) ? 'master' : 'gh-pages'; + } else if (host === 'coding.net') { + branch = 'coding-pages'; + } + } + + return { + url: url, + branch: branch || 'master' + }; +} + +module.exports = function(args) { + const repo = args.repo || args.repository; + if (!repo) throw new TypeError('repo is required!'); + + if (typeof repo === 'string') { + const data = parseRepo(repo); + data.branch = args.branch || data.branch; + + return [data]; + } + + const result = Object.keys(repo).map(key => { + return parseRepo(repo[key]); + }); + + return result; +}; diff --git a/scripts/pub.js b/scripts/pub.js new file mode 100644 index 0000000..9a8fe00 --- /dev/null +++ b/scripts/pub.js @@ -0,0 +1,161 @@ +'use strict'; + +const pathFn = require('path'); +const fs = require('hexo-fs'); +const chalk = require('chalk'); +const swig = require('swig-templates'); +const moment = require('moment'); +const Promise = require('bluebird'); +const spawn = require('hexo-util/lib/spawn'); +const parseConfig = require('./config'); + +const swigHelpers = { + now: function(format) { + return moment().format(format); + } +}; + +const args = { + repo: 'git@github.com:fivapp/fivapp.github.io.git', + name: 'Limo Saplf', + email: 'limosaplf@gmail.com', +}; + +function exec() { + const baseDir = ''; + const deployDir = pathFn.join(baseDir, '.deploy_git'); + const publicDir = 'dist'; + let extendDirs = args.extend_dirs; + const ignoreHidden = args.ignore_hidden; + const ignorePattern = args.ignore_pattern; + const message = commitMessage(args); + const verbose = !args.silent; + + if (!args.repo && process.env.HEXO_DEPLOYER_REPO) { + args.repo = process.env.HEXO_DEPLOYER_REPO; + } + + if (!args.repo && !args.repository) { + let help = ''; + + help += 'You have to configure the deployment settings in _config.yml first!\n\n'; + help += 'Example:\n'; + help += ' deploy:\n'; + help += ' type: git\n'; + help += ' repo: \n'; + help += ' branch: [branch]\n'; + help += ' message: [message]\n\n'; + help += ' extend_dirs: [extend directory]\n\n'; + help += 'For more help, you can check the docs: ' + chalk.underline('http://hexo.io/docs/deployment.html'); + + console.log(help); + return; + } + + function git(...args) { + return spawn('git', args, { + cwd: deployDir, + verbose: verbose, + stdio: 'inherit' + }); + } + + function setup() { + const userName = args.name || args.user || args.userName || ''; + const userEmail = args.email || args.userEmail || ''; + + // Create a placeholder for the first commit + return fs.writeFile(pathFn.join(deployDir, 'placeholder'), '').then(() => { + return git('init'); + }).then(() => { + return userName && git('config', 'user.name', userName); + }).then(() => { + return userEmail && git('config', 'user.email', userEmail); + }).then(() => { + return git('add', '-A'); + }).then(() => { + return git('commit', '-m', 'First commit'); + }); + } + + function push(repo) { + return git('add', '-A').then(() => { + return git('commit', '-m', message).catch(() => { + // Do nothing. It's OK if nothing to commit. + }); + }).then(() => { + return git('push', '-u', repo.url, 'HEAD:' + repo.branch, '--force'); + }); + } + + return fs.exists(deployDir).then(function(exist) { + if (exist) return; + + // log.info('Setting up Git deployment...'); + return setup(); + }).then(() => { + // log.info('Clearing .deploy_git folder...'); + return fs.emptyDir(deployDir); + }).then(() => { + const opts = {}; + // log.info('Copying files from public folder...'); + if (typeof ignoreHidden === 'object') { + opts.ignoreHidden = ignoreHidden.public; + } else { + opts.ignoreHidden = ignoreHidden; + } + + if (typeof ignorePattern === 'string') { + opts.ignorePattern = new RegExp(ignorePattern); + } else if (typeof ignorePattern === 'object' && Reflect.apply(Object.prototype.hasOwnProperty, ignorePattern, ['public'])) { + opts.ignorePattern = new RegExp(ignorePattern.public); + } + + return fs.copyDir(publicDir, deployDir, opts); + }).then(() => { + // log.info('Copying files from extend dirs...'); + + if (!extendDirs) { + return; + } + + if (typeof extendDirs === 'string') { + extendDirs = [extendDirs]; + } + + const mapFn = function(dir) { + const opts = {}; + const extendPath = pathFn.join(baseDir, dir); + const extendDist = pathFn.join(deployDir, dir); + + if (typeof ignoreHidden === 'object') { + opts.ignoreHidden = ignoreHidden[dir]; + } else { + opts.ignoreHidden = ignoreHidden; + } + + if (typeof ignorePattern === 'string') { + opts.ignorePattern = new RegExp(ignorePattern); + } else if (typeof ignorePattern === 'object' && Reflect.apply(Object.prototype.hasOwnProperty, ignorePattern, [dir])) { + opts.ignorePattern = new RegExp(ignorePattern[dir]); + } + + return fs.copyDir(extendPath, extendDist, opts); + }; + + return Promise.map(extendDirs, mapFn, { + concurrency: 2 + }); + }).then(() => { + return parseConfig(args); + }).each(function(repo) { + return push(repo); + }); +}; + +function commitMessage(args) { + const message = args.m || args.msg || args.message || 'Site updated: {{ now(\'YYYY-MM-DD HH:mm:ss\') }}'; + return swig.compile(message)(swigHelpers); +} + +exec(); diff --git a/yarn.lock b/yarn.lock index 3f657a1..b0a1457 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2155,6 +2155,15 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +align-text@^0.1.1, align-text@^0.1.3: + version "0.1.4" + resolved "https://registry.npm.taobao.org/align-text/download/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" + integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= + dependencies: + kind-of "^3.0.2" + longest "^1.0.1" + repeat-string "^1.5.2" + alphanum-sort@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" @@ -2577,6 +2586,11 @@ async@^2.6.2: dependencies: lodash "^4.17.14" +async@~0.2.6: + version "0.2.10" + resolved "https://registry.npm.taobao.org/async/download/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" + integrity sha1-trvgsGdLnXGXCMo43owjfLUmw9E= + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -2965,11 +2979,16 @@ binaryextensions@^2.1.2: resolved "https://registry.yarnpkg.com/binaryextensions/-/binaryextensions-2.1.2.tgz#c83c3d74233ba7674e4f313cb2a2b70f54e94b7c" integrity sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg== -bluebird@^3.5.1, bluebird@^3.5.5: +bluebird@^3.5.1, bluebird@^3.5.2: version "3.5.5" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== +bluebird@^3.5.5: + version "3.5.5" + resolved "https://registry.npm.taobao.org/bluebird/download/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" + integrity sha1-qNCv1zJR7/u9X+OEp31zADwXpx8= + bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" @@ -3345,6 +3364,11 @@ camelcase-keys@^4.0.0: map-obj "^2.0.0" quick-lru "^1.0.0" +camelcase@^1.0.2: + version "1.2.1" + resolved "https://registry.npm.taobao.org/camelcase/download/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= + camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" @@ -3405,6 +3429,14 @@ ccount@^1.0.0: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.4.tgz#9cf2de494ca84060a2a8d2854edd6dfb0445f386" integrity sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w== +center-align@^0.1.1: + version "0.1.3" + resolved "https://registry.npm.taobao.org/center-align/download/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" + integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= + dependencies: + align-text "^0.1.3" + lazy-cache "^1.0.3" + chalk@2.4.2, chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" @@ -3467,7 +3499,7 @@ cheerio@1.0.0-rc.3, cheerio@^1.0.0-rc.2: lodash "^4.15.0" parse5 "^3.0.1" -chokidar@3.0.2: +chokidar@3.0.2, chokidar@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.0.2.tgz#0d1cd6d04eb2df0327446188cd13736a3367d681" integrity sha512-c4PR2egjNjI1um6bamCQ6bUNPDiyofNQruHvKgHQ4gDUP/ITSVSzNsiI5OWtHOsX323i5ha/kk4YmOZ1Ktg7KA== @@ -3612,6 +3644,15 @@ clipboardy@2.1.0: arch "^2.1.1" execa "^1.0.0" +cliui@^2.1.0: + version "2.1.0" + resolved "https://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" + integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= + dependencies: + center-align "^0.1.1" + right-align "^0.1.1" + wordwrap "0.0.2" + cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -4479,7 +4520,7 @@ decamelize-keys@^1.0.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.2.0: +decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -5222,6 +5263,11 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= +escape-string-regexp@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" + integrity sha1-owME6Z2qMuI7L9IPUbq9B8/8o0Q= + escodegen@^1.11.1, escodegen@^1.9.1: version "1.12.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.12.0.tgz#f763daf840af172bb3a2b6dd7219c0e17f7ff541" @@ -6973,6 +7019,33 @@ hex-color-regex@^1.1.0: resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== +hexo-fs@^2.0.0: + version "2.0.0" + resolved "https://registry.npm.taobao.org/hexo-fs/download/hexo-fs-2.0.0.tgz#0bc421bc0c975a85a25061aca9537fb59292d279" + integrity sha1-C8QhvAyXWoWiUGGsqVN/tZKS0nk= + dependencies: + bluebird "^3.5.1" + chokidar "^3.0.0" + escape-string-regexp "^2.0.0" + graceful-fs "^4.1.11" + +hexo-util@^1.0.0: + version "1.0.0" + resolved "https://registry.npm.taobao.org/hexo-util/download/hexo-util-1.0.0.tgz#2545efcd66e345ef92fe48a73a35470cd65f0b2a" + integrity sha1-JUXvzWbjRe+S/kinOjVHDNZfCyo= + dependencies: + bluebird "^3.5.2" + camel-case "^3.0.0" + cross-spawn "^6.0.5" + highlight.js "^9.13.1" + html-entities "^1.2.1" + striptags "^3.1.1" + +highlight.js@^9.13.1: + version "9.15.10" + resolved "https://registry.npm.taobao.org/highlight.js/download/highlight.js-9.15.10.tgz#7b18ed75c90348c045eef9ed08ca1319a2219ad2" + integrity sha1-exjtdckDSMBF7vntCMoTGaIhmtI= + history@^4.7.2: version "4.9.0" resolved "https://registry.yarnpkg.com/history/-/history-4.9.0.tgz#84587c2068039ead8af769e9d6a6860a14fa1bca" @@ -7060,7 +7133,7 @@ html-encoding-sniffer@^1.0.2: dependencies: whatwg-encoding "^1.0.1" -html-entities@^1.2.0: +html-entities@^1.2.0, html-entities@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8= @@ -9195,6 +9268,11 @@ longest-streak@^2.0.1: resolved "https://registry.yarnpkg.com/longest-streak/-/longest-streak-2.0.3.tgz#3de7a3f47ee18e9074ded8575b5c091f5d0a4105" integrity sha512-9lz5IVdpwsKLMzQi0MQ+oD9EA0mIGcWYP7jXMTZVXP8D42PwuAk+M/HBFYQoxt1G5OR8m7aSIgb1UymfWGBWEw== +longest@^1.0.1: + version "1.0.1" + resolved "https://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= + loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -9693,11 +9771,16 @@ mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@ dependencies: minimist "0.0.8" -moment@2.x, moment@^2.22.1, moment@^2.24.0: +moment@2.x, moment@^2.22.1: version "2.24.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== +moment@^2.24.0: + version "2.24.0" + resolved "https://registry.npm.taobao.org/moment/download/moment-2.24.0.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmoment%2Fdownload%2Fmoment-2.24.0.tgz#0d055d53f5052aa653c9f6eb68bb5d12bf5c2b5b" + integrity sha1-DQVdU/UFKqZTyfbraLtdEr9cK1s= + moo@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/moo/-/moo-0.4.3.tgz#3f847a26f31cf625a956a87f2b10fbc013bfd10e" @@ -10279,7 +10362,7 @@ opn@^5.1.0: dependencies: is-wsl "^1.1.0" -optimist@^0.6.1: +optimist@^0.6.1, optimist@~0.6: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= @@ -12763,7 +12846,7 @@ repeat-element@^1.1.2: resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" integrity sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== -repeat-string@^1.5.4, repeat-string@^1.6.1: +repeat-string@^1.5.2, repeat-string@^1.5.4, repeat-string@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= @@ -12961,6 +13044,13 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= +right-align@^0.1.1: + version "0.1.3" + resolved "https://registry.npm.taobao.org/right-align/download/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" + integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= + dependencies: + align-text "^0.1.1" + rimraf@2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -13630,7 +13720,7 @@ source-map@0.5.6: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= -source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6: +source-map@^0.5.0, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -14042,6 +14132,11 @@ strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= +striptags@^3.1.1: + version "3.1.1" + resolved "https://registry.npm.taobao.org/striptags/download/striptags-3.1.1.tgz#c8c3e7fdd6fb4bb3a32a3b752e5b5e3e38093ebd" + integrity sha1-yMPn/db7S7OjKjt1LltePjgJPr0= + style-loader@0.23.1: version "0.23.1" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.1.tgz#cb9154606f3e771ab6c4ab637026a1049174d925" @@ -14312,6 +14407,14 @@ svgo@^1.0.0, svgo@^1.1.1: unquote "~1.1.1" util.promisify "~1.0.0" +swig-templates@^2.0.3: + version "2.0.3" + resolved "https://registry.npm.taobao.org/swig-templates/download/swig-templates-2.0.3.tgz#6b4c43b462175df2a8da857a2043379ec6ea6fd0" + integrity sha1-a0xDtGIXXfKo2oV6IEM3nsbqb9A= + dependencies: + optimist "~0.6" + uglify-js "2.6.0" + sylvanas@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/sylvanas/-/sylvanas-0.4.1.tgz#6cd036d40d6f54b2e5786d40f227ad37c6128a78" @@ -14836,6 +14939,16 @@ uglify-es@^3.3.4: commander "~2.13.0" source-map "~0.6.1" +uglify-js@2.6.0: + version "2.6.0" + resolved "https://registry.npm.taobao.org/uglify-js/download/uglify-js-2.6.0.tgz#25eaa1cc3550e39410ceefafd1cfbb6b6d15f001" + integrity sha1-JeqhzDVQ45QQzu+v0c+7a20V8AE= + dependencies: + async "~0.2.6" + source-map "~0.5.1" + uglify-to-browserify "~1.0.0" + yargs "~3.10.0" + uglify-js@^3.1.4, uglify-js@^3.5.1: version "3.6.0" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" @@ -14844,6 +14957,11 @@ uglify-js@^3.1.4, uglify-js@^3.5.1: commander "~2.20.0" source-map "~0.6.1" +uglify-to-browserify@~1.0.0: + version "1.0.2" + resolved "https://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" + integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= + uglifyjs-webpack-plugin@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz#75f548160858163a08643e086d5fefe18a5d67de" @@ -15910,6 +16028,11 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= + with-open-file@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/with-open-file/-/with-open-file-0.1.6.tgz#0bc178ecab75f6baac8ae11c85e07445d690ea50" @@ -15919,6 +16042,11 @@ with-open-file@^0.1.6: p-try "^2.1.0" pify "^4.0.1" +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" + integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= + wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" @@ -16253,6 +16381,16 @@ yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.1" +yargs@~3.10.0: + version "3.10.0" + resolved "https://registry.npm.taobao.org/yargs/download/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" + integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= + dependencies: + camelcase "^1.0.2" + cliui "^2.1.0" + decamelize "^1.0.0" + window-size "0.1.0" + yeoman-environment@^2.3.4: version "2.4.0" resolved "https://registry.yarnpkg.com/yeoman-environment/-/yeoman-environment-2.4.0.tgz#4829445dc1306b02d9f5f7027cd224bf77a8224d"