Skip to content

Commit

Permalink
feat: re-export context-state as create-context-state
Browse files Browse the repository at this point in the history
  • Loading branch information
SukkaW committed Jun 2, 2023
1 parent 77e9f10 commit d46eb85
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
13 changes: 8 additions & 5 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@
"root": true,
"overrides": [
{
"files": ["src/**/*.ts", "src/**/*.tsx", "rollup.config.ts", "tools/**/*.ts"],
"extends": "sukka/typescript",
"files": [
"src/**/*.ts",
"src/**/*.tsx",
"rollup.config.ts",
"tools/**/*.ts"
],
"extends": ["sukka/typescript"],
"parserOptions": {
"project": [
"./tsconfig.json"
]
"project": ["./tsconfig.json"]
},
"rules": {
"@fluffyfox/prefer-timer-id": "off"
Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# dependencies
/node_modules
node_modules
/.pnp
.pnp.js
.pnp.cjs
Expand All @@ -11,8 +11,9 @@ yarn.lock
/coverage

# next.js
/.next/
/out/
/docs/.next/
/docs/out/
next-env.d.ts

# production
/build
Expand Down
1 change: 1 addition & 0 deletions src/create-context-state/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { createContextState } from '@/context-state';
7 changes: 3 additions & 4 deletions tools/postbuild.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import fse from 'fs-extra';
import path from 'path';
import { getEntries } from './get-entries';
import listDir from '@sukka/listdir';
import gzipSize from 'gzip-size';

const rootDir = process.cwd();
const distDir = path.resolve(rootDir, 'dist');

interface GzipStats {
total: { raw: number; gzip: number; };
exports: Record<string, { raw: number, gzip: number }>;
total: { raw: number, gzip: number },
exports: Record<string, { raw: number, gzip: number }>
}

(async () => {
Expand Down Expand Up @@ -67,7 +66,7 @@ interface GzipStats {
gzipSizeStat.exports[entryName] = {
raw: fileSize,
gzip: fileGzipSize
}
};
})
);

Expand Down

0 comments on commit d46eb85

Please sign in to comment.