Skip to content

Commit 6d049d3

Browse files
committed
back to global var
1 parent ff3adc9 commit 6d049d3

File tree

4 files changed

+88
-83
lines changed

4 files changed

+88
-83
lines changed

generators/app/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const { existsSync } = require('fs');
1212
// Is there a newer version of this generator?
1313
updateNotifier({ pkg: pkg }).notify();
1414

15+
const hljsDir = getModuleDir();
16+
1517
function getModuleDir() {
1618
const npmDir = join(globalModules, 'highlight.js');
1719

@@ -25,11 +27,11 @@ function getModuleDir() {
2527
return yarnDir;
2628
}
2729

28-
return process.cwd();
30+
throw 'highlight.js not found in global modules';
2931
}
3032

3133
function getLanguages() {
32-
const languagesPath = join(getModuleDir(), 'src', 'languages');
34+
const languagesPath = join(hljsDir, 'src', 'languages');
3335

3436
return globby(`${languagesPath}/*.js`).then( longPaths => {
3537
const languages = longPaths.map( longPath => {

package-lock.json

Lines changed: 50 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dependencies": {
2525
"global-modules": "^1.0.0",
2626
"globby": "^8.0.1",
27-
"highlight.js": "highlightjs/highlight.js#9.12.0",
27+
"highlight.js": "highlightjs/highlight.js#9.13.1",
2828
"update-notifier": "^2.5.0",
2929
"yarn-global-modules": "^1.0.1",
3030
"yeoman-generator": "^3.1.1",

yarn.lock

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,7 @@ acorn@^5.0.3, acorn@^5.6.0:
115115
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
116116
integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==
117117

118-
ajv-keywords@^3.0.0:
119-
version "3.2.0"
120-
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a"
121-
integrity sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=
122-
123-
ajv@^6.0.1, ajv@^6.5.3:
118+
ajv@^6.5.3:
124119
version "6.5.4"
125120
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.5.4.tgz#247d5274110db653706b550fcc2b797ca28cfc59"
126121
integrity sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==
@@ -602,6 +597,13 @@ debug@^3.1.0:
602597
dependencies:
603598
ms "^2.1.1"
604599

600+
debug@^4.0.1:
601+
version "4.1.0"
602+
resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87"
603+
integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==
604+
dependencies:
605+
ms "^2.1.1"
606+
605607
decode-uri-component@^0.2.0:
606608
version "0.2.0"
607609
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
@@ -752,16 +754,16 @@ eslint-visitor-keys@^1.0.0:
752754
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
753755
integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==
754756

755-
eslint@^5.6.0:
756-
version "5.6.0"
757-
resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.6.0.tgz#b6f7806041af01f71b3f1895cbb20971ea4b6223"
758-
integrity sha512-/eVYs9VVVboX286mBK7bbKnO1yamUy2UCRjiY6MryhQL2PaaXCExsCQ2aO83OeYRhU2eCU/FMFP+tVMoOrzNrA==
757+
eslint@^5.7.0:
758+
version "5.7.0"
759+
resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.7.0.tgz#55c326d6fb2ad45fcbd0ce17c3846f025d1d819c"
760+
integrity sha512-zYCeFQahsxffGl87U2aJ7DPyH8CbWgxBC213Y8+TCanhUTf2gEvfq3EKpHmEcozTLyPmGe9LZdMAwC/CpJBM5A==
759761
dependencies:
760762
"@babel/code-frame" "^7.0.0"
761763
ajv "^6.5.3"
762764
chalk "^2.1.0"
763765
cross-spawn "^6.0.5"
764-
debug "^3.1.0"
766+
debug "^4.0.1"
765767
doctrine "^2.1.0"
766768
eslint-scope "^4.0.0"
767769
eslint-utils "^1.3.1"
@@ -788,12 +790,12 @@ eslint@^5.6.0:
788790
path-is-inside "^1.0.2"
789791
pluralize "^7.0.0"
790792
progress "^2.0.0"
791-
regexpp "^2.0.0"
793+
regexpp "^2.0.1"
792794
require-uncached "^1.0.3"
793795
semver "^5.5.1"
794796
strip-ansi "^4.0.0"
795797
strip-json-comments "^2.0.1"
796-
table "^4.0.3"
798+
table "^5.0.2"
797799
text-table "^0.2.0"
798800

799801
espree@^4.0.0:
@@ -1236,9 +1238,9 @@ has-values@^1.0.0:
12361238
is-number "^3.0.0"
12371239
kind-of "^4.0.0"
12381240

1239-
highlight.js@highlightjs/highlight.js#9.12.0:
1240-
version "9.12.0"
1241-
resolved "https://codeload.github.com/highlightjs/highlight.js/tar.gz/16ab6f3b5f9a432e6e8825807103b6bb5cefef15"
1241+
highlight.js@highlightjs/highlight.js#9.13.1:
1242+
version "9.13.1"
1243+
resolved "https://codeload.github.com/highlightjs/highlight.js/tar.gz/93cc723bac055240bc7c3559d907b6a9ab4ee326"
12421244

12431245
homedir-polyfill@^1.0.1:
12441246
version "1.0.1"
@@ -1252,10 +1254,10 @@ hosted-git-info@^2.1.4:
12521254
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
12531255
integrity sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==
12541256

1255-
husky@^1.0.1:
1256-
version "1.0.1"
1257-
resolved "https://registry.yarnpkg.com/husky/-/husky-1.0.1.tgz#749bc6b3a14bdc9cab73d8cc827b92fcd691fac6"
1258-
integrity sha512-MxwLwwwgY7mqV4auSpGWKPTCkZ9RmsdGojQQBvRtr6vxnjSOyI5l/M58QdUz0vRKb0igTpbzBeoUsScx4XJwQg==
1257+
husky@^1.1.2:
1258+
version "1.1.2"
1259+
resolved "https://registry.yarnpkg.com/husky/-/husky-1.1.2.tgz#574c2bb16958db8a8120b63306efaff110525c23"
1260+
integrity sha512-9TdkUpBeEOjz0AnFdUN4i3w8kEbOsVs9/WSeJqWLq2OO6bcKQhVW64Zi+pVd/AMRLpN3QTINb6ZXiELczvdmqQ==
12591261
dependencies:
12601262
cosmiconfig "^5.0.6"
12611263
execa "^0.9.0"
@@ -1694,7 +1696,7 @@ locate-path@^3.0.0:
16941696
p-locate "^3.0.0"
16951697
path-exists "^3.0.0"
16961698

1697-
lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.4, lodash@^4.17.5:
1699+
lodash@^4.17.10, lodash@^4.17.2, lodash@^4.17.5:
16981700
version "4.17.11"
16991701
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
17001702
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
@@ -2222,10 +2224,10 @@ regex-not@^1.0.0, regex-not@^1.0.2:
22222224
extend-shallow "^3.0.2"
22232225
safe-regex "^1.1.0"
22242226

2225-
regexpp@^2.0.0:
2226-
version "2.0.0"
2227-
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.0.tgz#b2a7534a85ca1b033bcf5ce9ff8e56d4e0755365"
2228-
integrity sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==
2227+
regexpp@^2.0.1:
2228+
version "2.0.1"
2229+
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
2230+
integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
22292231

22302232
registry-auth-token@^3.0.1:
22312233
version "3.3.2"
@@ -2623,15 +2625,13 @@ supports-color@^5.3.0:
26232625
dependencies:
26242626
has-flag "^3.0.0"
26252627

2626-
table@^4.0.3:
2627-
version "4.0.3"
2628-
resolved "http://registry.npmjs.org/table/-/table-4.0.3.tgz#00b5e2b602f1794b9acaf9ca908a76386a7813bc"
2629-
integrity sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==
2628+
table@^5.0.2:
2629+
version "5.1.0"
2630+
resolved "https://registry.yarnpkg.com/table/-/table-5.1.0.tgz#69a54644f6f01ad1628f8178715b408dc6bf11f7"
2631+
integrity sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==
26302632
dependencies:
2631-
ajv "^6.0.1"
2632-
ajv-keywords "^3.0.0"
2633-
chalk "^2.1.0"
2634-
lodash "^4.17.4"
2633+
ajv "^6.5.3"
2634+
lodash "^4.17.10"
26352635
slice-ansi "1.0.0"
26362636
string-width "^2.1.1"
26372637

0 commit comments

Comments
 (0)