small heroscript docusaurus fixes
This commit is contained in:
@@ -70,7 +70,6 @@ pub fn (mut f DocusaurusFactory) get(args_ DSiteGetArgs) !&DocSite {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if !os.exists('${args.path}/docs') {
|
||||
if args.init {
|
||||
// Create docs directory if it doesn't exist in template or site
|
||||
|
||||
@@ -35,6 +35,7 @@ fn (mut self DocusaurusFactory) template_install(args TemplateInstallArgs) ! {
|
||||
self.generate_tsconfig_json()!
|
||||
self.generate_sidebars_ts()!
|
||||
self.generate_docusaurus_config_ts()!
|
||||
self.generate_gitignore()!
|
||||
|
||||
if args.install {
|
||||
// install bun
|
||||
@@ -58,6 +59,15 @@ fn (mut self DocusaurusFactory) template_install(args TemplateInstallArgs) ! {
|
||||
}
|
||||
}
|
||||
|
||||
fn (mut self DocusaurusFactory) generate_gitignore() ! {
|
||||
mut gitignore := pathlib.get_file(
|
||||
path: os.join_path(self.path_build.path, '.gitignore')
|
||||
create: true
|
||||
)!
|
||||
content := $tmpl('templates/.gitignore')
|
||||
gitignore.write(content)!
|
||||
}
|
||||
|
||||
// Generate package.json based on the configuration
|
||||
fn (mut self DocusaurusFactory) generate_package_json() ! {
|
||||
// Build package.json content as a structured JSON string
|
||||
|
||||
14
lib/web/docusaurus/templates/.gitignore
vendored
Normal file
14
lib/web/docusaurus/templates/.gitignore
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
build_dev_publish.sh
|
||||
build_publish.sh
|
||||
build.sh
|
||||
develop.sh
|
||||
node_modules
|
||||
static
|
||||
src
|
||||
package.json
|
||||
package-lock.json
|
||||
cfg/footer.json
|
||||
cfg/main.json
|
||||
cfg/navbar.json
|
||||
cfg/sidebar.json
|
||||
cfg/ssh.json
|
||||
Reference in New Issue
Block a user