-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* SPIKE - add script that compiles an example TS file to JS * Adjust the start script to make it work in Windows env * Extend the base eslintrc in the eslintrc for example files * Add a bash script that generates the JS files for all the TS example files * Add generate-js-examples step to the npm scripts * Make the generate-js-examples script apply only for the vanilla js examples * Renamed all js examples to *.ts without changing the content * Add typings for data array in the examples (array of arrays) * Add typings for HOT instance in all TS examples * Add typings for data array in the examples (array of objects) * Improve reporting in the generate-js-examples script * Add typings for the HOT instance in the examples * Improve typings in docs/content/guides/accessories-and-menus/context-menu/javascript/example3.ts * Improve typings in docs/content/guides/accessories-and-menus/export-to-csv/javascript/example1.ts * Add typing for .getPlugin statements * Change typing for HOT instance from Handsontable to Core * Add typings for custom renderers in the ts examples * Add missing import statements * Improve typings for arrays * replace Core type * add lint rules * update lint * update ts examples * Newline at the end of file gitignore * Remove unused vars in docs/content/guides/getting-started * Remove unused 'const hot' variables * Fix type error for html containers for the HOT instance * Fix typings in docs/content/guides/rows/row-prepopulating/javascript/example1.ts * Make all HOT instances variables names consistently 'hot' * Improve typings in docs/content/guides/getting-started/binding-to-data * add ts fixes and cleanup * Improve typings for cells() function in HOT configuration * Fix docs/content/guides/columns/column-filter/javascript/exampleFilterDifferentTypes.ts * Fix typings for docs/content/guides/getting-started/demo/javascript/example.ts * Fix type-null-checking in HTML elements * fix example * Fix typing for HTMLInputElement vars * Fix docs/content/guides/optimization/batch-operations/javascript/example1.ts * Fix typings in dir docs/content/guides/cell-functions * Fix typings in dir docs/content/guides/columns * Fix typings in dir docs/content/guides/cell-features * Fix typings in dir docs/content/guides/cell-types * Fix typings in dir docs/content/guides/formulas * Fix typings in dir docs/content/guides/navigation * Fix typings in dir docs/content/guides/accessories-and-menus * Improve typings for docs/content/guides/getting-started/binding-to-data/javascript/example4.ts * Revert unnecessary changes * Revert unnecessary changes * Make generate-js-examples script re-generate files even when exist * Make sure generate-js-examples.sh is run in bash shell * Remove generate-js-examples script from the docs:start pipeline * Make generate-js-examples script run jobs in parallel to speed things up * Improve the dev experience with the generate-js-examples script * Fix merge errors * Fix merge errors * Make generat-js-examples script work in zsh env (MacOS) * Fix/docs visual cache logic (#11014) * make sure we evaluate the cache restore properly * build and serve for visual tests * increase timeout * fix lock * resolve docs lock * update locks --------- Co-authored-by: adrianspdev <adrian.dusinkiewicz@soppo.team> Co-authored-by: Maciej Giergiczny <maciej.giergiczny@handsontable.com> Co-authored-by: Evan Seaward <seaward.evan@gmail.com>
- Loading branch information
1 parent
838044e
commit 369d7dd
Showing
168 changed files
with
1,062 additions
and
778 deletions.
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
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,34 @@ | ||
#!/usr/bin/bash | ||
|
||
# This script generates the JS files for all the TS code examples. It skips the examples that already have a JS file. | ||
|
||
jobs_limit=16 | ||
|
||
generate_single_file() { | ||
ts_filename="$1" | ||
js_filename="${ts_filename%.*}.js" | ||
|
||
tsc --target esnext --skipLibCheck $ts_filename > /dev/null | ||
|
||
if [ -f "$js_filename" ]; then | ||
eslint --fix --no-ignore -c eslintrc.examples.js $js_filename > /dev/null | ||
echo "Generated $js_filename" | ||
else | ||
echo "Failed to generate $js_filename" | ||
fi | ||
} | ||
|
||
echo "Running $jobs_limit jobs in parallel..." | ||
|
||
find content/guides -wholename "*/javascript/*.ts" -print0 | while read -d $'\0' ts_filename; do | ||
while test "$(jobs | wc -l)" -ge "$jobs_limit"; do | ||
sleep 1 | ||
done | ||
|
||
generate_single_file "$ts_filename" & | ||
done | ||
|
||
wait | ||
echo "Waiting for the result of all jobs..." | ||
sleep 20 | ||
echo "All jobs finished" |
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
5 changes: 3 additions & 2 deletions
5
...menus/context-menu/javascript/example1.js → ...menus/context-menu/javascript/example1.ts
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
5 changes: 3 additions & 2 deletions
5
...menus/context-menu/javascript/example2.js → ...menus/context-menu/javascript/example2.ts
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
88 changes: 0 additions & 88 deletions
88
docs/content/guides/accessories-and-menus/context-menu/javascript/example3.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.