Skip to content

Commit

Permalink
New Module Compilation System (#163)
Browse files Browse the repository at this point in the history
* Update to latest version of js-slang

* Hide implementations in documentation

The ShapeDrawn, RunesDrawn and AudioPlayed arrays were showing up in the documentation generated by typedoc

* esbuild test

* Moved to esbuild

* Finished move to esbuild

* Fixed bugs, made typedoc async

* Fixed jest config not working

* Replicate process inject env plugin

* remove babel and other unnecessary packages

* Remove watch command temporarily

* Fixed line endings and type imports

* Refactored scripts code

* Refactored commands

* Made it compatible with current frontend

* Committing compiled scripts

* Use return value instead of plugin

* Finished reintegrating the command system

* updated documentation

* Refactoring

* Fixed json building with no comments

jsons will now build correctly even if the corresponding element does not have any docstrings attached to it

* Updated json time formatting

* Fixed building tabs

* Fixed -m and -t not working

* Updated esbuild

Use esbuild's incremental builds and serve API to provide more options during development

* Minor fixes

* added new serve mode

* Modified yarn scripts

* Modified description for dev command

* Add code to run tsc and eslint in parallel

* Reorganize the build scripts

Make them more modular and reduced the amount of duplicated code

* Both bundles and tabs need to have their external dependencies specified separately (just in case a bundle imports react too). This means that esbuild's native http server can't really be used to serve both tabs and bundles at the same time.

So this commit removes that functionality, leaving just the watch command.

* Added some tests

* Changed how tabs are built

* Updated scripts build

* Merge CSG fixes into build alts for testing (#169)

* docs(eslint): Fix typos from replace all quotes

* style(binary_tree): Whitespace fix

* style(copy_gc): Combine duplicate import

* ref(pix_n_flix): No ==

* ref(csg): Remove Blueprint import for bundle, hardcode instead, add note

* ref(csg): Bring back Blueprint import after change to bundle's provided externals

* fix(csg): Fix Core init order, simplify checks and drop looseInstanceOf(), use Core more with new nextComponent(), edit WebGL context loss text, some explicit keywords, refactoring

* devfeat(pkg): Re-add a dev script

---------

Co-authored-by: Cloud <[email protected]>

* Fix reading property undefined bug

Certain arguments did not have their default values set properly, resulting in an error at runtime

* Finish merge with test branch

* Change eslint configuration

* Update jest

* Add documentation

* Update compiled code

* Fix missing extension on lodash import

* Clean up code

* Fix CSG Module not working with React

* Update json.ts

Extract the header and description return for parsers

* Add remaining commands

Add the lint, typecheck and prebuild commands to the main command parser

* Made tsc and linting off by default

* Readd missing dependencies

* Fix react-ace incompatibility

* Autofix linting issues in programmingREPL module

---------

Co-authored-by: Cloud <[email protected]>
Co-authored-by: Martin Henz <[email protected]>
  • Loading branch information
3 people authored Feb 12, 2023
1 parent 1889713 commit c0449ef
Show file tree
Hide file tree
Showing 136 changed files with 6,536 additions and 5,473 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

9 changes: 9 additions & 0 deletions .eslintrc.base.js → .eslintrc.base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ module.exports = {
},
],
'no-useless-backreference': 1,
'require-await': 1,
'require-atomic-updates': 1,
'use-isnan': [
1, // Was 2
Expand Down Expand Up @@ -325,6 +326,13 @@ module.exports = {
'always', // Same
{ markers: todoTreeKeywordsAll },
],
'@typescript-eslint/consistent-type-imports': [
1,
{
fixStyle: 'inline-type-imports',
prefer: 'type-imports',
}
],
// "strict": 0, // Don't force, though rule configs assume strict errors
// "symbol-description": 0,
// "vars-on-top": 0,
Expand Down Expand Up @@ -483,6 +491,7 @@ module.exports = {
'switch-colon-spacing': 1,
'template-curly-spacing': 1,
'template-tag-spacing': 1,

'unicode-bom': 1,
'wrap-iife': [
1,
Expand Down
9 changes: 9 additions & 0 deletions .eslintrc.test.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
"extends": ["./.eslintrc.base.cjs", "plugin:jest/recommended"],
"plugins": ["jest"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": __dirname,
"project": "./tsconfig.test.json"
}
}
4 changes: 0 additions & 4 deletions .eslintrc.test.json

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,3 @@ scripts/build/database.json
.Trashes
ehthumbs.db
Thumbs.db

# IDE Related Configuration Files #
###################################
.vscode/
8 changes: 4 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn build
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn build --tsc --lint
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"eslint.workingDirectories": [
"src",
"scripts/src"
],
"files.eol": "\r\n",
}
99 changes: 0 additions & 99 deletions babel.config.js

This file was deleted.

19 changes: 0 additions & 19 deletions jest.config.ts

This file was deleted.

Loading

0 comments on commit c0449ef

Please sign in to comment.