Skip to content

Commit

Permalink
start on emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
crcn committed Jan 16, 2024
1 parent 6c8affe commit a6c5d7e
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 38 deletions.
86 changes: 48 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ members = [
"libs/evaluator",
"libs/tidy",
"libs/paperclip-loader",
"libs/emulator",
"libs/workspace",
"libs/infer",
"libs/proto",
Expand Down
1 change: 1 addition & 0 deletions libs/core/src/proto/ast_mutate/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ pub fn upsert_render_expr<'a, Mutation>(
component_body_item::Inner::Render(Render {
id: ctx.new_id(),
range: None,
before: None,
node: if create_node {
Some(parse_node("div", &ctx.new_id()))
} else {
Expand Down
12 changes: 12 additions & 0 deletions libs/emulator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "paperclip_emulator"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
swc = "0.270.23"
paperclip_common = { path = "../rs_common" }
paperclip_proto = { path = "../proto" }
paperclip_core = { path = "../core" }
3 changes: 3 additions & 0 deletions libs/emulator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Considerations

- Bundler may include Paperclip files
3 changes: 3 additions & 0 deletions libs/emulator/src/bundle.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use paperclip_proto::ast::graph::Graph;

pub fn bundle(graph: Graph) {}
1 change: 1 addition & 0 deletions libs/emulator/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod bundle;

0 comments on commit a6c5d7e

Please sign in to comment.