Skip to content

Commit

Permalink
port legacy ftd functions for backward compatibility (#1381)
Browse files Browse the repository at this point in the history
* port legacy ftd functions for backward compatibility

* fix all tests

* name conversion, wrap functions in iife, basic set_value impl

* ftd.set_value implemented, fixed minor issues, wrapped ftd in iife

* implemented get_value, minor fixes

* updated tests

* fixed tests
  • Loading branch information
harshdoesdev authored Oct 18, 2023
1 parent 4f0c35c commit a56b904
Show file tree
Hide file tree
Showing 77 changed files with 432 additions and 364 deletions.
8 changes: 2 additions & 6 deletions fastn-core/src/package/package_doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,10 @@ pub(crate) async fn read_ftd_2023(
}

let js_ast_data = ftd::js::document_into_js_ast(main_ftd_doc);
let js_document_script = fastn_js::to_js(
js_ast_data.asts.as_slice(),
true,
config.package.name.as_str(),
);
let js_document_script =
fastn_js::to_js(js_ast_data.asts.as_slice(), config.package.name.as_str());
let js_ftd_script = fastn_js::to_js(
ftd::js::default_bag_into_js_ast().as_slice(),
false,
config.package.name.as_str(),
);
let ssr_body = fastn_js::ssr_with_js_string(
Expand Down
Loading

0 comments on commit a56b904

Please sign in to comment.