Skip to content

Commit

Permalink
Better naming for Nuekit configuration options: router, hotreload, au…
Browse files Browse the repository at this point in the history
…tomount. Closes #113
  • Loading branch information
tipiirai committed Jan 15, 2024
1 parent 3cf395b commit be2f19a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/nuekit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nuekit",
"version": "0.2.0",
"version": "0.3.0",
"description": "The closer-to-standards web framework. Build sites and apps with less effort.",
"homepage": "https://nuejs.org",
"license": "MIT",
Expand Down
6 changes: 3 additions & 3 deletions packages/nuekit/src/nuekit.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export async function createKit(args) {
async function setupScripts(dir, data) {

// components
if (!data.no_automount) data.components = await site.getAssets(dir, ['nue'], 'js')
if (data.automount !== false) data.components = await site.getAssets(dir, ['nue'], 'js')

// scripts
const scripts = data.scripts = await site.getScripts(dir, data.include)
Expand All @@ -72,8 +72,8 @@ export async function createKit(args) {
}

// system scripts
if (!data.is_spa && data.page_router) push('page-router')
if (is_dev && !data.no_hotreload) push('hotreload')
if (!data.is_spa && data.router) push('page-router')
if (is_dev && data.hotreload !== false) push('hotreload')
if (data.page?.isomorphic) push('nuemark')
if (data.components?.length) push('mount')
}
Expand Down
2 changes: 1 addition & 1 deletion packages/nuekit/test/nuekit.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ test('page data', async () => {

test('page scripts', async() => {
const kit = await getKit()
await write('scripts/app.yaml', 'include: [hello.js]\nno_hotreload: true')
await write('scripts/app.yaml', 'include: [hello.js]\nhotreload: false')
await write('scripts/index.md', '# Hey')
await write('scripts/hello.nue', '<div/>')
await write('scripts/hello.ts', 'var a')
Expand Down

0 comments on commit be2f19a

Please sign in to comment.