-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(jetbrains): 嘗試支援透過 jetbrains plugin eap channel 來安裝此語言包
- Loading branch information
1 parent
2318dcf
commit 4dc5acb
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<plugins> | ||
<plugin | ||
id="com.intellij.zh-tw" | ||
url="https://github.com/bluelovers/idea-l10n-zht/raw/master/plugin-dev-out/zh.jar" | ||
version="222.84"> | ||
<idea-version since-build="222.0" /> | ||
</plugin> | ||
<plugin | ||
id="sc.plugin.com.intellij.zh-tw" | ||
url="https://github.com/bluelovers/idea-l10n-zht/raw/master/plugin-dev-out/zh.jar" | ||
version="222.84"> | ||
<idea-version since-build="222.0" /> | ||
</plugin> | ||
</plugins> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import Bluebird from 'bluebird'; | ||
import { outputFile } from 'fs-extra'; | ||
import { join } from 'upath2'; | ||
import { __root } from '../../test/__root'; | ||
|
||
/** | ||
* @see https://plugins.jetbrains.com/docs/intellij/update-plugins-format.html#format-of-updatepluginsxml-file | ||
* @see https://www.jetbrains.com/help/idea/2016.3/adding-plugins-to-enterprise-repositories.html | ||
* @see https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000113284-EAP-channel-for-plugins | ||
*/ | ||
export default Bluebird.resolve() | ||
.then(async () => | ||
{ | ||
const { version_map_record } = await import('../../lib/const/version-map.json'); | ||
const { __plugin_zh_cn_version } = await import('../../lib/const/link-of-zh-cn'); | ||
|
||
const { since } = version_map_record[__plugin_zh_cn_version]; | ||
|
||
const href = `https://github.com/bluelovers/idea-l10n-zht/raw/master/plugin-dev-out/zh.jar`; | ||
|
||
return outputFile(join(__root, 'plugin-dev-out', 'updatePlugins.xml'), `<?xml version="1.0" encoding="UTF-8"?> | ||
<plugins> | ||
<plugin | ||
id="com.intellij.zh-tw" | ||
url="${href}" | ||
version="${__plugin_zh_cn_version}"> | ||
<idea-version since-build="${since}" /> | ||
</plugin> | ||
<plugin | ||
id="sc.plugin.com.intellij.zh-tw" | ||
url="${href}" | ||
version="${__plugin_zh_cn_version}"> | ||
<idea-version since-build="${since}" /> | ||
</plugin> | ||
</plugins>`) | ||
}) | ||
; |