chore(core): ship dist dir
This commit is contained in:
parent
6a229b4b0d
commit
f675887f10
4 changed files with 22 additions and 22 deletions
|
@ -16,6 +16,9 @@
|
|||
"./cli": "./dist/cli/index.js",
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsc --erasableSyntaxOnly",
|
||||
"version": "npm version",
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
import { build, type NitroConfig } from 'nitropack'
|
||||
|
||||
/**
|
||||
* @typedef {import('nitropack').NitroConfig} NitroConfig
|
||||
* @type {NitroConfig}
|
||||
*/
|
||||
export const mcflyNitroConfig = {
|
||||
export const mcflyNitroConfig: NitroConfig = {
|
||||
framework: {
|
||||
name: 'McFly',
|
||||
},
|
|
@ -26,20 +26,22 @@ it('start build with message', () => {
|
|||
expect(spy).toHaveBeenCalledWith(message)
|
||||
})
|
||||
|
||||
// test('execute nitropack build', () => {
|
||||
// mocks.build.mockImplementation(() => {})
|
||||
// testFn({ dir: '.' })
|
||||
// TODO
|
||||
it.skip('execute nitropack build', () => {
|
||||
mocks.build.mockImplementation(() => {})
|
||||
build({ dir: '.', _: [] })
|
||||
|
||||
// expect(mocks.build).toHaveBeenCalled()
|
||||
// })
|
||||
expect(mocks.build).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
// test('catch error', () => {
|
||||
// const spy = vi.spyOn(consola, 'error')
|
||||
// mocks.build.mockImplementationOnce(() => {
|
||||
// throw new Error('hey')
|
||||
// })
|
||||
// TODO
|
||||
it.skip('catch error', () => {
|
||||
const spy = vi.spyOn(consola, 'error')
|
||||
mocks.build.mockImplementationOnce(() => {
|
||||
throw new Error('hey')
|
||||
})
|
||||
|
||||
// testFn()
|
||||
build({ _: [] })
|
||||
|
||||
// expect(spy).toHaveBeenCalledWith(new Error('hey'))
|
||||
// })
|
||||
expect(spy).toHaveBeenCalledWith(new Error('hey'))
|
||||
})
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
{
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"include": [
|
||||
"src",
|
||||
"test/build.test.ts",
|
||||
"test/generate.test.ts",
|
||||
"test/new.test.ts",
|
||||
"test/prepare.test.ts",
|
||||
"test/serve.test.ts"
|
||||
],
|
||||
"include": ["src"],
|
||||
"compilerOptions": {
|
||||
"allowJs": true,
|
||||
"emitDeclarationOnly": false,
|
||||
|
|
Loading…
Reference in a new issue