Quick Start
Try Ripple Online
You can try Ripple directly in your browser on StackBlitz.
Installation
Using The Experimental create-ripple CLI
npm create rippleClone the Vite-based Basic Template:
npx degit Ripple-TS/ripple/templates/basic ripple-app
cd ripple-app
npm i
npm run devOptional TypeScript Text Inference
Ripple already infers locally known primitive text with the default ripple() plugin. To also resolve imported types and function return types during production builds, enable textTypes in your Vite configuration:
// vite.config.ts
import { defineConfig } from 'vite';
import { ripple } from '@ripple-ts/vite-plugin';
export default defineConfig({
plugins: [ripple({ textTypes: { tsconfig: 'tsconfig.json' } })],
});This requires TypeScript 5.9.3 or newer and strictNullChecks enabled in your TypeScript configuration (strict: true also enables it). The tsconfig path resolves from the Vite project root.
The plugin manages the checker and shares its type information with Ripple's automatic server build. You do not need to call the compiler or create a TypeScript project yourself. The option applies only to production builds without watch mode; development, HMR, and watched builds keep local inference. If you run client and server builds separately, use the same textTypes setting, tsconfig, and unchanged source tree for both.
See Inferred Text Updates for an example and the kinds of values the checker can prove.
Editor Integration
VS Code
The TSRX project maintains the Volar-based TSRX Syntax for VS Code.
It provides syntax highlighting for .tsrx files by default, real-time diagnostics for compilation errors, and typescript integration for type checking and autocompletion.
If you're using a fork of VSCode, the extension is also available on Open VSX.
WebStorm/IntelliJ
There isn't a dedicated plugin at the moment, but you can use the TextMate bundle to add syntax highlighting and the language server for diagnostics and autocompletion:
- Install the TSRX language server:
npm install -g '@tsrx/language-server'- Install the LSP4IJ plugin.
- Go to
Settings>Languages & Frameworks>Language Servers. - Click
+to add a new language server. - Specify
TSRXas the name andtsrx-language-server --stdioas the command. - In the
Mappings>File name patterns, click+to add a new pattern. - Specify
*.tsrxas the pattern andtsrxas the language ID.
You should see diagnostics and autocompletion in .tsrx files now.
Sublime Text
There isn't a dedicated plugin at the moment, but you can use the TextMate bundle to add syntax highlighting and the language server for diagnostics and autocompletion:
- Install the TSRX language server:
npm install -g '@tsrx/language-server'- Press Ctrl/Cmd+Shift+P, type
Install Package Control, and press Enter. - Restart Sublime Text.
- Press Ctrl/Cmd+Shift+P, type
Upgrade Package, and press Enter. - Type
Package Controland press Enter. - Restart Sublime Text.
- Press Ctrl/Cmd+Shift+P, type
Install Package, and press Enter. - Type
LSPand press Enter. - Restart Sublime Text.
- Press Ctrl/Cmd+Shift+P, type
Preferences: LSP Settings, and press Enter. - Paste the following configuration:
{
"clients": {
"TSRX": {
"enabled": true,
"command": ["tsrx-language-server", "--stdio"],
"selector": "source.tsrx"
}
}
}You should see diagnostics and autocompletion in .tsrx files now.
TextMate bundle
The TSRX project also maintains a TextMate bundle that provides syntax highlighting for TSRX files in editors that support TextMate grammars, such as WebStorm/IntelliJ and Sublime Text.
- Create a directory named
TSRX.tmbundle. - Create a directory named
Syntaxesinside theTSRX.tmbundledirectory. - Save the
tsrx.tmLanguagefile into theSyntaxesdirectory. - Install it:
- WebStorm/IntelliJ:
- Save the
info.plistfile into theTSRX.tmbundledirectory. - Go to
Settings>Editor>TextMate Bundles, click the+icon, and select theTSRX.tmbundledirectory.
- Save the
- All TSRX files should now have syntax highlighting.
- Sublime Text:
- Go to
Preferences>Browse Packages, and move theTSRX.tmbundledirectory into the opened folder. - You should now be able to select
TSRXinView>Syntax.
- Go to
- WebStorm/IntelliJ:
Getting Help
Try joining the Discord server, or asking for help on our discussions board.
Next Steps
- Learn about reactivity/state management and caveats.
