demo building
This commit is contained in:
parent
38c13b10f6
commit
01424ca5c1
@ -26,6 +26,8 @@ ts_deploy <- function(f,
|
||||
paste(sapply(init, \(z) sprintf("%s = %s", z, z)), collapse = ",\n ")
|
||||
)
|
||||
|
||||
x <- x[!grepl("library\\(ts\\)", x)] # Remove library(ts) from the app
|
||||
|
||||
src <- c(
|
||||
"library(Rserve)",
|
||||
"library(ts)",
|
||||
|
||||
3
tests/testthat/sampler/.gitignore
vendored
3
tests/testthat/sampler/.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
node_modules
|
||||
*.rserve.R
|
||||
*.schema.ts
|
||||
app.rserve.*
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
library(ts)
|
||||
|
||||
fn_mean <- ts_function(mean, x = ts_numeric(), result = ts_numeric(1))
|
||||
fn_first <- ts_function(function(x = ts_character()) x[1],
|
||||
result = ts_character(1)
|
||||
|
||||
@ -10,7 +10,7 @@ interface global {
|
||||
|
||||
global.WebSocket = WebSocket as any;
|
||||
|
||||
import appFuns from "./app.schema";
|
||||
import appFuns from "./app.rserve";
|
||||
|
||||
async function main() {
|
||||
const con = await RserveClient.create({
|
||||
|
||||
@ -5,7 +5,9 @@
|
||||
"main": "app.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node app.js"
|
||||
"build": "Rscript -e 'ts::ts_compile(\"app.R\"); ts::ts_deploy(\"app.R\")'",
|
||||
"rserve": "Rscript app.rserve.R",
|
||||
"start": "ts-node app.ts"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user