mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
fixed editor new project init for new example folder layout
This commit is contained in:
parent
c79fc18ba8
commit
62d249acd5
3 changed files with 4 additions and 4 deletions
|
@ -4,7 +4,7 @@ use crate::lang::core::{expr::expr2::ExprId, header::AppHeader};
|
|||
pub fn parse_from_string(_header_str: &str, ast_node_id: ExprId) -> AppHeader {
|
||||
AppHeader {
|
||||
app_name: "\"untitled-app\"".to_owned(),
|
||||
packages_base: "\"platform\"".to_owned(),
|
||||
packages_base: "\"c-platform\"".to_owned(),
|
||||
imports: vec![],
|
||||
provides: vec!["main".to_owned()],
|
||||
ast_node_id,
|
||||
|
|
|
@ -517,14 +517,14 @@ fn read_main_roc_file(project_dir_path_opt: Option<&Path>) -> (PathStr, String)
|
|||
|
||||
// returns path and content of app file
|
||||
fn init_new_roc_project(project_dir_path_str: &str) -> (PathStr, String) {
|
||||
let orig_platform_path = Path::new("./examples/hello-c/platform");
|
||||
let orig_platform_path = Path::new("./examples/hello-world/c-platform");
|
||||
|
||||
let project_dir_path = Path::new(project_dir_path_str);
|
||||
|
||||
let roc_file_path_str = vec![project_dir_path_str, "/UntitledApp.roc"].join("");
|
||||
let roc_file_path = Path::new("./new-roc-project/UntitledApp.roc");
|
||||
|
||||
let project_platform_path_str = vec![project_dir_path_str, "/platform"].join("");
|
||||
let project_platform_path_str = vec![project_dir_path_str, "/c-platform"].join("");
|
||||
let project_platform_path = Path::new(&project_platform_path_str);
|
||||
|
||||
if !project_dir_path.exists() {
|
||||
|
|
|
@ -17,7 +17,7 @@ For convenience and consistency, there is only one way to format roc.
|
|||
|
||||
pub const HELLO_WORLD: &str = r#"
|
||||
app "test-app"
|
||||
packages { pf: "platform" }
|
||||
packages { pf: "c-platform" }
|
||||
imports []
|
||||
provides [ main ] to pf
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue