Crates.io | surplus-compiler |
lib.rs | surplus-compiler |
version | 0.2.0 |
source | src |
created_at | 2024-01-06 04:49:54.013599 |
updated_at | 2024-01-19 22:32:53.643632 |
description | Surplus javascript framework core compiler transform |
homepage | https://github.com/surplus |
repository | https://github.com/surplus/surplus |
max_upload_size | |
id | 1090751 |
size | 53,705 |
This is the base Surplus compiler transformer logic,
and a basic CLI utility called surplus-transform
.
NOTE: This is only the compiler; it does not include the runtime.
Check the docs. For now, running cargo doc --open
is the best way.
For the CLI utility, run cargo run -- --help
for usage.
npm install @surplus/compiler
The compiler is usable via a WASM module.
NOTE: The JavaScript package and the Rust crate do not necessarily share the same version numbers. To the extent possible, major and minors will remain synchronized.
import compileSurplus from '@surplus/compiler';
console.log(
compileSurplus(
`<div>Hello!</div>`,
/* Optional arguments (defaults shown) */
{
global: '$$S',
emitRuntimeImport: true
}
)
);
Licensed under the MIT License.