Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
alshdavid committed Aug 15, 2024
1 parent a259e07 commit 3c659bd
Show file tree
Hide file tree
Showing 33 changed files with 171 additions and 455 deletions.
2 changes: 1 addition & 1 deletion examples/basic/src/index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
document.body.innerHTML = '<h1>Hello World!</h1>'
document.body.innerHTML = '<h1>Hello World!</h1>'
2 changes: 1 addition & 1 deletion packages/mach/src/bench.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#![allow(unused)]

pub mod cmd;
pub mod kit;
pub mod core;
pub mod kit;
pub mod plugins;
pub mod public;
pub mod rpc;
Expand Down
27 changes: 4 additions & 23 deletions packages/mach/src/cmd/build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,10 @@ use serde::Deserialize;
use serde::Serialize;

use super::super::MachOptions;
// use super::build_parse_config::parse_config;
// use super::create_result::create_build_result;
// use crate::platform::bundling::bundle;
use crate::core::plugins::load_plugins;
use crate::core::resolve_and_transform::resolve_and_transform;
// use crate::public::AssetGraphSync;
// use crate::public::AssetMap;
// use crate::public::AssetMapSync;
// use crate::public::BundleGraphSync;
// use crate::public::BundleManifestSync;
// use crate::public::BundleMapSync;
use crate::public::Compilation;
use crate::public::MachConfig;
// use crate::public::DependencyMapSync;
// use crate::rpc::Engine;
// use crate::platform::emit::emit;
// use crate::platform::packaging::package;
// use crate::rpc::RpcHost;
// use crate::public::OutputsSync;

#[derive(Debug)]
pub struct BuildOptions {
Expand Down Expand Up @@ -63,16 +48,13 @@ pub struct BuildResult {

pub fn build(
mach_options: MachOptions,
options: BuildOptions,
_options: BuildOptions,
) -> anyhow::Result<BuildResult> {
// let config = parse_config(&options).map_err(|e| anyhow::anyhow!(e))?;

/*
This is the bundler state. It is passed into
the bundling phases with read or write access
This is the bundler state. It is passed into the bundling phases with read or write access
depending on how that phase uses them
*/
let mut compilation = Compilation{
let mut compilation = Compilation {
machrc: mach_options.config,
rpc_hosts: mach_options.rpc_hosts,
config: MachConfig {
Expand All @@ -98,8 +80,7 @@ pub fn build(
It does this by crawling the source files, identify import statements, modifying their contents
(like removing TypeScript types) and looping until there are no more import statements to resolve.
*/
resolve_and_transform(&mut compilation)
.map_err(|e| anyhow::anyhow!(e))?;
resolve_and_transform(&mut compilation)?;

println!("{}", &compilation.asset_graph.into_dot(&compilation.config));

Expand Down
50 changes: 0 additions & 50 deletions packages/mach/src/cmd/build/build_event.rs

This file was deleted.

202 changes: 0 additions & 202 deletions packages/mach/src/cmd/build/build_parse_config.rs

This file was deleted.

43 changes: 0 additions & 43 deletions packages/mach/src/cmd/build/create_result.rs

This file was deleted.

3 changes: 0 additions & 3 deletions packages/mach/src/cmd/build/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
mod build;
// mod build_parse_config;
mod create_result;
// mod build_event;

pub use self::build::*;
Loading

0 comments on commit 3c659bd

Please sign in to comment.