Skip to content

Commit

Permalink
refactor: architecture (#37)
Browse files Browse the repository at this point in the history
Co-authored-by: Almanov Nikita <131481562+nikkeyl@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nikkeyl authored Sep 23, 2024
1 parent 3b61f32 commit 10ef700
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"type": "module",
"types": "index.d.ts",
"imports": {
"#app": "./src/app.ts"
"#index": "./src/index.ts"
},
"exports": {
".": "./index.js"
Expand Down
9 changes: 4 additions & 5 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import typescript from '@rollup/plugin-typescript';
const sourceFolder = 'src';

const fileFormat = 'es';
const entryFileName = 'app';
const outputFileName = 'index';
const fileName = 'index';

const declarationFile = `${outputFileName}.d.ts`;
const entryFile = `${entryFileName}.ts`;
const outputFile = `${outputFileName}.js`;
const declarationFile = `${fileName}.d.ts`;
const entryFile = `${fileName}.ts`;
const outputFile = `${fileName}.js`;

export default defineConfig([
{
Expand Down
10 changes: 5 additions & 5 deletions specs/define-config.spec.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { describe, expectTypeOf, test as spec } from 'vitest';

import type { NextConfig } from 'next';
import { defineConfig } from '#index';

import { defineConfig } from '#app';
import type { NextConfig } from 'next';

describe('Next Config', () => {
spec('empty config', async () => {
describe('Next Config', async () => {
spec('should return empty config', async () => {
expectTypeOf(defineConfig({})).toEqualTypeOf<NextConfig>();
});

spec('config', async () => {
spec('should return config', async () => {
expectTypeOf(
defineConfig({
amp: {
Expand Down
File renamed without changes.

0 comments on commit 10ef700

Please sign in to comment.