diff --git a/.gitignore b/.gitignore index ebc703b..75eb57b 100644 --- a/.gitignore +++ b/.gitignore @@ -131,4 +131,5 @@ dist archives .temple -.DS_Store \ No newline at end of file +.DS_Store +.build \ No newline at end of file diff --git a/packages/core/temple-client/LICENSE b/core/temple-client/LICENSE similarity index 100% rename from packages/core/temple-client/LICENSE rename to core/temple-client/LICENSE diff --git a/packages/core/temple-client/README.md b/core/temple-client/README.md similarity index 100% rename from packages/core/temple-client/README.md rename to core/temple-client/README.md diff --git a/packages/core/temple-client/index.d.ts b/core/temple-client/index.d.ts similarity index 100% rename from packages/core/temple-client/index.d.ts rename to core/temple-client/index.d.ts diff --git a/packages/core/temple-client/index.js b/core/temple-client/index.js similarity index 100% rename from packages/core/temple-client/index.js rename to core/temple-client/index.js diff --git a/packages/core/temple-client/package.json b/core/temple-client/package.json similarity index 100% rename from packages/core/temple-client/package.json rename to core/temple-client/package.json diff --git a/packages/core/temple-client/src/TempleComponent.ts b/core/temple-client/src/TempleComponent.ts similarity index 100% rename from packages/core/temple-client/src/TempleComponent.ts rename to core/temple-client/src/TempleComponent.ts diff --git a/packages/core/temple-client/src/TempleDocument.ts b/core/temple-client/src/TempleDocument.ts similarity index 100% rename from packages/core/temple-client/src/TempleDocument.ts rename to core/temple-client/src/TempleDocument.ts diff --git a/packages/core/temple-client/src/TempleElement.ts b/core/temple-client/src/TempleElement.ts similarity index 100% rename from packages/core/temple-client/src/TempleElement.ts rename to core/temple-client/src/TempleElement.ts diff --git a/packages/core/temple-client/src/TempleEmitter.ts b/core/temple-client/src/TempleEmitter.ts similarity index 100% rename from packages/core/temple-client/src/TempleEmitter.ts rename to core/temple-client/src/TempleEmitter.ts diff --git a/packages/core/temple-client/src/TempleException.ts b/core/temple-client/src/TempleException.ts similarity index 100% rename from packages/core/temple-client/src/TempleException.ts rename to core/temple-client/src/TempleException.ts diff --git a/packages/core/temple-client/src/children.ts b/core/temple-client/src/children.ts similarity index 100% rename from packages/core/temple-client/src/children.ts rename to core/temple-client/src/children.ts diff --git a/packages/core/temple-client/src/data.ts b/core/temple-client/src/data.ts similarity index 100% rename from packages/core/temple-client/src/data.ts rename to core/temple-client/src/data.ts diff --git a/packages/core/temple-client/src/helpers.ts b/core/temple-client/src/helpers.ts similarity index 100% rename from packages/core/temple-client/src/helpers.ts rename to core/temple-client/src/helpers.ts diff --git a/packages/core/temple-client/src/index.ts b/core/temple-client/src/index.ts similarity index 100% rename from packages/core/temple-client/src/index.ts rename to core/temple-client/src/index.ts diff --git a/packages/core/temple-client/src/props.ts b/core/temple-client/src/props.ts similarity index 100% rename from packages/core/temple-client/src/props.ts rename to core/temple-client/src/props.ts diff --git a/packages/core/temple-client/src/signal.ts b/core/temple-client/src/signal.ts similarity index 100% rename from packages/core/temple-client/src/signal.ts rename to core/temple-client/src/signal.ts diff --git a/packages/core/temple-client/src/types.ts b/core/temple-client/src/types.ts similarity index 100% rename from packages/core/temple-client/src/types.ts rename to core/temple-client/src/types.ts diff --git a/packages/core/temple-client/tsconfig.json b/core/temple-client/tsconfig.json similarity index 100% rename from packages/core/temple-client/tsconfig.json rename to core/temple-client/tsconfig.json diff --git a/packages/core/temple-compiler/LICENSE b/core/temple-compiler/LICENSE similarity index 100% rename from packages/core/temple-compiler/LICENSE rename to core/temple-compiler/LICENSE diff --git a/packages/core/temple-compiler/README.md b/core/temple-compiler/README.md similarity index 100% rename from packages/core/temple-compiler/README.md rename to core/temple-compiler/README.md diff --git a/packages/core/temple-compiler/index.d.ts b/core/temple-compiler/index.d.ts similarity index 100% rename from packages/core/temple-compiler/index.d.ts rename to core/temple-compiler/index.d.ts diff --git a/packages/core/temple-compiler/index.js b/core/temple-compiler/index.js similarity index 100% rename from packages/core/temple-compiler/index.js rename to core/temple-compiler/index.js diff --git a/packages/core/temple-compiler/package.json b/core/temple-compiler/package.json similarity index 100% rename from packages/core/temple-compiler/package.json rename to core/temple-compiler/package.json diff --git a/packages/core/temple-compiler/src/CompilerException.ts b/core/temple-compiler/src/CompilerException.ts similarity index 100% rename from packages/core/temple-compiler/src/CompilerException.ts rename to core/temple-compiler/src/CompilerException.ts diff --git a/packages/core/temple-compiler/src/CompilerGenerator.ts b/core/temple-compiler/src/CompilerGenerator.ts similarity index 100% rename from packages/core/temple-compiler/src/CompilerGenerator.ts rename to core/temple-compiler/src/CompilerGenerator.ts diff --git a/packages/core/temple-compiler/src/ComponentCompiler.ts b/core/temple-compiler/src/ComponentCompiler.ts similarity index 100% rename from packages/core/temple-compiler/src/ComponentCompiler.ts rename to core/temple-compiler/src/ComponentCompiler.ts diff --git a/packages/core/temple-compiler/src/DocumentBuilder.ts b/core/temple-compiler/src/DocumentBuilder.ts similarity index 100% rename from packages/core/temple-compiler/src/DocumentBuilder.ts rename to core/temple-compiler/src/DocumentBuilder.ts diff --git a/packages/core/temple-compiler/src/DocumentCompiler.ts b/core/temple-compiler/src/DocumentCompiler.ts similarity index 100% rename from packages/core/temple-compiler/src/DocumentCompiler.ts rename to core/temple-compiler/src/DocumentCompiler.ts diff --git a/packages/core/temple-compiler/src/FileLoader.ts b/core/temple-compiler/src/FileLoader.ts similarity index 100% rename from packages/core/temple-compiler/src/FileLoader.ts rename to core/temple-compiler/src/FileLoader.ts diff --git a/packages/core/temple-compiler/src/directives/AbstractDirective.ts b/core/temple-compiler/src/directives/AbstractDirective.ts similarity index 100% rename from packages/core/temple-compiler/src/directives/AbstractDirective.ts rename to core/temple-compiler/src/directives/AbstractDirective.ts diff --git a/packages/core/temple-compiler/src/directives/ConditionalDirective.ts b/core/temple-compiler/src/directives/ConditionalDirective.ts similarity index 100% rename from packages/core/temple-compiler/src/directives/ConditionalDirective.ts rename to core/temple-compiler/src/directives/ConditionalDirective.ts diff --git a/packages/core/temple-compiler/src/directives/DirectiveInterface.ts b/core/temple-compiler/src/directives/DirectiveInterface.ts similarity index 100% rename from packages/core/temple-compiler/src/directives/DirectiveInterface.ts rename to core/temple-compiler/src/directives/DirectiveInterface.ts diff --git a/packages/core/temple-compiler/src/directives/IteratorDirective.ts b/core/temple-compiler/src/directives/IteratorDirective.ts similarity index 100% rename from packages/core/temple-compiler/src/directives/IteratorDirective.ts rename to core/temple-compiler/src/directives/IteratorDirective.ts diff --git a/packages/core/temple-compiler/src/directives/TryCatchDirective.ts b/core/temple-compiler/src/directives/TryCatchDirective.ts similarity index 100% rename from packages/core/temple-compiler/src/directives/TryCatchDirective.ts rename to core/temple-compiler/src/directives/TryCatchDirective.ts diff --git a/packages/core/temple-compiler/src/helpers.ts b/core/temple-compiler/src/helpers.ts similarity index 100% rename from packages/core/temple-compiler/src/helpers.ts rename to core/temple-compiler/src/helpers.ts diff --git a/packages/core/temple-compiler/src/index.ts b/core/temple-compiler/src/index.ts similarity index 100% rename from packages/core/temple-compiler/src/index.ts rename to core/temple-compiler/src/index.ts diff --git a/packages/core/temple-compiler/src/types.ts b/core/temple-compiler/src/types.ts similarity index 100% rename from packages/core/temple-compiler/src/types.ts rename to core/temple-compiler/src/types.ts diff --git a/packages/core/temple-compiler/tests/TempleCompiler.test.ts b/core/temple-compiler/tests/TempleCompiler.test.ts similarity index 100% rename from packages/core/temple-compiler/tests/TempleCompiler.test.ts rename to core/temple-compiler/tests/TempleCompiler.test.ts diff --git a/packages/core/temple-compiler/tests/expected/components/counter.tml b/core/temple-compiler/tests/expected/components/counter.tml similarity index 100% rename from packages/core/temple-compiler/tests/expected/components/counter.tml rename to core/temple-compiler/tests/expected/components/counter.tml diff --git a/packages/core/temple-compiler/tests/expected/components/header.tml b/core/temple-compiler/tests/expected/components/header.tml similarity index 100% rename from packages/core/temple-compiler/tests/expected/components/header.tml rename to core/temple-compiler/tests/expected/components/header.tml diff --git a/packages/core/temple-compiler/tests/expected/components/list.tml b/core/temple-compiler/tests/expected/components/list.tml similarity index 100% rename from packages/core/temple-compiler/tests/expected/components/list.tml rename to core/temple-compiler/tests/expected/components/list.tml diff --git a/packages/core/temple-compiler/tests/expected/components/paragraph.tml b/core/temple-compiler/tests/expected/components/paragraph.tml similarity index 100% rename from packages/core/temple-compiler/tests/expected/components/paragraph.tml rename to core/temple-compiler/tests/expected/components/paragraph.tml diff --git a/packages/core/temple-compiler/tests/expected/components/redirect.tml b/core/temple-compiler/tests/expected/components/redirect.tml similarity index 100% rename from packages/core/temple-compiler/tests/expected/components/redirect.tml rename to core/temple-compiler/tests/expected/components/redirect.tml diff --git a/packages/core/temple-compiler/tests/expected/page.js b/core/temple-compiler/tests/expected/page.js similarity index 100% rename from packages/core/temple-compiler/tests/expected/page.js rename to core/temple-compiler/tests/expected/page.js diff --git a/packages/core/temple-compiler/tests/expected/page.ts b/core/temple-compiler/tests/expected/page.ts similarity index 100% rename from packages/core/temple-compiler/tests/expected/page.ts rename to core/temple-compiler/tests/expected/page.ts diff --git a/packages/core/temple-compiler/tests/templates/components/counter.tml b/core/temple-compiler/tests/templates/components/counter.tml similarity index 100% rename from packages/core/temple-compiler/tests/templates/components/counter.tml rename to core/temple-compiler/tests/templates/components/counter.tml diff --git a/packages/core/temple-compiler/tests/templates/components/header.tml b/core/temple-compiler/tests/templates/components/header.tml similarity index 100% rename from packages/core/temple-compiler/tests/templates/components/header.tml rename to core/temple-compiler/tests/templates/components/header.tml diff --git a/packages/core/temple-compiler/tests/templates/components/list.tml b/core/temple-compiler/tests/templates/components/list.tml similarity index 100% rename from packages/core/temple-compiler/tests/templates/components/list.tml rename to core/temple-compiler/tests/templates/components/list.tml diff --git a/packages/core/temple-compiler/tests/templates/components/paragraph.tml b/core/temple-compiler/tests/templates/components/paragraph.tml similarity index 100% rename from packages/core/temple-compiler/tests/templates/components/paragraph.tml rename to core/temple-compiler/tests/templates/components/paragraph.tml diff --git a/packages/core/temple-compiler/tests/templates/components/redirect.tml b/core/temple-compiler/tests/templates/components/redirect.tml similarity index 100% rename from packages/core/temple-compiler/tests/templates/components/redirect.tml rename to core/temple-compiler/tests/templates/components/redirect.tml diff --git a/packages/core/temple-compiler/tests/templates/page.tml b/core/temple-compiler/tests/templates/page.tml similarity index 100% rename from packages/core/temple-compiler/tests/templates/page.tml rename to core/temple-compiler/tests/templates/page.tml diff --git a/packages/core/temple-compiler/tsconfig.json b/core/temple-compiler/tsconfig.json similarity index 100% rename from packages/core/temple-compiler/tsconfig.json rename to core/temple-compiler/tsconfig.json diff --git a/packages/core/temple-parser/LICENSE b/core/temple-parser/LICENSE similarity index 100% rename from packages/core/temple-parser/LICENSE rename to core/temple-parser/LICENSE diff --git a/packages/core/temple-parser/README.md b/core/temple-parser/README.md similarity index 100% rename from packages/core/temple-parser/README.md rename to core/temple-parser/README.md diff --git a/packages/core/temple-parser/index.d.ts b/core/temple-parser/index.d.ts similarity index 100% rename from packages/core/temple-parser/index.d.ts rename to core/temple-parser/index.d.ts diff --git a/packages/core/temple-parser/index.js b/core/temple-parser/index.js similarity index 100% rename from packages/core/temple-parser/index.js rename to core/temple-parser/index.js diff --git a/packages/core/temple-parser/package.json b/core/temple-parser/package.json similarity index 100% rename from packages/core/temple-parser/package.json rename to core/temple-parser/package.json diff --git a/packages/core/temple-parser/src/DataParser.ts b/core/temple-parser/src/DataParser.ts similarity index 100% rename from packages/core/temple-parser/src/DataParser.ts rename to core/temple-parser/src/DataParser.ts diff --git a/packages/core/temple-parser/src/DocumentParser.ts b/core/temple-parser/src/DocumentParser.ts similarity index 100% rename from packages/core/temple-parser/src/DocumentParser.ts rename to core/temple-parser/src/DocumentParser.ts diff --git a/packages/core/temple-parser/src/GenericLexer.ts b/core/temple-parser/src/GenericLexer.ts similarity index 100% rename from packages/core/temple-parser/src/GenericLexer.ts rename to core/temple-parser/src/GenericLexer.ts diff --git a/packages/core/temple-parser/src/ParserException.ts b/core/temple-parser/src/ParserException.ts similarity index 100% rename from packages/core/temple-parser/src/ParserException.ts rename to core/temple-parser/src/ParserException.ts diff --git a/packages/core/temple-parser/src/TempleParser.ts b/core/temple-parser/src/TempleParser.ts similarity index 100% rename from packages/core/temple-parser/src/TempleParser.ts rename to core/temple-parser/src/TempleParser.ts diff --git a/packages/core/temple-parser/src/definitions.ts b/core/temple-parser/src/definitions.ts similarity index 100% rename from packages/core/temple-parser/src/definitions.ts rename to core/temple-parser/src/definitions.ts diff --git a/packages/core/temple-parser/src/index.ts b/core/temple-parser/src/index.ts similarity index 100% rename from packages/core/temple-parser/src/index.ts rename to core/temple-parser/src/index.ts diff --git a/packages/core/temple-parser/src/types.ts b/core/temple-parser/src/types.ts similarity index 100% rename from packages/core/temple-parser/src/types.ts rename to core/temple-parser/src/types.ts diff --git a/packages/core/temple-parser/tests/DataParser.test.ts b/core/temple-parser/tests/DataParser.test.ts similarity index 100% rename from packages/core/temple-parser/tests/DataParser.test.ts rename to core/temple-parser/tests/DataParser.test.ts diff --git a/packages/core/temple-parser/tests/DocumentParser.test.ts b/core/temple-parser/tests/DocumentParser.test.ts similarity index 100% rename from packages/core/temple-parser/tests/DocumentParser.test.ts rename to core/temple-parser/tests/DocumentParser.test.ts diff --git a/packages/core/temple-parser/tests/TempleParser.test.ts b/core/temple-parser/tests/TempleParser.test.ts similarity index 100% rename from packages/core/temple-parser/tests/TempleParser.test.ts rename to core/temple-parser/tests/TempleParser.test.ts diff --git a/packages/core/temple-parser/tests/expected/symbolAst1.json b/core/temple-parser/tests/expected/symbolAst1.json similarity index 100% rename from packages/core/temple-parser/tests/expected/symbolAst1.json rename to core/temple-parser/tests/expected/symbolAst1.json diff --git a/packages/core/temple-parser/tests/expected/symbolAst2.json b/core/temple-parser/tests/expected/symbolAst2.json similarity index 100% rename from packages/core/temple-parser/tests/expected/symbolAst2.json rename to core/temple-parser/tests/expected/symbolAst2.json diff --git a/packages/core/temple-parser/tests/templates/components/counter.tml b/core/temple-parser/tests/templates/components/counter.tml similarity index 100% rename from packages/core/temple-parser/tests/templates/components/counter.tml rename to core/temple-parser/tests/templates/components/counter.tml diff --git a/packages/core/temple-parser/tests/templates/components/header.tml b/core/temple-parser/tests/templates/components/header.tml similarity index 100% rename from packages/core/temple-parser/tests/templates/components/header.tml rename to core/temple-parser/tests/templates/components/header.tml diff --git a/packages/core/temple-parser/tests/templates/components/list.tml b/core/temple-parser/tests/templates/components/list.tml similarity index 100% rename from packages/core/temple-parser/tests/templates/components/list.tml rename to core/temple-parser/tests/templates/components/list.tml diff --git a/packages/core/temple-parser/tests/templates/components/panel-header.tml b/core/temple-parser/tests/templates/components/panel-header.tml similarity index 100% rename from packages/core/temple-parser/tests/templates/components/panel-header.tml rename to core/temple-parser/tests/templates/components/panel-header.tml diff --git a/packages/core/temple-parser/tests/templates/components/paragraph.tml b/core/temple-parser/tests/templates/components/paragraph.tml similarity index 100% rename from packages/core/temple-parser/tests/templates/components/paragraph.tml rename to core/temple-parser/tests/templates/components/paragraph.tml diff --git a/packages/core/temple-parser/tests/templates/components/redirect.tml b/core/temple-parser/tests/templates/components/redirect.tml similarity index 100% rename from packages/core/temple-parser/tests/templates/components/redirect.tml rename to core/temple-parser/tests/templates/components/redirect.tml diff --git a/packages/core/temple-parser/tests/templates/page.tml b/core/temple-parser/tests/templates/page.tml similarity index 100% rename from packages/core/temple-parser/tests/templates/page.tml rename to core/temple-parser/tests/templates/page.tml diff --git a/packages/core/temple-parser/tsconfig.json b/core/temple-parser/tsconfig.json similarity index 100% rename from packages/core/temple-parser/tsconfig.json rename to core/temple-parser/tsconfig.json diff --git a/packages/core/temple-server/LICENSE b/core/temple-server/LICENSE similarity index 100% rename from packages/core/temple-server/LICENSE rename to core/temple-server/LICENSE diff --git a/packages/core/temple-server/README.md b/core/temple-server/README.md similarity index 100% rename from packages/core/temple-server/README.md rename to core/temple-server/README.md diff --git a/packages/core/temple-server/index.d.ts b/core/temple-server/index.d.ts similarity index 100% rename from packages/core/temple-server/index.d.ts rename to core/temple-server/index.d.ts diff --git a/packages/core/temple-server/index.js b/core/temple-server/index.js similarity index 100% rename from packages/core/temple-server/index.js rename to core/temple-server/index.js diff --git a/packages/core/temple-server/package.json b/core/temple-server/package.json similarity index 100% rename from packages/core/temple-server/package.json rename to core/temple-server/package.json diff --git a/packages/core/temple-server/src/TempleCollection.ts b/core/temple-server/src/TempleCollection.ts similarity index 100% rename from packages/core/temple-server/src/TempleCollection.ts rename to core/temple-server/src/TempleCollection.ts diff --git a/packages/core/temple-server/src/TempleDocument.ts b/core/temple-server/src/TempleDocument.ts similarity index 100% rename from packages/core/temple-server/src/TempleDocument.ts rename to core/temple-server/src/TempleDocument.ts diff --git a/packages/core/temple-server/src/TempleElement.ts b/core/temple-server/src/TempleElement.ts similarity index 100% rename from packages/core/temple-server/src/TempleElement.ts rename to core/temple-server/src/TempleElement.ts diff --git a/packages/core/temple-server/src/TempleEmitter.ts b/core/temple-server/src/TempleEmitter.ts similarity index 100% rename from packages/core/temple-server/src/TempleEmitter.ts rename to core/temple-server/src/TempleEmitter.ts diff --git a/packages/core/temple-server/src/TempleException.ts b/core/temple-server/src/TempleException.ts similarity index 100% rename from packages/core/temple-server/src/TempleException.ts rename to core/temple-server/src/TempleException.ts diff --git a/packages/core/temple-server/src/TempleText.ts b/core/temple-server/src/TempleText.ts similarity index 100% rename from packages/core/temple-server/src/TempleText.ts rename to core/temple-server/src/TempleText.ts diff --git a/packages/core/temple-server/src/data.ts b/core/temple-server/src/data.ts similarity index 100% rename from packages/core/temple-server/src/data.ts rename to core/temple-server/src/data.ts diff --git a/packages/core/temple-server/src/index.ts b/core/temple-server/src/index.ts similarity index 100% rename from packages/core/temple-server/src/index.ts rename to core/temple-server/src/index.ts diff --git a/packages/core/temple-server/src/props.ts b/core/temple-server/src/props.ts similarity index 100% rename from packages/core/temple-server/src/props.ts rename to core/temple-server/src/props.ts diff --git a/packages/core/temple-server/src/signal.ts b/core/temple-server/src/signal.ts similarity index 100% rename from packages/core/temple-server/src/signal.ts rename to core/temple-server/src/signal.ts diff --git a/packages/core/temple-server/src/types.ts b/core/temple-server/src/types.ts similarity index 100% rename from packages/core/temple-server/src/types.ts rename to core/temple-server/src/types.ts diff --git a/packages/core/temple-server/tsconfig.json b/core/temple-server/tsconfig.json similarity index 100% rename from packages/core/temple-server/tsconfig.json rename to core/temple-server/tsconfig.json diff --git a/packages/core/temple/LICENSE b/core/temple/LICENSE similarity index 100% rename from packages/core/temple/LICENSE rename to core/temple/LICENSE diff --git a/packages/core/temple/README.md b/core/temple/README.md similarity index 100% rename from packages/core/temple/README.md rename to core/temple/README.md diff --git a/packages/core/temple/index.d.ts b/core/temple/index.d.ts similarity index 100% rename from packages/core/temple/index.d.ts rename to core/temple/index.d.ts diff --git a/packages/core/temple/index.js b/core/temple/index.js similarity index 100% rename from packages/core/temple/index.js rename to core/temple/index.js diff --git a/packages/core/temple/package.json b/core/temple/package.json similarity index 100% rename from packages/core/temple/package.json rename to core/temple/package.json diff --git a/packages/core/temple/server.d.ts b/core/temple/server.d.ts similarity index 100% rename from packages/core/temple/server.d.ts rename to core/temple/server.d.ts diff --git a/packages/core/temple/server.js b/core/temple/server.js similarity index 100% rename from packages/core/temple/server.js rename to core/temple/server.js diff --git a/packages/core/temple/src/client.ts b/core/temple/src/client.ts similarity index 100% rename from packages/core/temple/src/client.ts rename to core/temple/src/client.ts diff --git a/packages/core/temple/src/server.ts b/core/temple/src/server.ts similarity index 100% rename from packages/core/temple/src/server.ts rename to core/temple/src/server.ts diff --git a/packages/core/temple/tsconfig.json b/core/temple/tsconfig.json similarity index 100% rename from packages/core/temple/tsconfig.json rename to core/temple/tsconfig.json diff --git a/packages/environments/temple-develop/LICENSE b/env/temple-develop/LICENSE similarity index 100% rename from packages/environments/temple-develop/LICENSE rename to env/temple-develop/LICENSE diff --git a/packages/environments/temple-develop/README.md b/env/temple-develop/README.md similarity index 100% rename from packages/environments/temple-develop/README.md rename to env/temple-develop/README.md diff --git a/packages/environments/temple-develop/client.js b/env/temple-develop/client.js similarity index 100% rename from packages/environments/temple-develop/client.js rename to env/temple-develop/client.js diff --git a/packages/environments/temple-develop/index.d.ts b/env/temple-develop/index.d.ts similarity index 100% rename from packages/environments/temple-develop/index.d.ts rename to env/temple-develop/index.d.ts diff --git a/packages/environments/temple-develop/index.js b/env/temple-develop/index.js similarity index 100% rename from packages/environments/temple-develop/index.js rename to env/temple-develop/index.js diff --git a/packages/environments/temple-develop/package.json b/env/temple-develop/package.json similarity index 100% rename from packages/environments/temple-develop/package.json rename to env/temple-develop/package.json diff --git a/packages/environments/temple-develop/src/sse/RefreshServer.ts b/env/temple-develop/src/sse/RefreshServer.ts similarity index 100% rename from packages/environments/temple-develop/src/sse/RefreshServer.ts rename to env/temple-develop/src/sse/RefreshServer.ts diff --git a/packages/environments/temple-develop/src/sse/client.ts b/env/temple-develop/src/sse/client.ts similarity index 100% rename from packages/environments/temple-develop/src/sse/client.ts rename to env/temple-develop/src/sse/client.ts diff --git a/packages/environments/temple-develop/src/sse/server.ts b/env/temple-develop/src/sse/server.ts similarity index 100% rename from packages/environments/temple-develop/src/sse/server.ts rename to env/temple-develop/src/sse/server.ts diff --git a/packages/environments/temple-develop/src/sse/types.ts b/env/temple-develop/src/sse/types.ts similarity index 100% rename from packages/environments/temple-develop/src/sse/types.ts rename to env/temple-develop/src/sse/types.ts diff --git a/packages/environments/temple-develop/src/wss/SocketClient.ts b/env/temple-develop/src/wss/SocketClient.ts similarity index 100% rename from packages/environments/temple-develop/src/wss/SocketClient.ts rename to env/temple-develop/src/wss/SocketClient.ts diff --git a/packages/environments/temple-develop/src/wss/SocketServer.ts b/env/temple-develop/src/wss/SocketServer.ts similarity index 100% rename from packages/environments/temple-develop/src/wss/SocketServer.ts rename to env/temple-develop/src/wss/SocketServer.ts diff --git a/packages/environments/temple-develop/src/wss/client.ts b/env/temple-develop/src/wss/client.ts similarity index 100% rename from packages/environments/temple-develop/src/wss/client.ts rename to env/temple-develop/src/wss/client.ts diff --git a/packages/environments/temple-develop/src/wss/server.ts b/env/temple-develop/src/wss/server.ts similarity index 100% rename from packages/environments/temple-develop/src/wss/server.ts rename to env/temple-develop/src/wss/server.ts diff --git a/packages/environments/temple-develop/src/wss/types.ts b/env/temple-develop/src/wss/types.ts similarity index 100% rename from packages/environments/temple-develop/src/wss/types.ts rename to env/temple-develop/src/wss/types.ts diff --git a/packages/environments/temple-develop/tsconfig.json b/env/temple-develop/tsconfig.json similarity index 100% rename from packages/environments/temple-develop/tsconfig.json rename to env/temple-develop/tsconfig.json diff --git a/packages/environments/temple-eslint/package.json b/env/temple-eslint/package.json similarity index 100% rename from packages/environments/temple-eslint/package.json rename to env/temple-eslint/package.json diff --git a/env/temple-language/client/package.json b/env/temple-language/client/package.json new file mode 100644 index 0000000..104c9af --- /dev/null +++ b/env/temple-language/client/package.json @@ -0,0 +1,12 @@ +{ + "name": "temple-language-client", + "description": "Adds syntax highlighting, formatting, auto-completion, jump-to-definition and linting for a custom.", + "version": "0.0.13", + "license": "MIT", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "vscode-languageclient": "9.0.1" + } +} \ No newline at end of file diff --git a/env/temple-language/client/src/index.ts b/env/temple-language/client/src/index.ts new file mode 100644 index 0000000..42f9676 --- /dev/null +++ b/env/temple-language/client/src/index.ts @@ -0,0 +1,28 @@ +import type { ExtensionContext } from './language/LanguageClient'; + +import path from 'path'; +import LanguageClient, { useBasic } from './language/LanguageClient'; + +let client: LanguageClient; + +export function activate(context: ExtensionContext) { + // The server is implemented in node + const server = context.asAbsolutePath(path.join('server', 'out', 'index.js')); + + client = useBasic({ + id: 'languageServerExample', + label: 'Language Server Example', + language: 'plaintext', + server: server + }); + + // Start the client. This will also launch the server + client.activate(); +} + +export function deactivate() { + if (!client) { + return undefined; + } + return client.deactivate(); +} \ No newline at end of file diff --git a/env/temple-language/client/src/language/LanguageClient.ts b/env/temple-language/client/src/language/LanguageClient.ts new file mode 100644 index 0000000..3cb5206 --- /dev/null +++ b/env/temple-language/client/src/language/LanguageClient.ts @@ -0,0 +1,95 @@ +export type { ExtensionContext } from 'vscode'; +export type ClientOptions = { + id: string, + label: string, + server: string, + language: string, + scheme?: string, + watcher?: string +}; + +import { workspace } from 'vscode'; +import { + LanguageClient as VSLanguageClient, + LanguageClientOptions, + ServerOptions, + TransportKind +} from 'vscode-languageclient/node'; + +export default class LanguageClient { + // The vscode language client + protected _client: VSLanguageClient; + + /** + * Makes a new vscode language client + */ + constructor( + id: string, + label: string, + serverOptions: ServerOptions, + clientOptions: LanguageClientOptions + ) { + // Create the language client and start the client. + this._client = new VSLanguageClient( + id, + label, + serverOptions, + clientOptions + ); + } + + /** + * Starts the client + */ + activate() { + // Start the client. This will also launch the server + return this._client.start(); + } + + /** + * Stops the client + */ + deactivate(): Thenable | undefined { + return this._client.stop(); + } +} + +export function useBasic(options: ClientOptions) { + const { + id, + label, + server, + language, + scheme = 'file', + watcher = '**/.clientrc' + } = options; + + // If the extension is launched in debug mode + // then the debug server options are used + // Otherwise the run options are used + const serverOptions: ServerOptions = { + run: { module: server, transport: TransportKind.ipc }, + debug: { + module: server, + transport: TransportKind.ipc, + } + }; + + // Options to control the language client + const clientOptions: LanguageClientOptions = { + // Register the server for plain text documents + documentSelector: [{ scheme, language }], + synchronize: { + // Notify the server about file changes to + // '.clientrc files contained in the workspace + fileEvents: workspace.createFileSystemWatcher(watcher) + } + }; + + return new LanguageClient( + id, + label, + serverOptions, + clientOptions + ); +} \ No newline at end of file diff --git a/env/temple-language/client/tsconfig.json b/env/temple-language/client/tsconfig.json new file mode 100644 index 0000000..5057d6c --- /dev/null +++ b/env/temple-language/client/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "esModuleInterop": true, + "module": "commonjs", + "target": "es2020", + "lib": ["es2020"], + "outDir": "out", + "rootDir": "src", + "sourceMap": true, + "types": [] + }, + "include": ["src"], + "exclude": ["node_modules"] +} diff --git a/env/temple-language/grammar/schema.grammar.json b/env/temple-language/grammar/schema.grammar.json new file mode 100644 index 0000000..f53b512 --- /dev/null +++ b/env/temple-language/grammar/schema.grammar.json @@ -0,0 +1,324 @@ +{ + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "name": "Custom Language", + "scopeName": "source.custom", + "fileTypes": [ "custom" ], + "patterns": [ + { + "include": "#block_plugin" + }, + { + "include": "#block_use" + }, + { + "include": "#block_enum" + }, + { + "include": "#block_prop" + }, + { + "include": "#block_type" + }, + { + "include": "#block_model" + }, + { + "include": "#comment" + }, + { + "include": "#attribute" + }, + { + "include": "#attribute_function" + }, + { + "include": "#null" + }, + { + "include": "#boolean" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#type" + } + ], + "repository": { + "punctuation": { + "patterns": [ + { + "name": "punctuation.definition.idea", + "match": "[\\{\\}\\[\\]\\(\\)]" + } + ] + }, + "comment": { + "begin": "//", + "end": "$\\n?", + "name": "comment.idea" + }, + "null": { + "match": "\\bnull\\b", + "name": "constant.language.null.idea" + }, + "boolean": { + "match": "\\b(true|false)\\b", + "name": "constant.language.boolean.idea" + }, + "number": { + "match": "((0(x|X)[0-9a-fA-F]*)|(\\+|-)?\\b(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)([LlFfUuDdg]|UL|ul)?\\b", + "name": "constant.numeric.idea" + }, + "string": { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "string.quoted.double.start.idea" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "string.quoted.double.end.idea" + } + }, + "patterns": [ + { + "match": "([\\w\\-\\/\\._\\\\%@:\\?=]+)", + "name": "string.quoted.double.idea" + } + ], + "name": "unnamed" + }, + "type": { + "patterns": [ + { + "match": "\\b([A-Z][a-zA-Z0-9_]*)\\b", + "name": "entity.name.type.keyword.idea" + } + ] + }, + "functional": { + "name": "source.idea.functional", + "begin": "(\\w+)(\\()", + "beginCaptures": { + "1": { + "name": "support.function.functional.idea" + }, + "2": { + "name": "punctuation.definition.idea" + } + }, + "patterns": [ + { + "include": "#array" + }, + { + "include": "#object" + }, + { + "include": "#functional" + }, + { + "include": "#null" + }, + { + "include": "#boolean" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#type" + } + ], + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.idea" + } + } + }, + "array": { + "name": "source.idea.array", + "begin": "\\[", + "beginCaptures": { + "1": { + "name": "punctuation.definition.idea" + } + }, + "patterns": [ + { + "include": "#value" + } + ], + "end": "\\]", + "endCaptures": { + "1": { + "name": "punctuation.definition.idea" + } + } + }, + "object": { + "name": "source.idea.object", + "begin": "\\{", + "beginCaptures": { + "1": { + "name": "punctuation.definition.idea" + } + }, + "patterns": [ + { + "include": "#value" + } + ], + "end": "\\}", + "endCaptures": { + "1": { + "name": "punctuation.definition.idea" + } + } + }, + "value": { + "name": "source.idea.value", + "patterns": [ + { + "include": "#array" + }, + { + "include": "#object" + }, + { + "include": "#functional" + }, + { + "include": "#null" + }, + { + "include": "#boolean" + }, + { + "include": "#number" + }, + { + "include": "#string" + }, + { + "include": "#type" + } + ] + }, + "attribute_function": { + "name": "source.idea.attribute.with_arguments", + "begin": "(@@?[\\w\\.]+)(\\()", + "beginCaptures": { + "1": { + "name": "entity.name.function.attribute.idea" + }, + "2": { + "name": "punctuation.definition.idea" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.definition.idea" + } + } + }, + "attribute": { + "name": "source.idea.attribute", + "match": "(@@?[\\w\\.]+)", + "captures": { + "1": { + "name": "entity.name.function.attribute.idea" + } + } + }, + "block_plugin": { + "name": "source.idea.embedded.source", + "begin": "^\\s*(plugin)\\s+(\"[^\"]*\")", + "beginCaptures": { + "1": { + "name": "storage.type.plugin.idea" + }, + "2": { + "name": "string.quoted.double.name.plugin.idea" + } + }, + "end": "\\s+" + }, + "block_use": { + "name": "source.idea.embedded.source", + "begin": "^\\s*(use)\\s+(\"[^\"]*\")", + "beginCaptures": { + "1": { + "name": "storage.type.plugin.idea" + }, + "2": { + "name": "string.quoted.double.name.plugin.idea" + } + }, + "end": "\\s+" + }, + "block_enum": { + "name": "source.idea.embedded.source", + "begin": "^\\s*(enum)\\s+([A-Za-z][\\w]*)", + "beginCaptures": { + "1": { + "name": "storage.type.keyword.idea" + }, + "2": { + "name": "entity.name.type.keyword.idea" + } + }, + "end": "\\s+" + }, + "block_prop": { + "name": "source.idea.embedded.source", + "begin": "^\\s*(prop)\\s+([A-Za-z][\\w]*)", + "beginCaptures": { + "1": { + "name": "storage.type.keyword.idea" + }, + "2": { + "name": "entity.name.type.keyword.idea" + } + }, + "end": "\\s+" + }, + "block_type": { + "name": "source.idea.embedded.source", + "begin": "^\\s*(type)\\s+([A-Za-z][\\w]*)", + "beginCaptures": { + "1": { + "name": "storage.type.keyword.idea" + }, + "2": { + "name": "entity.name.type.keyword.idea" + } + }, + "end": "\\s+" + }, + "block_model": { + "name": "source.idea.embedded.source", + "begin": "^\\s*(model)\\s+([A-Za-z][\\w]*)", + "beginCaptures": { + "1": { + "name": "storage.type.keyword.idea" + }, + "2": { + "name": "entity.name.type.keyword.idea" + } + }, + "end": "\\s+" + } + } +} diff --git a/env/temple-language/grammar/schema.language.json b/env/temple-language/grammar/schema.language.json new file mode 100644 index 0000000..4cc0906 --- /dev/null +++ b/env/temple-language/grammar/schema.language.json @@ -0,0 +1,30 @@ +{ + "fileTypes": ["custom"], + "comments": { + "lineComment": "//" + }, + "brackets": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ], + "autoClosingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""] + ], + "surroundingPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"], + ["\"", "\""] + ], + "wordPattern": "(-?\\d*\\.\\d\\w*)|([^\\`\\~\\!\\#\\%\\^\\&\\*\\-\\=\\+\\{\\}\\(\\)\\[\\]\\|\\;\\:\\'\\\"\\,\\.\\<\\>\\/\\s]+)", + "folding": { + "markers": { + "start": "^\\s*//\\s*#?region\\b", + "end": "^\\s*//\\s*#?endregion\\b" + } + } +} \ No newline at end of file diff --git a/env/temple-language/package.json b/env/temple-language/package.json new file mode 100644 index 0000000..bb7da18 --- /dev/null +++ b/env/temple-language/package.json @@ -0,0 +1,92 @@ +{ + "name": "temple-language", + "version": "0.0.13", + "description": "Adds syntax highlighting, formatting, auto-completion, jump-to-definition and linting for .tml files.", + "license": "Apache-2.0", + "author": "Chris ", + "publisher": "ossph", + "homepage": "https://github.com/OSSPhilippines/temple", + "bugs": "https://github.com/OSSPhilippines/temple/issues", + "repository": "OSSPhilippines/temple", + "categories": [ + "Programming Languages" + ], + "keywords": [ + "multi-root ready" + ], + "activationEvents": [ + "onLanguage:plaintext" + ], + "contributes": { + "configuration": { + "type": "object", + "title": "Basic configuration", + "properties": { + "languageServerExample.maxNumberOfProblems": { + "scope": "resource", + "type": "number", + "default": 100, + "description": "Controls the maximum number of problems produced by the server." + }, + "languageServerExample.trace.server": { + "scope": "window", + "type": "string", + "enum": [ + "off", + "messages", + "verbose" + ], + "default": "off", + "description": "Traces the communication between VS Code and the language server." + } + } + }, + "languages": [ + { + "id": "custom", + "aliases": [ "Custom", "custom" ], + "extensions": [ ".custom" ], + "configuration": "./grammar/schema.language.json" + } + ], + "grammars": [ + { + "language": "custom", + "scopeName": "source.custom", + "path": "./grammar/schema.grammar.json" + } + ] + }, + "main": "./client/out/index.js", + "scripts": { + "build": "yarn build:client && yarn build:server && yarn build:tests", + "build:client": "yarn --cwd client build", + "build:server": "yarn --cwd server build", + "build:tests": "yarn --cwd tests build", + "test": "yarn build && sh tests/boot.sh" + }, + "engines": { + "vscode": "^1.75.0" + }, + "dependencies": { + "typescript": "5.4.5", + "vscode-languageclient": "9.0.1", + "vscode-languageserver": "8.1.0", + "vscode-languageserver-textdocument": "1.0.8", + "vscode-uri": "3.0.8" + }, + "devDependencies": { + "@types/mocha": "9.1.1", + "@types/node": "20.11.16", + "@types/vscode": "1.90.0", + "@typescript-eslint/eslint-plugin": "5.62.0", + "@typescript-eslint/parser": "5.61.0", + "@vscode/test-electron": "2.4.0", + "cross-env": "7.0.3", + "prettier": "3.3.1", + "eslint": "8.57.0", + "mocha": "9.2.2", + "ts-mocha": "9.0.2", + "ts-node": "10.9.2" + } +} \ No newline at end of file diff --git a/env/temple-language/server/package.json b/env/temple-language/server/package.json new file mode 100644 index 0000000..8e7df03 --- /dev/null +++ b/env/temple-language/server/package.json @@ -0,0 +1,20 @@ +{ + "name": "temple-language-server", + "description": "Implementation of temple language server in node.", + "version": "0.0.13", + "author": "Chris ", + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/OSSPhilippines/temple" + }, + "scripts": { + "build": "tsc" + }, + "dependencies": { + "typescript": "5.4.5", + "vscode-languageserver": "8.1.0", + "vscode-languageserver-textdocument": "1.0.8", + "vscode-uri": "3.0.8" + } +} diff --git a/env/temple-language/server/src/Logger.ts b/env/temple-language/server/src/Logger.ts new file mode 100644 index 0000000..6facfac --- /dev/null +++ b/env/temple-language/server/src/Logger.ts @@ -0,0 +1,28 @@ +export default class Logger { + private static logErrorsOnly = false; + private static logDebug = false; + + static setLogErrorsOnly(logErrorsOnly: boolean) { + Logger.logErrorsOnly = logErrorsOnly; + } + + static setDebug(debug: boolean) { + this.logDebug = debug; + } + + static log(...args: any) { + if (!Logger.logErrorsOnly) { + console.log(...args); + } + } + + static error(...args: any) { + console.error(...args); + } + + static debug(...args: any) { + if (!Logger.logErrorsOnly && this.logDebug) { + console.log(...args); + } + } +} \ No newline at end of file diff --git a/env/temple-language/server/src/helpers.ts b/env/temple-language/server/src/helpers.ts new file mode 100644 index 0000000..908b2d0 --- /dev/null +++ b/env/temple-language/server/src/helpers.ts @@ -0,0 +1,153 @@ +import { Position } from 'vscode-languageserver/node'; +import { URI } from 'vscode-uri'; + +/** + * Returns the path of the url if the scheme is file + */ +export function urlToPath(stringUrl: string): string | null { + const url = URI.parse(stringUrl); + if (url.scheme !== 'file') { + return null; + } + return url.fsPath.replace(/\\/g, '/'); +} + +/** + * Returns the url of the path + */ +export function pathToUrl(path: string) { + return URI.file(path).toString(); +} + +/** + * Some paths (on windows) start with a upper case driver letter, some don't. + * This is normalized here. + */ +export function normalizePath(path: string): string { + return URI.file(path).fsPath.replace(/\\/g, '/'); +} + +/** + * URIs coming from the client could be encoded in a different + * way than expected / than the internal services create them. + * This normalizes them to be the same as the internally generated ones. + */ +export function normalizeUri(uri: string): string { + return URI.parse(uri).toString(); +} + +/** + * Returns the highest minimum value + */ +export function clamp(num: number, min: number, max: number): number { + return Math.max(min, Math.min(max, num)); +} + +/** + * Get the line and character based on the offset + */ +export function positionAt( + offset: number, + text: string, + lineOffsets = getLineOffsets(text) +): Position { + offset = clamp(offset, 0, text.length); + + let low = 0; + let high = lineOffsets.length; + if (high === 0) { + return Position.create(0, offset); + } + + while (low <= high) { + const mid = Math.floor((low + high) / 2); + const lineOffset = lineOffsets[mid]; + + if (lineOffset === offset) { + return Position.create(mid, 0); + } else if (offset > lineOffset) { + low = mid + 1; + } else { + high = mid - 1; + } + } + + // low is the least x for which the line offset is larger than the current offset + // or array.length if no line offset is larger than the current offset + const line = low - 1; + return Position.create(line, offset - lineOffsets[line]); +} + +/** + * Get the offset of the line and character position + */ +export function offsetAt( + position: Position, + text: string, + lineOffsets = getLineOffsets(text) +): number { + if (position.line >= lineOffsets.length) { + return text.length; + } else if (position.line < 0) { + return 0; + } + + const lineOffset = lineOffsets[position.line]; + const nextLineOffset = + position.line + 1 < lineOffsets.length ? lineOffsets[position.line + 1] : text.length; + + return clamp(nextLineOffset, lineOffset, lineOffset + position.character); +} + +/** + * Get the line offsets + */ +export function getLineOffsets(text: string) { + const lineOffsets = []; + let isLineStart = true; + + for (let i = 0; i < text.length; i++) { + if (isLineStart) { + lineOffsets.push(i); + isLineStart = false; + } + const ch = text.charAt(i); + isLineStart = ch === '\r' || ch === '\n'; + if (ch === '\r' && i + 1 < text.length && text.charAt(i + 1) === '\n') { + i++; + } + } + + if (isLineStart && text.length > 0) { + lineOffsets.push(text.length); + } + + return lineOffsets; +} + +export type GetCanonicalFileName = (fileName: string) => string; +/** + * adopted from https://github.com/microsoft/TypeScript/blob/8192d550496d884263e292488e325ae96893dc78/src/compiler/core.ts#L2312 + */ +export function createGetCanonicalFileName( + useCaseSensitiveFileNames: boolean +): GetCanonicalFileName { + return useCaseSensitiveFileNames ? identity : toFileNameLowerCase; +} + +function identity(x: T) { + return x; +} + +/** + * adopted from https://github.com/microsoft/TypeScript/blob/8192d550496d884263e292488e325ae96893dc78/src/compiler/core.ts#L1769-L1807 + * see the comment there about why we can't just use String.prototype.toLowerCase() here + */ +export function toFileNameLowerCase(x: string) { + const filenameLower = /[^\u0130\u0131\u00DFa-z0-9\\/:\-_\. ]+/g; + return filenameLower.test(x) ? x.replace(filenameLower, toLowerCase) : x; +} + +function toLowerCase(x: string) { + return x.toLowerCase(); +} \ No newline at end of file diff --git a/env/temple-language/server/src/index.ts b/env/temple-language/server/src/index.ts new file mode 100644 index 0000000..07534ee --- /dev/null +++ b/env/temple-language/server/src/index.ts @@ -0,0 +1,209 @@ +import type { + TextDocument, + Diagnostic, + InitializeResult, + DocumentDiagnosticReport +} from './language/LanguageServer'; + +import LanguageServer, { + DiagnosticSeverity, + DidChangeConfigurationNotification, + DocumentDiagnosticReportKind, + CompletionItem, + CompletionItemKind, + TextDocumentSyncKind +} from './language/LanguageServer'; + +// - validate example usage +async function validate(document: TextDocument) { + // In this simple example we get the settings for every validate run. + const settings = await server.settings.get(document.uri); + + // The validator creates diagnostics for all uppercase words length 2 and more + const text = document.getText(); + + const pattern = /\b[A-Z]{2,}\b/g; + let m: RegExpExecArray | null; + + const diagnostics: Diagnostic[] = []; + + let problems = 0; + while ((m = pattern.exec(text)) && problems < settings.maxNumberOfProblems) { + problems++; + const diagnostic: Diagnostic = { + severity: DiagnosticSeverity.Warning, + range: { + start: document.positionAt(m.index), + end: document.positionAt(m.index + m[0].length) + }, + message: `${m[0]} is all uppercase.`, + source: 'ex' + }; + if (server.canDiagnose) { + diagnostic.relatedInformation = [ + { + location: { + uri: document.uri, + range: Object.assign({}, diagnostic.range) + }, + message: 'Spelling matters' + }, + { + location: { + uri: document.uri, + range: Object.assign({}, diagnostic.range) + }, + message: 'Particularly for names' + } + ]; + } + diagnostics.push(diagnostic); + } + + // Send the computed diagnostics to VSCode. + server.connection.sendDiagnostics({ uri: document.uri, diagnostics }); + + return diagnostics; +}; + +const server = new LanguageServer({ maxNumberOfProblems: 1000 }); + +// Triggered when the language server is first initialized. This is +// one of the first messages sent by the client to the server. +server.connection.onInitialize(params => { + const capabilities = params.capabilities; + // Does the client support the `workspace/configuration` request? + // If not, we fall back using global settings. + server.canConfigure = !!( + capabilities.workspace && !!capabilities.workspace.configuration + ); + server.inWorkspace = !!( + capabilities.workspace && !!capabilities.workspace.workspaceFolders + ); + server.canDiagnose = !!( + capabilities.textDocument && + capabilities.textDocument.publishDiagnostics && + capabilities.textDocument.publishDiagnostics.relatedInformation + ); + + const result: InitializeResult = { + capabilities: { + textDocumentSync: TextDocumentSyncKind.Incremental, + // Tell the client that this server supports code completion. + completionProvider: { + resolveProvider: true + } + } + }; + if (server.inWorkspace) { + result.capabilities.workspace = { + workspaceFolders: { + supported: true + } + }; + } + return result; +}); +// Triggered after the server has been initialized. This is used for +// any additional setup that might be needed after initialization. +server.connection.onInitialized(() => { + if (server.canConfigure) { + // Register for all configuration changes. + server.connection.client.register(DidChangeConfigurationNotification.type, undefined); + } + if (server.inWorkspace) { + server.connection.workspace.onDidChangeWorkspaceFolders(event => { + server.connection.console.log('Workspace folder change event received.'); + }); + } +}); +// Triggered when the client sends an exit notification, usually +// when the client is shutting down. +server.connection.onExit(() => { + server.connection.console.log('The client is shutting down.'); +}); +// Triggered when the client detects changes in configuration +// settings that might affect the server's behavior. +server.connection.onDidChangeConfiguration(change => { + server.settings.reset(change.settings.languageServerExample); + // Revalidate all open text documents + server.documents.all().forEach(document => { + validate(document); + }); +}); +// Triggered when watched files change, such as when a file is +// created, modified, or deleted. +server.connection.onDidChangeWatchedFiles(change => { + server.connection.console.log('We received an file change event'); +}); +// Triggered when the user requests code completion suggestions. +// This usually occurs when the user is typing and invokes the +// auto-completion feature (e.g., by typing a dot after an object or +// invoking a completion command manually). The server responds with +// a list of completion items relevant to the context. +// This handler provides the initial list of the completion items. +server.connection.onCompletion(position => { + const items: CompletionItem[] = []; + // The pass parameter contains the position of the text document in + // which code complete got requested. For the example we ignore this + // info and always provide the same completion items. + items.push({ + label: 'TypeScript', + kind: CompletionItemKind.Text, + data: 1 + }, + { + label: 'JavaScript', + kind: CompletionItemKind.Text, + data: 2 + }); + return items; +}); +// Triggered when additional information about a specific completion +// item is needed. After the initial completion items are provided by +// the onCompletion handler, the client may request more details +// about a particular item (e.g., documentation, additional text +// edits). This allows the server to provide more detailed and +// context-specific information for the selected completion item. +// This handler resolves additional information for the item selected in +// the completion list. +server.connection.onCompletionResolve(item => { + if (item.data === 1) { + item.detail = 'TypeScript details'; + item.documentation = 'TypeScript documentation'; + } else if (item.data === 2) { + item.detail = 'JavaScript details'; + item.documentation = 'JavaScript documentation'; + } + return item; +}); + +server.connection.languages.diagnostics.on(async (params) => { + const document = server.documents.get(params.textDocument.uri); + + if (document !== undefined) { + return { + kind: DocumentDiagnosticReportKind.Full, + items: await validate(document) + } satisfies DocumentDiagnosticReport; + } else { + // We don't know the document. We can either try to read it from disk + // or we don't report problems for it. + return { + kind: DocumentDiagnosticReportKind.Full, + items: [] + } satisfies DocumentDiagnosticReport; + } +}); + +// Only keep settings for open documents +server.documents.onDidClose(event => { + server.settings.remove(event.document.uri); +}); +// The content of a text document has changed. This event is emitted +// when the text document first opened or when its content has changed. +server.documents.onDidChangeContent(change => { + validate(change.document); +}); + +server.listen(); \ No newline at end of file diff --git a/env/temple-language/server/src/language/LanguageServer.ts b/env/temple-language/server/src/language/LanguageServer.ts new file mode 100644 index 0000000..e15f028 --- /dev/null +++ b/env/temple-language/server/src/language/LanguageServer.ts @@ -0,0 +1,145 @@ +import type { + CompletionItem, + Connection, + Diagnostic, + DocumentDiagnosticReport, + InitializeResult +} from 'vscode-languageserver/node'; +import { + CompletionItemKind, + createConnection, + DiagnosticSeverity, + DocumentDiagnosticReportKind, + DidChangeConfigurationNotification, + ProposedFeatures, + TextDocuments, + TextDocumentSyncKind +} from 'vscode-languageserver/node'; +import { TextDocument } from 'vscode-languageserver-textdocument'; +import LanguageSettings from './LanguageSettings'; + +export type { + Diagnostic, + InitializeResult, + DocumentDiagnosticReport +}; + +export { + DiagnosticSeverity, + DidChangeConfigurationNotification, + DocumentDiagnosticReportKind, + CompletionItem, + CompletionItemKind, + TextDocument, + TextDocumentSyncKind +}; + +/** + * Event wrapper for VSCode Language Server + */ +export default class LanguageServer { + //the server connection + protected _connection: Connection|null = null; + //list of open documents + protected _documents: TextDocuments|null = null; + //custom language settings + protected _settings: LanguageSettings; + //has configuration capability + protected _canConfigure = false; + //has diagnostic related information capability + protected _canDiagnose = false; + //has workspace folder capability + protected _inWorkspace = false; + + /** + * Returns true if has configuration capability + */ + public get canConfigure() { + return this._canConfigure; + } + + /** + * Returns true if has diagnostic related information capability + */ + public get canDiagnose() { + return this._canDiagnose; + } + + /** + * Returns true if has workspace folder capability + */ + public get inWorkspace() { + return this._inWorkspace; + } + + /** + * Whether if has configuration capability + */ + public set canConfigure(can: boolean) { + this._canConfigure = can; + } + + /** + * Whether if has diagnostic related information capability + */ + public set canDiagnose(can: boolean) { + this._canDiagnose = can; + } + + /** + * Whether if has workspace folder capability + */ + public set inWorkspace(inside: boolean) { + this._inWorkspace = inside; + } + + /** + * Returns the server connection + */ + public get connection() { + if (!this._connection) { + // Create a connection for the server, using Node's IPC as a transport. + // Also include all preview / proposed LSP features. + this._connection = createConnection(ProposedFeatures.all); + } + return this._connection; + } + + /** + * Returns the list of open documents + */ + public get documents() { + if (!this._documents) { + // Create a simple text document manager. + this._documents = new TextDocuments(TextDocument); + } + + return this._documents; + } + + /** + * Returns the custom language settings + */ + public get settings() { + return this._settings; + } + + /** + * Processes the initialization parameters + */ + public constructor(settings: Record) { + this._settings = new LanguageSettings(this, settings); + } + + /** + * Starts the server + */ + public listen() { + // Make the text document manager listen on the connection + // for open, change and close text document events + this.documents.listen(this.connection); + + // Listen on the connection + this.connection.listen(); + } +} \ No newline at end of file diff --git a/env/temple-language/server/src/language/LanguageSettings.ts b/env/temple-language/server/src/language/LanguageSettings.ts new file mode 100644 index 0000000..f2b7bdc --- /dev/null +++ b/env/temple-language/server/src/language/LanguageSettings.ts @@ -0,0 +1,64 @@ +import type LanguageServer from './LanguageServer'; + +export default class ServerSettings> { + //the server connection + protected _server: LanguageServer; + //default settings + protected _defaults: S; + //cached settings + protected _cache: Map>; + + /** + * Sets the server and default settings + */ + constructor(server: LanguageServer, defaults: S) { + this._server = server; + this._defaults = defaults; + this._cache = new Map(); + } + + /** + * Returns the settings for the given resource + */ + get(resource: string) { + if (!this._server.canConfigure) { + return Promise.resolve(this._defaults); + } + let result = this._cache.get(resource); + + if (!result) { + result = this._server.connection.workspace.getConfiguration({ + scopeUri: resource, + section: 'languageServerExample' + }); + this.set(resource, result); + } + return result; + } + + /** + * Removes the settings for the given resource + */ + remove(resource: string) { + this._cache.delete(resource); + } + + /** + * Resets the settings + */ + reset(settings: S) { + if (this._server.canConfigure) { + // Reset all cached document settings + this._cache.clear(); + } else { + this._defaults = (settings || this._defaults); + } + } + + /** + * Sets the settings for the given resource + */ + set(resource: string, result: Thenable) { + this._cache.set(resource, result); + } +} \ No newline at end of file diff --git a/env/temple-language/server/tsconfig.json b/env/temple-language/server/tsconfig.json new file mode 100644 index 0000000..5c2245a --- /dev/null +++ b/env/temple-language/server/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "es2020", + "lib": ["es2020"], + "module": "commonjs", + "moduleResolution": "node", + "sourceMap": true, + "strict": true, + "outDir": "out", + "rootDir": "src", + "types": [] + }, + "include": ["src"], + "exclude": ["node_modules"] +} diff --git a/packages/interfaces/temple-web/public/temple-icon.png b/env/temple-language/temple-icon.png similarity index 100% rename from packages/interfaces/temple-web/public/temple-icon.png rename to env/temple-language/temple-icon.png diff --git a/env/temple-language/temple-icon.svg b/env/temple-language/temple-icon.svg new file mode 100644 index 0000000..65edc72 --- /dev/null +++ b/env/temple-language/temple-icon.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/interfaces/temple-web/public/temple-logo.png b/env/temple-language/temple-logo.png similarity index 100% rename from packages/interfaces/temple-web/public/temple-logo.png rename to env/temple-language/temple-logo.png diff --git a/env/temple-language/tests/boot.sh b/env/temple-language/tests/boot.sh new file mode 100755 index 0000000..aed11a8 --- /dev/null +++ b/env/temple-language/tests/boot.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +export CODE_TESTS_PATH="$(pwd)/tests/out/asserts" +export CODE_TESTS_WORKSPACE="$(pwd)/tests/out/workspace" + +node "$(pwd)/tests/out/workspace/run.js" \ No newline at end of file diff --git a/env/temple-language/tests/fixtures/completion.tml b/env/temple-language/tests/fixtures/completion.tml new file mode 100644 index 0000000..e69de29 diff --git a/env/temple-language/tests/fixtures/diagnostics.tml b/env/temple-language/tests/fixtures/diagnostics.tml new file mode 100644 index 0000000..d910cfb --- /dev/null +++ b/env/temple-language/tests/fixtures/diagnostics.tml @@ -0,0 +1 @@ +ANY browsers, ANY OS. \ No newline at end of file diff --git a/env/temple-language/tests/package.json b/env/temple-language/tests/package.json new file mode 100644 index 0000000..de0a20f --- /dev/null +++ b/env/temple-language/tests/package.json @@ -0,0 +1,15 @@ +{ + "name": "temple-language-tests", + "displayName": "Temple Language", + "description": "Adds syntax highlighting, formatting, auto-completion, jump-to-definition and linting for a custom.", + "version": "0.0.13", + "license": "MIT", + "publisher": "ossph", + "main": "./client", + "scripts": { + "build": "tsc" + }, + "dependencies": { + "vscode-languageclient": "9.0.1" + } +} \ No newline at end of file diff --git a/env/temple-language/tests/src/asserts/completion.test.ts b/env/temple-language/tests/src/asserts/completion.test.ts new file mode 100644 index 0000000..989eb78 --- /dev/null +++ b/env/temple-language/tests/src/asserts/completion.test.ts @@ -0,0 +1,38 @@ +import * as vscode from 'vscode'; +import * as assert from 'assert'; +import { getDocUri, activate } from '../workspace/helper'; + +suite('Should do completion', () => { + const docUri = getDocUri('completion.tml'); + + test('Completes JS/TS in txt file', async () => { + await testCompletion(docUri, new vscode.Position(0, 0), { + items: [ + { label: 'JavaScript', kind: vscode.CompletionItemKind.Text }, + { label: 'TypeScript', kind: vscode.CompletionItemKind.Text } + ] + }); + }); +}); + +async function testCompletion( + docUri: vscode.Uri, + position: vscode.Position, + expectedCompletionList: vscode.CompletionList +) { + await activate(docUri); + + // Executing the command `vscode.executeCompletionItemProvider` to simulate triggering completion + const actualCompletionList = (await vscode.commands.executeCommand( + 'vscode.executeCompletionItemProvider', + docUri, + position + )) as vscode.CompletionList; + + assert.ok(actualCompletionList.items.length >= 2); + expectedCompletionList.items.forEach((expectedItem, i) => { + const actualItem = actualCompletionList.items[i]; + assert.equal(actualItem.label, expectedItem.label); + assert.equal(actualItem.kind, expectedItem.kind); + }); +} \ No newline at end of file diff --git a/env/temple-language/tests/src/asserts/diagnostics.test.ts b/env/temple-language/tests/src/asserts/diagnostics.test.ts new file mode 100644 index 0000000..6a93e34 --- /dev/null +++ b/env/temple-language/tests/src/asserts/diagnostics.test.ts @@ -0,0 +1,36 @@ +import * as vscode from 'vscode'; +import * as assert from 'assert'; +import { getDocUri, activate } from '../workspace/helper'; + +suite('Should get diagnostics', () => { + const docUri = getDocUri('diagnostics.tml'); + + test('Diagnoses uppercase texts', async () => { + await testDiagnostics(docUri, [ + { message: 'ANY is all uppercase.', range: toRange(0, 0, 0, 3), severity: vscode.DiagnosticSeverity.Warning, source: 'ex' }, + { message: 'ANY is all uppercase.', range: toRange(0, 14, 0, 17), severity: vscode.DiagnosticSeverity.Warning, source: 'ex' }, + { message: 'OS is all uppercase.', range: toRange(0, 18, 0, 20), severity: vscode.DiagnosticSeverity.Warning, source: 'ex' } + ]); + }); +}); + +function toRange(sLine: number, sChar: number, eLine: number, eChar: number) { + const start = new vscode.Position(sLine, sChar); + const end = new vscode.Position(eLine, eChar); + return new vscode.Range(start, end); +} + +async function testDiagnostics(docUri: vscode.Uri, expectedDiagnostics: vscode.Diagnostic[]) { + await activate(docUri); + + const actualDiagnostics = vscode.languages.getDiagnostics(docUri); + + assert.equal(actualDiagnostics.length, expectedDiagnostics.length); + + expectedDiagnostics.forEach((expectedDiagnostic, i) => { + const actualDiagnostic = actualDiagnostics[i]; + assert.equal(actualDiagnostic.message, expectedDiagnostic.message); + assert.deepEqual(actualDiagnostic.range, expectedDiagnostic.range); + assert.equal(actualDiagnostic.severity, expectedDiagnostic.severity); + }); +} \ No newline at end of file diff --git a/env/temple-language/tests/src/workspace/helper.ts b/env/temple-language/tests/src/workspace/helper.ts new file mode 100644 index 0000000..0cb171d --- /dev/null +++ b/env/temple-language/tests/src/workspace/helper.ts @@ -0,0 +1,45 @@ +import * as vscode from 'vscode'; +import * as path from 'path'; + +export let doc: vscode.TextDocument; +export let editor: vscode.TextEditor; +export let documentEol: string; +export let platformEol: string; + +/** + * Activates the customauthor.custom-langugage extension + */ +export async function activate(docUri: vscode.Uri) { + // The extensionId is `publisher.name` from package.json + const ext = vscode.extensions.getExtension('ossph.temple-language'); + if (!ext) { + throw new Error('Extension not found'); + } + await ext.activate(); + try { + doc = await vscode.workspace.openTextDocument(docUri); + editor = await vscode.window.showTextDocument(doc); + await sleep(2000); // Wait for server activation + } catch (e) { + console.error(e); + } +} + +async function sleep(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +export const getDocPath = (p: string) => { + return path.resolve(__dirname, '../../fixtures', p); +}; +export const getDocUri = (p: string) => { + return vscode.Uri.file(getDocPath(p)); +}; + +export async function setTestContent(content: string): Promise { + const all = new vscode.Range( + doc.positionAt(0), + doc.positionAt(doc.getText().length) + ); + return editor.edit(eb => eb.replace(all, content)); +} \ No newline at end of file diff --git a/env/temple-language/tests/src/workspace/index.ts b/env/temple-language/tests/src/workspace/index.ts new file mode 100644 index 0000000..00282c5 --- /dev/null +++ b/env/temple-language/tests/src/workspace/index.ts @@ -0,0 +1,39 @@ +import * as path from 'path'; +import * as Mocha from 'mocha'; +import * as glob from 'glob'; + +export function run(): Promise { + // Create the mocha test + const mocha = new Mocha({ + ui: 'tdd', + color: true + }); + mocha.timeout(100000); + + const testsRoot = path.resolve(__dirname, '../asserts'); + + return new Promise((resolve, reject) => { + glob('**.test.js', { cwd: testsRoot }, (err, files) => { + if (err) { + return reject(err); + } + + // Add files to the test suite + files.forEach(f => mocha.addFile(path.resolve(testsRoot, f))); + + try { + // Run the mocha test + mocha.run(failures => { + if (failures > 0) { + reject(new Error(`${failures} tests failed.`)); + } else { + resolve(); + } + }); + } catch (err) { + console.error(err); + reject(err); + } + }); + }); +} \ No newline at end of file diff --git a/env/temple-language/tests/src/workspace/run.ts b/env/temple-language/tests/src/workspace/run.ts new file mode 100644 index 0000000..e052d99 --- /dev/null +++ b/env/temple-language/tests/src/workspace/run.ts @@ -0,0 +1,22 @@ +import * as path from 'path'; + +import { runTests } from '@vscode/test-electron'; + +async function main() { + try { + // The folder containing the Extension Manifest package.json + // Passed to `--extensionDevelopmentPath` + const extensionDevelopmentPath = path.resolve(__dirname, '../../..'); + // The path to test runner + // Passed to --extensionTestsPath + const extensionTestsPath = path.resolve(__dirname, './index'); + + // Download VS Code, unzip it and run the integration test + await runTests({ extensionDevelopmentPath, extensionTestsPath }); + } catch (err) { + console.error('Failed to run tests:', err); + process.exit(1); + } +} + +main(); diff --git a/env/temple-language/tests/tsconfig.json b/env/temple-language/tests/tsconfig.json new file mode 100644 index 0000000..d3ca77f --- /dev/null +++ b/env/temple-language/tests/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es2020", + "lib": ["es2020"], + "outDir": "out", + "rootDir": "src", + "resolveJsonModule": true, + "sourceMap": true, + "types": [] + }, + "include": ["src"], + "exclude": [ "node_modules", ".vscode-test" ] +} diff --git a/packages/environments/temple-prettier/package.json b/env/temple-prettier/package.json similarity index 100% rename from packages/environments/temple-prettier/package.json rename to env/temple-prettier/package.json diff --git a/packages/environments/temple-typescript/README.md b/env/temple-typescript/README.md similarity index 100% rename from packages/environments/temple-typescript/README.md rename to env/temple-typescript/README.md diff --git a/packages/environments/temple-typescript/package.json b/env/temple-typescript/package.json similarity index 100% rename from packages/environments/temple-typescript/package.json rename to env/temple-typescript/package.json diff --git a/packages/environments/temple-typescript/tsconfig.json b/env/temple-typescript/tsconfig.json similarity index 100% rename from packages/environments/temple-typescript/tsconfig.json rename to env/temple-typescript/tsconfig.json diff --git a/packages/environments/temple-typescript/types/dtml.d.ts b/env/temple-typescript/types/dtml.d.ts similarity index 100% rename from packages/environments/temple-typescript/types/dtml.d.ts rename to env/temple-typescript/types/dtml.d.ts diff --git a/packages/environments/temple-typescript/types/tml.d.ts b/env/temple-typescript/types/tml.d.ts similarity index 100% rename from packages/environments/temple-typescript/types/tml.d.ts rename to env/temple-typescript/types/tml.d.ts diff --git a/packages/interfaces/temple-web/LICENSE b/interfaces/temple-web/LICENSE similarity index 100% rename from packages/interfaces/temple-web/LICENSE rename to interfaces/temple-web/LICENSE diff --git a/packages/interfaces/temple-web/README.md b/interfaces/temple-web/README.md similarity index 100% rename from packages/interfaces/temple-web/README.md rename to interfaces/temple-web/README.md diff --git a/packages/interfaces/temple-web/package.json b/interfaces/temple-web/package.json similarity index 100% rename from packages/interfaces/temple-web/package.json rename to interfaces/temple-web/package.json diff --git a/packages/interfaces/temple-web/public/favicon.ico b/interfaces/temple-web/public/favicon.ico similarity index 100% rename from packages/interfaces/temple-web/public/favicon.ico rename to interfaces/temple-web/public/favicon.ico diff --git a/packages/interfaces/temple-web/public/favicon.png b/interfaces/temple-web/public/favicon.png similarity index 100% rename from packages/interfaces/temple-web/public/favicon.png rename to interfaces/temple-web/public/favicon.png diff --git a/packages/interfaces/temple-web/public/styles/theme.css b/interfaces/temple-web/public/styles/theme.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/theme.css rename to interfaces/temple-web/public/styles/theme.css diff --git a/packages/interfaces/temple-web/public/styles/ui/alert.css b/interfaces/temple-web/public/styles/ui/alert.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/alert.css rename to interfaces/temple-web/public/styles/ui/alert.css diff --git a/packages/interfaces/temple-web/public/styles/ui/badge.css b/interfaces/temple-web/public/styles/ui/badge.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/badge.css rename to interfaces/temple-web/public/styles/ui/badge.css diff --git a/packages/interfaces/temple-web/public/styles/ui/button.css b/interfaces/temple-web/public/styles/ui/button.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/button.css rename to interfaces/temple-web/public/styles/ui/button.css diff --git a/packages/interfaces/temple-web/public/styles/ui/control.css b/interfaces/temple-web/public/styles/ui/control.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/control.css rename to interfaces/temple-web/public/styles/ui/control.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/autocomplete.css b/interfaces/temple-web/public/styles/ui/fields/autocomplete.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/autocomplete.css rename to interfaces/temple-web/public/styles/ui/fields/autocomplete.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/date.css b/interfaces/temple-web/public/styles/ui/fields/date.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/date.css rename to interfaces/temple-web/public/styles/ui/fields/date.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/datetime.css b/interfaces/temple-web/public/styles/ui/fields/datetime.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/datetime.css rename to interfaces/temple-web/public/styles/ui/fields/datetime.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/file.css b/interfaces/temple-web/public/styles/ui/fields/file.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/file.css rename to interfaces/temple-web/public/styles/ui/fields/file.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/filelist.css b/interfaces/temple-web/public/styles/ui/fields/filelist.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/filelist.css rename to interfaces/temple-web/public/styles/ui/fields/filelist.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/image.css b/interfaces/temple-web/public/styles/ui/fields/image.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/image.css rename to interfaces/temple-web/public/styles/ui/fields/image.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/imagelist.css b/interfaces/temple-web/public/styles/ui/fields/imagelist.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/imagelist.css rename to interfaces/temple-web/public/styles/ui/fields/imagelist.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/input.css b/interfaces/temple-web/public/styles/ui/fields/input.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/input.css rename to interfaces/temple-web/public/styles/ui/fields/input.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/markdown.css b/interfaces/temple-web/public/styles/ui/fields/markdown.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/markdown.css rename to interfaces/temple-web/public/styles/ui/fields/markdown.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/metadata.css b/interfaces/temple-web/public/styles/ui/fields/metadata.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/metadata.css rename to interfaces/temple-web/public/styles/ui/fields/metadata.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/option.css b/interfaces/temple-web/public/styles/ui/fields/option.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/option.css rename to interfaces/temple-web/public/styles/ui/fields/option.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/password.css b/interfaces/temple-web/public/styles/ui/fields/password.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/password.css rename to interfaces/temple-web/public/styles/ui/fields/password.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/select.css b/interfaces/temple-web/public/styles/ui/fields/select.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/select.css rename to interfaces/temple-web/public/styles/ui/fields/select.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/switch.css b/interfaces/temple-web/public/styles/ui/fields/switch.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/switch.css rename to interfaces/temple-web/public/styles/ui/fields/switch.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/taglist.css b/interfaces/temple-web/public/styles/ui/fields/taglist.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/taglist.css rename to interfaces/temple-web/public/styles/ui/fields/taglist.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/textarea.css b/interfaces/temple-web/public/styles/ui/fields/textarea.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/textarea.css rename to interfaces/temple-web/public/styles/ui/fields/textarea.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/textlist.css b/interfaces/temple-web/public/styles/ui/fields/textlist.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/textlist.css rename to interfaces/temple-web/public/styles/ui/fields/textlist.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fields/time.css b/interfaces/temple-web/public/styles/ui/fields/time.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fields/time.css rename to interfaces/temple-web/public/styles/ui/fields/time.css diff --git a/packages/interfaces/temple-web/public/styles/ui/fieldset.css b/interfaces/temple-web/public/styles/ui/fieldset.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/fieldset.css rename to interfaces/temple-web/public/styles/ui/fieldset.css diff --git a/packages/interfaces/temple-web/public/styles/ui/formats/color.css b/interfaces/temple-web/public/styles/ui/formats/color.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/formats/color.css rename to interfaces/temple-web/public/styles/ui/formats/color.css diff --git a/packages/interfaces/temple-web/public/styles/ui/formats/country.css b/interfaces/temple-web/public/styles/ui/formats/country.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/formats/country.css rename to interfaces/temple-web/public/styles/ui/formats/country.css diff --git a/packages/interfaces/temple-web/public/styles/ui/formats/imagelist.css b/interfaces/temple-web/public/styles/ui/formats/imagelist.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/formats/imagelist.css rename to interfaces/temple-web/public/styles/ui/formats/imagelist.css diff --git a/packages/interfaces/temple-web/public/styles/ui/formats/list.css b/interfaces/temple-web/public/styles/ui/formats/list.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/formats/list.css rename to interfaces/temple-web/public/styles/ui/formats/list.css diff --git a/packages/interfaces/temple-web/public/styles/ui/formats/taglist.css b/interfaces/temple-web/public/styles/ui/formats/taglist.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/formats/taglist.css rename to interfaces/temple-web/public/styles/ui/formats/taglist.css diff --git a/packages/interfaces/temple-web/public/styles/ui/index.css b/interfaces/temple-web/public/styles/ui/index.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/index.css rename to interfaces/temple-web/public/styles/ui/index.css diff --git a/packages/interfaces/temple-web/public/styles/ui/loader.css b/interfaces/temple-web/public/styles/ui/loader.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/loader.css rename to interfaces/temple-web/public/styles/ui/loader.css diff --git a/packages/interfaces/temple-web/public/styles/ui/modal.css b/interfaces/temple-web/public/styles/ui/modal.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/modal.css rename to interfaces/temple-web/public/styles/ui/modal.css diff --git a/packages/interfaces/temple-web/public/styles/ui/table.css b/interfaces/temple-web/public/styles/ui/table.css similarity index 100% rename from packages/interfaces/temple-web/public/styles/ui/table.css rename to interfaces/temple-web/public/styles/ui/table.css diff --git a/interfaces/temple-web/public/temple-icon.png b/interfaces/temple-web/public/temple-icon.png new file mode 100644 index 0000000..68bd090 Binary files /dev/null and b/interfaces/temple-web/public/temple-icon.png differ diff --git a/interfaces/temple-web/public/temple-logo.png b/interfaces/temple-web/public/temple-logo.png new file mode 100644 index 0000000..876bd58 Binary files /dev/null and b/interfaces/temple-web/public/temple-logo.png differ diff --git a/packages/interfaces/temple-web/src/build.ts b/interfaces/temple-web/src/build.ts similarity index 100% rename from packages/interfaces/temple-web/src/build.ts rename to interfaces/temple-web/src/build.ts diff --git a/packages/interfaces/temple-web/src/components/code-preview.html b/interfaces/temple-web/src/components/code-preview.html similarity index 100% rename from packages/interfaces/temple-web/src/components/code-preview.html rename to interfaces/temple-web/src/components/code-preview.html diff --git a/packages/interfaces/temple-web/src/components/code-snippet.html b/interfaces/temple-web/src/components/code-snippet.html similarity index 100% rename from packages/interfaces/temple-web/src/components/code-snippet.html rename to interfaces/temple-web/src/components/code-snippet.html diff --git a/packages/interfaces/temple-web/src/components/panel-layout.html b/interfaces/temple-web/src/components/panel-layout.html similarity index 100% rename from packages/interfaces/temple-web/src/components/panel-layout.html rename to interfaces/temple-web/src/components/panel-layout.html diff --git a/packages/interfaces/temple-web/src/components/tweet-box.html b/interfaces/temple-web/src/components/tweet-box.html similarity index 100% rename from packages/interfaces/temple-web/src/components/tweet-box.html rename to interfaces/temple-web/src/components/tweet-box.html diff --git a/packages/interfaces/temple-web/src/components/tweet-box.tml b/interfaces/temple-web/src/components/tweet-box.tml similarity index 100% rename from packages/interfaces/temple-web/src/components/tweet-box.tml rename to interfaces/temple-web/src/components/tweet-box.tml diff --git a/packages/interfaces/temple-web/src/components/window-app.html b/interfaces/temple-web/src/components/window-app.html similarity index 100% rename from packages/interfaces/temple-web/src/components/window-app.html rename to interfaces/temple-web/src/components/window-app.html diff --git a/packages/interfaces/temple-web/src/index.ts b/interfaces/temple-web/src/index.ts similarity index 100% rename from packages/interfaces/temple-web/src/index.ts rename to interfaces/temple-web/src/index.ts diff --git a/packages/interfaces/temple-web/src/modules/snippets/home.ts b/interfaces/temple-web/src/modules/snippets/home.ts similarity index 100% rename from packages/interfaces/temple-web/src/modules/snippets/home.ts rename to interfaces/temple-web/src/modules/snippets/home.ts diff --git a/packages/interfaces/temple-web/src/modules/snippets/test.ts b/interfaces/temple-web/src/modules/snippets/test.ts similarity index 100% rename from packages/interfaces/temple-web/src/modules/snippets/test.ts rename to interfaces/temple-web/src/modules/snippets/test.ts diff --git a/packages/interfaces/temple-web/src/pages/docs/components/templates.html b/interfaces/temple-web/src/pages/docs/components/templates.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/components/templates.html rename to interfaces/temple-web/src/pages/docs/components/templates.html diff --git a/packages/interfaces/temple-web/src/pages/docs/components/web.html b/interfaces/temple-web/src/pages/docs/components/web.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/components/web.html rename to interfaces/temple-web/src/pages/docs/components/web.html diff --git a/packages/interfaces/temple-web/src/pages/docs/contributing.html b/interfaces/temple-web/src/pages/docs/contributing.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/contributing.html rename to interfaces/temple-web/src/pages/docs/contributing.html diff --git a/packages/interfaces/temple-web/src/pages/docs/index.html b/interfaces/temple-web/src/pages/docs/index.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/index.html rename to interfaces/temple-web/src/pages/docs/index.html diff --git a/packages/interfaces/temple-web/src/pages/docs/modes/compiler.html b/interfaces/temple-web/src/pages/docs/modes/compiler.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/modes/compiler.html rename to interfaces/temple-web/src/pages/docs/modes/compiler.html diff --git a/packages/interfaces/temple-web/src/pages/docs/modes/engine.html b/interfaces/temple-web/src/pages/docs/modes/engine.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/modes/engine.html rename to interfaces/temple-web/src/pages/docs/modes/engine.html diff --git a/packages/interfaces/temple-web/src/pages/docs/modes/publisher.html b/interfaces/temple-web/src/pages/docs/modes/publisher.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/modes/publisher.html rename to interfaces/temple-web/src/pages/docs/modes/publisher.html diff --git a/packages/interfaces/temple-web/src/pages/docs/modes/static.html b/interfaces/temple-web/src/pages/docs/modes/static.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/modes/static.html rename to interfaces/temple-web/src/pages/docs/modes/static.html diff --git a/packages/interfaces/temple-web/src/pages/docs/questions.html b/interfaces/temple-web/src/pages/docs/questions.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/questions.html rename to interfaces/temple-web/src/pages/docs/questions.html diff --git a/packages/interfaces/temple-web/src/pages/docs/quirks.html b/interfaces/temple-web/src/pages/docs/quirks.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/quirks.html rename to interfaces/temple-web/src/pages/docs/quirks.html diff --git a/packages/interfaces/temple-web/src/pages/docs/started.html b/interfaces/temple-web/src/pages/docs/started.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/started.html rename to interfaces/temple-web/src/pages/docs/started.html diff --git a/packages/interfaces/temple-web/src/pages/docs/state/events.html b/interfaces/temple-web/src/pages/docs/state/events.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/state/events.html rename to interfaces/temple-web/src/pages/docs/state/events.html diff --git a/packages/interfaces/temple-web/src/pages/docs/state/props.html b/interfaces/temple-web/src/pages/docs/state/props.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/state/props.html rename to interfaces/temple-web/src/pages/docs/state/props.html diff --git a/packages/interfaces/temple-web/src/pages/docs/state/shared.html b/interfaces/temple-web/src/pages/docs/state/shared.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/state/shared.html rename to interfaces/temple-web/src/pages/docs/state/shared.html diff --git a/packages/interfaces/temple-web/src/pages/docs/state/signals.html b/interfaces/temple-web/src/pages/docs/state/signals.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/state/signals.html rename to interfaces/temple-web/src/pages/docs/state/signals.html diff --git a/packages/interfaces/temple-web/src/pages/docs/syntax/attributes.html b/interfaces/temple-web/src/pages/docs/syntax/attributes.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/syntax/attributes.html rename to interfaces/temple-web/src/pages/docs/syntax/attributes.html diff --git a/packages/interfaces/temple-web/src/pages/docs/syntax/conditionals.html b/interfaces/temple-web/src/pages/docs/syntax/conditionals.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/syntax/conditionals.html rename to interfaces/temple-web/src/pages/docs/syntax/conditionals.html diff --git a/packages/interfaces/temple-web/src/pages/docs/syntax/directives.html b/interfaces/temple-web/src/pages/docs/syntax/directives.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/syntax/directives.html rename to interfaces/temple-web/src/pages/docs/syntax/directives.html diff --git a/packages/interfaces/temple-web/src/pages/docs/syntax/iterations.html b/interfaces/temple-web/src/pages/docs/syntax/iterations.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/syntax/iterations.html rename to interfaces/temple-web/src/pages/docs/syntax/iterations.html diff --git a/packages/interfaces/temple-web/src/pages/docs/syntax/trycatch.html b/interfaces/temple-web/src/pages/docs/syntax/trycatch.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/docs/syntax/trycatch.html rename to interfaces/temple-web/src/pages/docs/syntax/trycatch.html diff --git a/packages/interfaces/temple-web/src/pages/index.html b/interfaces/temple-web/src/pages/index.html similarity index 100% rename from packages/interfaces/temple-web/src/pages/index.html rename to interfaces/temple-web/src/pages/index.html diff --git a/packages/interfaces/temple-web/src/templates/html-head.html b/interfaces/temple-web/src/templates/html-head.html similarity index 100% rename from packages/interfaces/temple-web/src/templates/html-head.html rename to interfaces/temple-web/src/templates/html-head.html diff --git a/packages/interfaces/temple-web/tsconfig.json b/interfaces/temple-web/tsconfig.json similarity index 100% rename from packages/interfaces/temple-web/tsconfig.json rename to interfaces/temple-web/tsconfig.json diff --git a/package.json b/package.json index 9ef6b78..ca4fa91 100644 --- a/package.json +++ b/package.json @@ -2,30 +2,30 @@ "private": true, "workspaces": [ "examples/*", - "packages/core/*", - "packages/environments/*", - "packages/interfaces/*", - "packages/plugins/*" - ], - "nohoist": [ - "packages/environments/*" + "core/*", + "env/*", + "interfaces/*", + "plugins/*", + "labs/*" ], "scripts": { "build:packages": "yarn build:core && yarn build:env && yarn build:plugins", "build:core": "yarn build:core:server && yarn build:core:client && yarn build:core:parser && yarn build:core:compiler && yarn build:core:temple", - "build:core:parser": "yarn --cwd packages/core/temple-parser build", - "build:core:compiler": "yarn --cwd packages/core/temple-compiler build", - "build:core:client": "yarn --cwd packages/core/temple-client build", - "build:core:server": "yarn --cwd packages/core/temple-server build", - "build:core:temple": "yarn --cwd packages/core/temple build", + "build:core:parser": "yarn --cwd core/temple-parser build", + "build:core:compiler": "yarn --cwd core/temple-compiler build", + "build:core:client": "yarn --cwd core/temple-client build", + "build:core:server": "yarn --cwd core/temple-server build", + "build:core:temple": "yarn --cwd core/temple build", "build:plugins": "yarn build:plugins:loader", - "build:plugins:loader": "yarn --cwd packages/plugins/temple-loader build", + "build:plugins:loader": "yarn --cwd plugins/temple-loader build", "build:env": "yarn build:env:dev", - "build:env:dev": "yarn --cwd packages/environments/-dev build", - "build:env:web": "yarn --cwd packages/environments/temple-web build", + "build:env:dev": "yarn --cwd env/temple-develop build", + "build:env:web": "yarn --cwd env/temple-web build", + "build:env:langugage": "yarn --cwd env/temple-language build", "test": "yarn test:parser && yarn test:compiler", - "test:parser": "yarn --cwd packages/temple-parser test", - "test:compiler": "yarn --cwd packages/temple-compiler test", + "test:parser": "yarn --cwd core/temple-parser test", + "test:compiler": "yarn --cwd core/temple-compiler test", + "test:language": "yarn --cwd env/temple-language test", "dev:express": "yarn --cwd examples/with-express dev", "dev:fastify": "yarn --cwd examples/with-fastify dev", "dev:koa": "yarn --cwd examples/with-koa dev", @@ -33,7 +33,7 @@ "dev:restify": "yarn --cwd examples/with-restify dev", "dev:hapi": "yarn --cwd examples/with-hapi dev", "dev:webpack": "yarn --cwd examples/with-webpack dev", - "dev:web": "yarn --cwd packages/temple-web dev" + "dev:web": "yarn --cwd temple-web dev" }, "devDependencies": { "npm-run-all": "4.1.5" diff --git a/packages/environments/temple-language/NOTES.md b/packages/environments/temple-language/NOTES.md deleted file mode 100644 index 693be0e..0000000 --- a/packages/environments/temple-language/NOTES.md +++ /dev/null @@ -1,13 +0,0 @@ - - - `@jridgewell/trace-mapping` - `trace-mapping` allows you to take the - line and column of an output file and trace it to the original - location in the source file through a source map. - *TempleException should be able to substitute* - - `@vscode/emmet-helper` - Emmet is a plugin for many popular text - editors which greatly improves HTML & CSS workflow. - *Its that CSS selector thing that autopopulates to HTML* - - `typescript-auto-import-cache` - TypeScript Language Service - Completion API is slow when calculate auto-import. This package makes - it faster by ported tsserver auto-import caching logic. - - `sinon` - Standalone and test framework agnostic JavaScript test - spies, stubs and mocks. diff --git a/packages/environments/temple-language/assert/package.json b/packages/environments/temple-language/assert/package.json deleted file mode 100644 index 72cdece..0000000 --- a/packages/environments/temple-language/assert/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "@ossph/temple-language-assert", - "version": "0.0.13", - "description": "Temple language terminal debugger", - "license": "Apache-2.0", - "author": "Chris ", - "homepage": "https://github.com/OSSPhilippines/temple", - "bugs": "https://github.com/OSSPhilippines/temple/issues", - "repository": "OSSPhilippines/temple", - "keywords": [ - "temple", - "vscode", - "atom", - "editor", - "language-server" - ], - "main": "./dist/src/index.js", - "bin": "./bin/svelte-check", - "files": [ - "bin", - "dist" - ], - "dependencies": { - "@ossph/temple-compiler": "0.0.13", - "chokidar": "3.6.0", - "fast-glob": "3.3.2", - "import-fresh": "3.3.0", - "typescript": "5.4.5" - }, - "peerDependencies": { - "@ossph/temple": "^0.0.12" - }, - "scripts": { - "build": "rollup -c && node ./dist/src/index.js --workspace ./test --tsconfig ./tsconfig.json", - "prepublishOnly": "npm run build", - "test": "npm run build" - }, - "devDependencies": { - "@ossph/temple-language-server": "0.0.13", - "builtin-modules": "^3.3.0", - "esbuild": "0.21.5", - "vscode-languageserver": "8.0.2", - "vscode-languageserver-protocol": "3.17.2", - "vscode-languageserver-types": "3.17.2", - "vscode-uri": "3.0.8" - } -} \ No newline at end of file diff --git a/packages/environments/temple-language/client/package.json b/packages/environments/temple-language/client/package.json deleted file mode 100644 index 4455d6a..0000000 --- a/packages/environments/temple-language/client/package.json +++ /dev/null @@ -1,610 +0,0 @@ -{ - "name": "@ossph/temple-language-client", - "version": "0.0.13", - "displayName": "Temple", - "publisher": "ossph", - "icon": "icons/logo.png", - "description": "Temple markup language client", - "license": "Apache-2.0", - "author": "Chris ", - "homepage": "https://github.com/OSSPhilippines/temple", - "bugs": "https://github.com/OSSPhilippines/temple/issues", - "repository": "OSSPhilippines/temple", - "keywords": [ - "temple", - "vscode", - "atom", - "editor", - "language-server" - ], - "main": "dist/src/extension.js", - "scripts": { - "build:grammar": "npx js-yaml syntaxes/temple.tmLanguage.src.yaml > syntaxes/temple.tmLanguage.json && npx js-yaml syntaxes/postcss.src.yaml > syntaxes/postcss.json", - "build:ts": "tsc -p ./", - "build": "npm run build:ts && npm run build:grammar", - "vscode:prepublish": "npm install && npm run build && npm prune --production", - "watch": "npm run build:grammar && tsc -w -p ./", - "test": "npm run build:grammar && node test/grammar/test.js" - }, - "galleryBanner": { - "color": "#FF3E00", - "theme": "dark" - }, - "categories": [ - "Programming Languages", - "Formatters" - ], - "engines": { - "vscode": "^1.67.0" - }, - "activationEvents": [ - "onLanguage:temple", - "onCommand:temple.restartLanguageServer", - "onLanguage:javascript", - "onLanguage:typescript" - ], - "capabilities": { - "untrustedWorkspaces": { - "supported": "limited", - "restrictedConfigurations": [ - "temple.language-server.runtime", - "temple.language-server.ls-path", - "temple.language-server.runtime-args" - ], - "description": "The extension requires workspace trust because it executes code specified by the workspace. Loading the user's node_modules and loading temple config files is disabled when untrusted" - } - }, - "contributes": { - "typescriptServerPlugins": [ - { - "name": "typescript-temple-plugin", - "enableForWorkspaceTypeScriptVersions": true - } - ], - "configuration": { - "type": "object", - "title": "Temple", - "properties": { - "temple.language-server.runtime": { - "type": "string", - "title": "Language Server Runtime", - "description": "- You normally don't need this - Path to the node executable to use to spawn the language server. This is useful when you depend on native modules such as node-sass as without this they will run in the context of vscode, meaning node version mismatch is likely. Minimum required node version is 12.17. This setting can only be changed in user settings for security reasons." - }, - "temple.language-server.ls-path": { - "type": "string", - "title": "Language Server Path", - "description": "- You normally don't set this - Path to the language server executable. If you installed the \"temple-language-server\" npm package, it's within there at \"bin/server.js\". Path can be either relative to your workspace root or absolute. Set this only if you want to use a custom version of the language server. This will then also use the workspace version of TypeScript. This setting can only be changed in user settings for security reasons." - }, - "temple.language-server.runtime-args": { - "type": "array", - "title": "Language Server Runtime Args", - "description": "You normally don't set this. Additional arguments to pass to the node executable when spawning the language server. This is useful when you use something like Yarn PnP and need its loader arguments `[\"--loader\", \".pnp.loader.mjs\"]`." - }, - "temple.language-server.port": { - "type": "number", - "title": "Language Server Port", - "description": "- You normally don't set this - At which port to spawn the language server. Can be used for attaching to the process for debugging / profiling. If you experience crashes due to \"port already in use\", try setting the port. -1 = default port is used.", - "default": -1 - }, - "temple.language-server.debug": { - "type": "boolean", - "title": "Language Server Debug Mode", - "description": "- You normally don't set this - Enable more verbose logging for the language server useful for debugging language server execution." - }, - "temple.trace.server": { - "type": "string", - "enum": [ - "off", - "messages", - "verbose" - ], - "default": "off", - "description": "Traces the communication between VS Code and the Temple Language Server." - }, - "temple.ui.templeKitFilesContextMenu.enable": { - "type": "string", - "default": "auto", - "enum": [ - "auto", - "never", - "always" - ], - "description": "Show a context menu to generate TempleKit files. \"always\" to always show it. \"never\" to always disable it. \"auto\" to show it when in a TempleKit project. " - }, - "temple.plugin.typescript.diagnostics.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Diagnostics", - "description": "Enable diagnostic messages for TypeScript" - }, - "temple.plugin.typescript.hover.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Hover Info", - "description": "Enable hover info for TypeScript" - }, - "temple.plugin.typescript.documentSymbols.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Symbols in Outline", - "description": "Enable document symbols for TypeScript" - }, - "temple.plugin.typescript.completions.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Completions", - "description": "Enable completions for TypeScript" - }, - "temple.plugin.typescript.codeActions.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Code Actions", - "description": "Enable code actions for TypeScript" - }, - "temple.plugin.typescript.selectionRange.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Selection Range", - "description": "Enable selection range for TypeScript" - }, - "temple.plugin.typescript.signatureHelp.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Signature Help", - "description": "Enable signature help (parameter hints) for TypeScript" - }, - "temple.plugin.typescript.semanticTokens.enable": { - "type": "boolean", - "default": true, - "title": "TypeScript: Semantic Tokens", - "description": "Enable semantic tokens (semantic highlight) for TypeScript." - }, - "temple.plugin.css.enable": { - "type": "boolean", - "default": true, - "title": "CSS", - "description": "Enable the CSS plugin" - }, - "temple.plugin.css.globals": { - "type": "string", - "default": "", - "title": "CSS: Global Files", - "description": "Which css files should be checked for global variables (`--global-var: value;`). These variables are added to the css completions. String of comma-separated file paths or globs relative to workspace root." - }, - "temple.plugin.css.diagnostics.enable": { - "type": "boolean", - "default": true, - "title": "CSS: Diagnostics", - "description": "Enable diagnostic messages for CSS" - }, - "temple.plugin.css.hover.enable": { - "type": "boolean", - "default": true, - "title": "CSS: Hover Info", - "description": "Enable hover info for CSS" - }, - "temple.plugin.css.completions.enable": { - "type": "boolean", - "default": true, - "title": "CSS: Auto Complete", - "description": "Enable auto completions for CSS" - }, - "temple.plugin.css.completions.emmet": { - "type": "boolean", - "default": true, - "title": "CSS: Include Emmet Completions", - "description": "Enable emmet auto completions for CSS" - }, - "temple.plugin.css.documentColors.enable": { - "type": "boolean", - "default": true, - "title": "CSS: Document Colors", - "description": "Enable document colors for CSS" - }, - "temple.plugin.css.colorPresentations.enable": { - "type": "boolean", - "default": true, - "title": "CSS: Color Picker", - "description": "Enable color picker for CSS" - }, - "temple.plugin.css.documentSymbols.enable": { - "type": "boolean", - "default": true, - "title": "CSS: Symbols in Outline", - "description": "Enable document symbols for CSS" - }, - "temple.plugin.css.selectionRange.enable": { - "type": "boolean", - "default": true, - "title": "CSS: SelectionRange", - "description": "Enable selection range for CSS" - }, - "temple.plugin.html.enable": { - "type": "boolean", - "default": true, - "title": "HTML", - "description": "Enable the HTML plugin" - }, - "temple.plugin.html.hover.enable": { - "type": "boolean", - "default": true, - "title": "HTML: Hover Info", - "description": "Enable hover info for HTML" - }, - "temple.plugin.html.completions.enable": { - "type": "boolean", - "default": true, - "title": "HTML: Auto Complete", - "description": "Enable auto completions for HTML" - }, - "temple.plugin.html.completions.emmet": { - "type": "boolean", - "default": true, - "title": "HTML: Include Emmet Completions", - "description": "Enable emmet auto completions for HTML" - }, - "temple.plugin.html.tagComplete.enable": { - "type": "boolean", - "default": true, - "title": "HTML: Tag Auto Closing", - "description": "Enable HTML tag auto closing" - }, - "temple.plugin.html.documentSymbols.enable": { - "type": "boolean", - "default": true, - "title": "HTML: Symbols in Outline", - "description": "Enable document symbols for HTML" - }, - "temple.plugin.html.linkedEditing.enable": { - "type": "boolean", - "default": true, - "title": "HTML: Linked Editing", - "description": "Enable Linked Editing for HTML" - }, - "temple.plugin.temple.enable": { - "type": "boolean", - "default": true, - "title": "Temple", - "description": "Enable the Temple plugin" - }, - "temple.plugin.temple.diagnostics.enable": { - "type": "boolean", - "default": true, - "title": "Temple: Diagnostics", - "description": "Enable diagnostic messages for Temple" - }, - "temple.plugin.temple.compilerWarnings": { - "type": "object", - "additionalProperties": { - "type": "string", - "enum": [ - "ignore", - "error" - ] - }, - "default": {}, - "title": "Temple: Compiler Warnings Settings", - "description": "Temple compiler warning codes to ignore or to treat as errors. Example: { 'css-unused-selector': 'ignore', 'unused-export-let': 'error'}" - }, - "temple.plugin.temple.format.enable": { - "type": "boolean", - "default": true, - "title": "Temple: Format", - "description": "Enable formatting for Temple (includes css & js). You can set some formatting options through this extension. They will be ignored if there's any kind of configuration file, for example a `.prettierrc` file." - }, - "temple.plugin.temple.format.config.templeSortOrder": { - "type": "string", - "default": "options-scripts-markup-styles", - "title": "Temple Format: Sort Order", - "description": "Format: join the keys `options`, `scripts`, `markup`, `styles` with a - in the order you want. This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file." - }, - "temple.plugin.temple.format.config.templeStrictMode": { - "type": "boolean", - "default": false, - "title": "Temple Format: Strict Mode", - "description": "More strict HTML syntax. This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file." - }, - "temple.plugin.temple.format.config.templeAllowShorthand": { - "type": "boolean", - "default": true, - "title": "Temple Format: Allow Shorthand", - "description": "Option to enable/disable component attribute shorthand if attribute name and expression are the same. This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file." - }, - "temple.plugin.temple.format.config.templeBracketNewLine": { - "type": "boolean", - "default": true, - "title": "Temple Format: Bracket New Line", - "description": "Put the `>` of a multiline element on a new line. This option is ignored if there's any kind of configuration file, for example a `.prettierrc` file." - }, - "temple.plugin.temple.format.config.templeIndentScriptAndStyle": { - "type": "boolean", - "default": true, - "title": "Temple Format: Indent Script And Style", - "description": "Whether or not to indent code inside `