chore(core): initial migration to typescript
This commit is contained in:
parent
d89cd22e78
commit
f3ee5eebb5
19 changed files with 25 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"preinstall": "npx only-allow pnpm",
|
"preinstall": "npx only-allow pnpm",
|
||||||
"start": "pnpm --filter site start",
|
"start": "pnpm --filter site start",
|
||||||
"site": "pnpm --filter site start",
|
"site": "pnpm run build && pnpm --filter site start",
|
||||||
"build": "pnpm -F './packages/**' build",
|
"build": "pnpm -F './packages/**' build",
|
||||||
"build:site": "pnpm --filter site build",
|
"build:site": "pnpm --filter site build",
|
||||||
"build:site:preview": "pnpm --filter site build:preview",
|
"build:site:preview": "pnpm --filter site build:preview",
|
||||||
|
|
|
@ -3,11 +3,21 @@
|
||||||
"version": "0.8.7",
|
"version": "0.8.7",
|
||||||
"description": "McFly core package",
|
"description": "McFly core package",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "index.js",
|
"main": "./dist/cli/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
"mcfly": "cli/index.js"
|
"mcfly": "./dist/cli/index.js"
|
||||||
|
},
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./dist/cli/index.d.ts",
|
||||||
|
"default": "./dist/cli/index.js"
|
||||||
|
},
|
||||||
|
"./runtime": "./dist/runtime/index.js",
|
||||||
|
"./cli": "./dist/cli/index.js",
|
||||||
|
"./package.json": "./package.json"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
"version": "npm version",
|
"version": "npm version",
|
||||||
"publish": "npm publish",
|
"publish": "npm publish",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
evaluateServerScripts,
|
evaluateServerScripts,
|
||||||
injectHtmlFragments,
|
injectHtmlFragments,
|
||||||
injectCustomElements,
|
injectCustomElements,
|
||||||
} from '@mcflyjs/core/runtime/index.js' // important to import from installed node_module because this script is passed to another context
|
} from '@mcflyjs/core/runtime' // important to import from installed node_module because this script is passed to another context
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {import('../config').McFlyConfig} Config
|
* @typedef {import('../config').McFlyConfig} Config
|
11
packages/core/tsconfig.json
Normal file
11
packages/core/tsconfig.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"include": ["src"],
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowJs": true,
|
||||||
|
"emitDeclarationOnly": false,
|
||||||
|
"declarationDir": "./dist",
|
||||||
|
"outDir": "./dist",
|
||||||
|
"rootDir": "./src"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue