refactor(core): move modules to /runtime
This commit is contained in:
parent
879fe3d988
commit
8746f976af
10 changed files with 20 additions and 12 deletions
|
@ -1,3 +0,0 @@
|
||||||
export default {
|
|
||||||
components: 'js',
|
|
||||||
}
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@mcflyjs/core",
|
"name": "@mcflyjs/core",
|
||||||
"version": "0.7.1",
|
"version": "0.7.2",
|
||||||
"description": "McFly core package",
|
"description": "McFly core package",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
|
@ -3,11 +3,13 @@ import { useRuntimeConfig, useStorage } from 'nitropack/runtime'
|
||||||
import { createHooks } from 'hookable'
|
import { createHooks } from 'hookable'
|
||||||
import { consola } from 'consola'
|
import { consola } from 'consola'
|
||||||
|
|
||||||
import { hooks as mcflyHooks } from '@mcflyjs/core/hooks.mjs'
|
import {
|
||||||
import defaultMcflyConfig from '@mcflyjs/core/default-mcfly-config.mjs'
|
hooks as mcflyHooks,
|
||||||
import { evaluateServerScripts } from '@mcflyjs/core/evaluate-scripts.mjs'
|
defaultMcflyConfig,
|
||||||
import { injectHtmlFragments } from '@mcflyjs/core/inject-fragments.mjs'
|
evaluateServerScripts,
|
||||||
import { injectCustomElements } from '@mcflyjs/core/inject-elements.mjs'
|
injectHtmlFragments,
|
||||||
|
injectCustomElements,
|
||||||
|
} from '@mcflyjs/core/runtime'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {import('../config').McFlyConfig} Config
|
* @typedef {import('../config').McFlyConfig} Config
|
||||||
|
|
3
packages/core/runtime/default-mcfly-config.mjs
Normal file
3
packages/core/runtime/default-mcfly-config.mjs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
export const defaultMcflyConfig = {
|
||||||
|
components: 'js',
|
||||||
|
}
|
6
packages/core/runtime/index.js
Normal file
6
packages/core/runtime/index.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
export { defaultMcflyConfig } from './default-mcfly-config.mjs'
|
||||||
|
export { evaluateServerScripts } from './evaluate-scripts.mjs'
|
||||||
|
export { getFiles } from './get-files.mjs'
|
||||||
|
export { hooks } from './hooks.mjs'
|
||||||
|
export { injectCustomElements } from './inject-elements.mjs'
|
||||||
|
export { injectHtmlFragments } from './inject-fragments.mjs'
|
|
@ -1,8 +1,8 @@
|
||||||
import { ELEMENT_NODE, parse, render, walkSync } from 'ultrahtml'
|
import { ELEMENT_NODE, parse, render, walkSync } from 'ultrahtml'
|
||||||
import { getFiles } from './get-files.mjs'
|
import { getFiles } from '@mcflyjs/core/runtime/get-files.mjs'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {import('../config/index.js').McFlyConfig} Config
|
* @typedef {import('../../config/index.js').McFlyConfig} Config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -1,5 +1,5 @@
|
||||||
import { ELEMENT_NODE, parse, render, walkSync } from 'ultrahtml'
|
import { ELEMENT_NODE, parse, render, walkSync } from 'ultrahtml'
|
||||||
import { getFiles } from './get-files.mjs'
|
import { getFiles } from '@mcflyjs/core/runtime/get-files.mjs'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {import('ultrahtml').Node} HtmlNode
|
* @typedef {import('ultrahtml').Node} HtmlNode
|
Loading…
Reference in a new issue