feat(types): separate types from presetter

This commit is contained in:
Alvis HT Tang 2023-06-05 13:55:42 +01:00
parent ae48726a6c
commit 5bb53481b0
4 changed files with 9 additions and 7 deletions

View File

@ -50,5 +50,8 @@
"presetter": "file:../presetter",
"presetter-preset-strict": "file:../preset-strict",
"type-fest": "^2.0.0"
},
"dependencies": {
"presetter-types": "file:../types"
}
}

View File

@ -19,8 +19,9 @@ import { loadFile, template } from 'presetter';
import { getRollupParameter } from './rollup';
import type { PresetAsset } from 'presetter-types';
import type { RollupConfig } from './rollup';
import type { PresetAsset } from 'presetter';
// paths to the template directory
const TEMPLATES = resolve(__dirname, '..', 'templates');

View File

@ -23,17 +23,15 @@ import {
import { assertPluginManifest } from './plugin';
import type { ApplyDirective, ImportDirective } from 'presetter';
import type { ResolvedPresetContext } from 'presetter-types';
import type {
PluginConfiguration,
PluginList,
PluginManifest,
PluginObject,
} from './plugin';
import type {
ApplyDirective,
ImportDirective,
ResolvedPresetContext,
} from 'presetter';
/** preset configuration for rollup */
export interface RollupConfig {

View File

@ -15,7 +15,7 @@
import { getRollupParameter } from '#rollup';
import type { Config, ResolvedPresetContext } from 'presetter';
import type { Config, ResolvedPresetContext } from 'presetter-types';
describe('fn:getRollupParameter', () => {
const generateContext = (config?: Config): ResolvedPresetContext => ({