Skip to content

Commit

Permalink
chore: WIP exclude marked config file
Browse files Browse the repository at this point in the history
  • Loading branch information
nobkd committed Apr 3, 2024
1 parent 403536c commit 825c726
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/nuekit/src/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { log, getParts, getAppDir, getDirs, colors, toPosix, sortCSS, joinRootPa
import { join, extname, basename, sep, parse as parsePath } from 'node:path'
import { parse as parseNue } from 'nuejs-core'
import { promises as fs } from 'node:fs'
import { fswalk } from './nuefs.js'
import { fswalk, IGNORE } from './nuefs.js'
import { nuemark } from 'nuemark'
import yaml from 'js-yaml'

Expand Down Expand Up @@ -81,9 +81,10 @@ export async function createSite(args) {
self.is_empty = true
}

const markedConfig = joinRootPath(root, site_data.marked_config || 'marked.config.js', true)
const marked_config_path = site_data.marked_config || 'marked.config.js'
IGNORE.push(marked_config_path)
const markedConfig = joinRootPath(root, marked_config_path, true)
const { default: marked_extensions=[] } = await import(markedConfig).catch(() => ({}))
// TODO: exclude `markedConfig` path from output dir

async function write(content, dir, filename) {
const todir = join(dist, dir)
Expand Down

0 comments on commit 825c726

Please sign in to comment.