Skip to content

Commit

Permalink
chore: integrations directory & tsup config file
Browse files Browse the repository at this point in the history
Moved Jotai file into integrations directory to keep things separate. TSUP builds now use config file instead of direct CLI commands.
  • Loading branch information
Pkmmte committed Dec 16, 2022
1 parent 6a3ac65 commit 77dc591
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion jotai.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './dist/jotai'
export * from './dist/integrations/jotai'
2 changes: 1 addition & 1 deletion jotai.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('./dist/jotai')
module.exports = require('./dist/integrations/jotai')
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"README.md"
],
"scripts": {
"build": "tsup src --dts --sourcemap --external react-native,react-native-mmkv --format esm,cjs --minify",
"build": "tsup",
"semantic-release": "semantic-release"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/jotai.ts → src/integrations/jotai.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* © 2022 WavePlay <[email protected]>
*/
import { Stashy } from '.';
import { Stashy } from '..';
// @ts-expect-error (peer dependency)
import { atomWithStorage, createJSONStorage } from 'jotai/utils';

Expand Down
13 changes: 13 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['src'],
external: ['react-native', 'react-native-mmkv'],
format: ['esm', 'cjs'],
bundle: false,
clean: true,
dts: true,
minify: true,
sourcemap: true,
treeshake: true
})

0 comments on commit 77dc591

Please sign in to comment.