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",
|
"./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",
|
||||||
|
|
|
@ -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',
|
||||||
},
|
},
|
|
@ -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'))
|
||||||
// })
|
})
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue