Skip to content

Commit

Permalink
refactor: remove index file (#88)
Browse files Browse the repository at this point in the history
Co-authored-by: Almanov Nikita <[email protected]>
  • Loading branch information
github-actions[bot] and nikkeyl authored Aug 30, 2024
1 parent 33e9e1e commit 81d9ed1
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 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 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
13 changes: 7 additions & 6 deletions rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@ import typescript from '@rollup/plugin-typescript';
const sourceFolder = 'src';

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 { UserConfig } from '@commitlint/types';

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

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

0 comments on commit 81d9ed1

Please sign in to comment.