chore(core): ship dist dir

This commit is contained in:
Ayo Ayco 2025-03-22 22:47:44 +01:00
parent 6a229b4b0d
commit f675887f10
4 changed files with 22 additions and 22 deletions

View file

@ -16,6 +16,9 @@
"./cli": "./dist/cli/index.js", "./cli": "./dist/cli/index.js",
"./package.json": "./package.json" "./package.json": "./package.json"
}, },
"files": [
"dist"
],
"scripts": { "scripts": {
"build": "tsc --erasableSyntaxOnly", "build": "tsc --erasableSyntaxOnly",
"version": "npm version", "version": "npm version",

View file

@ -1,8 +1,10 @@
import { build, type NitroConfig } from 'nitropack'
/** /**
* @typedef {import('nitropack').NitroConfig} NitroConfig * @typedef {import('nitropack').NitroConfig} NitroConfig
* @type {NitroConfig} * @type {NitroConfig}
*/ */
export const mcflyNitroConfig = { export const mcflyNitroConfig: NitroConfig = {
framework: { framework: {
name: 'McFly', name: 'McFly',
}, },

View file

@ -26,20 +26,22 @@ it('start build with message', () => {
expect(spy).toHaveBeenCalledWith(message) expect(spy).toHaveBeenCalledWith(message)
}) })
// test('execute nitropack build', () => { // TODO
// mocks.build.mockImplementation(() => {}) it.skip('execute nitropack build', () => {
// testFn({ dir: '.' }) mocks.build.mockImplementation(() => {})
build({ dir: '.', _: [] })
// expect(mocks.build).toHaveBeenCalled() expect(mocks.build).toHaveBeenCalled()
// }) })
// test('catch error', () => { // TODO
// const spy = vi.spyOn(consola, 'error') it.skip('catch error', () => {
// mocks.build.mockImplementationOnce(() => { const spy = vi.spyOn(consola, 'error')
// throw new Error('hey') mocks.build.mockImplementationOnce(() => {
// }) throw new Error('hey')
})
// testFn() build({ _: [] })
// expect(spy).toHaveBeenCalledWith(new Error('hey')) expect(spy).toHaveBeenCalledWith(new Error('hey'))
// }) })

View file

@ -1,13 +1,6 @@
{ {
"extends": "../../tsconfig.base.json", "extends": "../../tsconfig.base.json",
"include": [ "include": ["src"],
"src",
"test/build.test.ts",
"test/generate.test.ts",
"test/new.test.ts",
"test/prepare.test.ts",
"test/serve.test.ts"
],
"compilerOptions": { "compilerOptions": {
"allowJs": true, "allowJs": true,
"emitDeclarationOnly": false, "emitDeclarationOnly": false,