...
This commit is contained in:
@@ -5,8 +5,7 @@ import os
|
||||
import freeflowuniverse.herolib.core.pathlib
|
||||
// import freeflowuniverse.herolib.ui.console
|
||||
// import freeflowuniverse.herolib.core.base
|
||||
// import freeflowuniverse.herolib.develop.gittools
|
||||
// import freeflowuniverse.herolib.ui.console
|
||||
import freeflowuniverse.herolib.develop.gittools
|
||||
|
||||
@[heap]
|
||||
pub struct DocusaurusFactory {
|
||||
@@ -14,19 +13,16 @@ pub mut:
|
||||
sites []&DocSite @[skip; str: skip]
|
||||
path_build pathlib.Path
|
||||
// path_publish pathlib.Path
|
||||
args DocusaurusArgs
|
||||
config Configuration // Stores configuration from HeroScript if provided
|
||||
args DocusaurusArgs
|
||||
}
|
||||
|
||||
@[params]
|
||||
pub struct DocusaurusArgs {
|
||||
pub mut:
|
||||
// publish_path string
|
||||
build_path string
|
||||
production bool
|
||||
update bool
|
||||
heroscript string
|
||||
heroscript_path string
|
||||
build_path string
|
||||
production bool
|
||||
update bool
|
||||
}
|
||||
|
||||
pub fn new(args_ DocusaurusArgs) !&DocusaurusFactory {
|
||||
@@ -36,16 +32,14 @@ pub fn new(args_ DocusaurusArgs) !&DocusaurusFactory {
|
||||
}
|
||||
// if args.publish_path == ""{
|
||||
// args.publish_path = "${os.home_dir()}/hero/var/docusaurus/publish"
|
||||
// }
|
||||
|
||||
// Create the factory instance
|
||||
// }
|
||||
mut ds := &DocusaurusFactory{
|
||||
args: args_
|
||||
path_build: pathlib.get_dir(path: args.build_path, create: true)!
|
||||
// path_publish: pathlib.get_dir(path: args_.publish_path, create: true)!
|
||||
}
|
||||
|
||||
ds.template_install(install: true, template_update: args.update, delete: true)!
|
||||
ds.template_install(install:true,template_update:args.update,delete:true)!
|
||||
|
||||
return ds
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user