Skip to content

Commit

Permalink
refactor: remove index file (#25)
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 Aug 30, 2024
1 parent a52a897 commit 20c5067
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ on:
branches:
- main
paths:
- src/index.ts
- src/**/*.ts
push:
branches:
- main
paths:
- src/index.ts
- src/**/*.ts

permissions:
actions: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm eslint src/index.ts
run: pnpm eslint src/**/*.ts
2 changes: 1 addition & 1 deletion lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
'*': 'prettier --write',
'src/index.ts': 'eslint --fix',
'src/**/*.ts': 'eslint --fix',
};
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": {
"#src": "./src/index.ts"
"#app": "./src/app.ts"
},
"exports": {
".": "./index.js"
Expand Down
14 changes: 7 additions & 7 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ import { minify } from 'rollup-plugin-esbuild';
import typescript from '@rollup/plugin-typescript';

const sourceFolder = 'src';
const typesFolder = `${sourceFolder}/types`;

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

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

export default defineConfig([
{
plugins: [typescript(), minify()],
input: `${sourceFolder}/${indexFile}`,
input: `${sourceFolder}/${entryFile}`,
output: {
file: outputFile,
format: fileFormat,
},
},
{
plugins: [dts()],
input: `${sourceFolder}/${indexFile}`,
input: `${sourceFolder}/${entryFile}`,
output: {
file: declarationFile,
format: fileFormat,
Expand Down
2 changes: 1 addition & 1 deletion specs/define-config.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { describe, expectTypeOf, test as spec } from 'vitest';

import type { NextConfig } from 'next';

import { defineConfig } from '#src';
import { defineConfig } from '#app';

describe('Next Config', () => {
spec('empty config', async () => {
Expand Down
File renamed without changes.

0 comments on commit 20c5067

Please sign in to comment.