Skip to content

Commit 7ccd66e

Browse files
committed
Replace Select2 for Tom Select
1 parent f0f9bcb commit 7ccd66e

File tree

9 files changed

+194
-127
lines changed

9 files changed

+194
-127
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ module.exports = {
178178
GURPS: false,
179179
JournalTextPageSheet: false,
180180
ProseMirror: false,
181+
TomSelect: false,
181182
Tour: false,
182183
},
183184

gulpfile.mjs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,20 @@ async function copyFiles() {
7474
}
7575
}
7676

77-
function select2() {
78-
return gulp.src(["node_modules/select2/dist/js/select2.min.js", "node_modules/select2/dist/css/select2.min.css"]).pipe(gulp.dest("dist/lib/select2"));
77+
function tomSelect() {
78+
return gulp.src([
79+
"node_modules/tom-select/dist/js/tom-select.complete.min.js",
80+
"node_modules/tom-select/dist/js/tom-select.complete.min.js.map",
81+
"node_modules/tom-select/dist/css/tom-select.min.css",
82+
"node_modules/tom-select/dist/css/tom-select.min.css.map",
83+
]).pipe(gulp.dest("dist/lib/tom-select"));;
7984
}
8085

8186
/**
8287
* Watch for changes for each build step
8388
*/
8489
export function watch() {
85-
select2();
90+
tomSelect();
8691
gulp.watch(`${sourceDirectory}/**/*.${sourceFileExtension}`, { ignoreInitial: false }, buildCode);
8792
gulp.watch(`${stylesDirectory}/**/*.${stylesExtension}`, { ignoreInitial: false }, buildStyles);
8893
gulp.watch(
@@ -92,7 +97,7 @@ export function watch() {
9297
);
9398
}
9499

95-
export const build = gulp.series(clean, gulp.parallel(buildCode, buildStyles, select2, copyFiles));
100+
export const build = gulp.series(clean, gulp.parallel(buildCode, buildStyles, tomSelect, copyFiles));
96101

97102
/********************/
98103
/* CLEAN */

package-lock.json

Lines changed: 61 additions & 13 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
@@ -22,7 +22,7 @@
2222
"husky": "^8.0.3",
2323
"lint-staged": "^14.0.1",
2424
"rollup": "^2.79.2",
25-
"select2": "^4.1.0-rc.0",
25+
"tom-select": "^2.4.3",
2626
"vinyl-buffer": "^1.0.1",
2727
"vinyl-source-stream": "^2.0.0",
2828
"yargs": "^17.7.2"

src/lang/en.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"Font": "Font",
1313
"Fonts": "Fonts",
1414
"FontSize": "Font Size (%)",
15-
"KnownLanguages": "Known Languages",
16-
"UnknownLanguages": "Unknown Languages",
15+
"KnownLanguages": "Known",
16+
"UnknownLanguages": "Unknown",
1717
"AlphabeticOnly": "Only Alphabetic",
1818
"Logographical": "Logographical",
1919
"AllowOOC": {
@@ -41,7 +41,7 @@
4141
"title": "Enable Chat Features"
4242
},
4343
"DisplayCheckbox": {
44-
"hint": "Removes the checkbox from the chat section.",
44+
"hint": "Displays a checkbox next to the language selector in the chat.",
4545
"title": "Display Checkbox"
4646
},
4747
"DisplayTranslated.hint": "For languages that are translated in the chat window, display the original text and a translation below.",
@@ -108,6 +108,7 @@
108108
},
109109
"ScrambleGM.hint": "Don't translate the text for the GM (refer to the globe's color for the token's understanding).",
110110
"ScrambleGM.title": "Scramble Messages for GM",
111+
"SpeakingIn": "Speaking in {language}",
111112
"Truespeech.hint": "Set a language whose speaker understands all spoken languages (can't read Journals) and which is understood by all creatures. An actor will be able to read all chat messages and to write messages in a language that is understood by all.",
112113
"Truespeech.title": "Omnispeech Language",
113114
"Translation": "Translation",

src/module.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"verified": "13"
1515
},
1616
"esmodules": ["module/polyglot.js"],
17-
"scripts": ["lib/select2/select2.min.js"],
18-
"styles": ["lib/select2/select2.min.css", "styles/fonts.css", "styles/polyglot.css"],
17+
"scripts": ["lib/tom-select/tom-select.complete.min.js"],
18+
"styles": ["lib/tom-select/tom-select.min.css", "styles/fonts.css", "styles/polyglot.css"],
1919
"languages": [
2020
{
2121
"lang": "en",

0 commit comments

Comments
 (0)