diff --git a/lib/reactotron-apisauce/rollup.config.cjs b/lib/reactotron-apisauce/rollup.config.cjs deleted file mode 100644 index 0b42c02f1..000000000 --- a/lib/reactotron-apisauce/rollup.config.cjs +++ /dev/null @@ -1,29 +0,0 @@ -import replace from "@rollup/plugin-replace" -import filesize from "rollup-plugin-filesize" -import { terser } from "rollup-plugin-terser" -import typescript from "@rollup/plugin-typescript" - -const pkg = require("./package.json") - -/** @type {import('rollup').RollupOptions} */ -export default { - input: "src/index.ts", - output: [ - { - file: pkg.main, - format: "cjs", - }, - { - file: pkg.module, - format: "esm", - }, - ], - plugins: [ - typescript(), - replace({ - REACTOTRON_CORE_CLIENT_VERSION: pkg.version, - }), - process.env.NODE_ENV === "production" ? terser() : null, - filesize(), - ], -} diff --git a/lib/reactotron-redux/src/reactotron-redux.ts b/lib/reactotron-redux/src/reactotron-redux.ts deleted file mode 100644 index b0789c664..000000000 --- a/lib/reactotron-redux/src/reactotron-redux.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { Plugin, ReactotronCore } from "reactotron-core-client" - -import createCommandHander from "./commandHandler" -import createSendAction from "./sendAction" -import createEnhancer from "./enhancer" -import { DEFAULT_REPLACER_TYPE } from "./reducer" -import { PluginConfig } from "./pluginConfig" - -function reactotronRedux(pluginConfig: PluginConfig = {}) { - const mergedPluginConfig: PluginConfig = { - ...pluginConfig, - restoreActionType: pluginConfig.restoreActionType || DEFAULT_REPLACER_TYPE, - } - - const storeCreationHandlers: (() => void)[] = [] - const onReduxStoreCreation = (func: () => void) => { - storeCreationHandlers.push(func) - } - const handleStoreCreation = () => { - storeCreationHandlers.forEach((func) => { - func() - }) - } - - function plugin(reactotron: Client) { - return { - name: "redux", - // Fires when we receive a command from the Reactotron app. - onCommand: createCommandHander(reactotron, mergedPluginConfig, onReduxStoreCreation), - - // All keys in this object will be attached to the main Reactotron instance - // and available to be called directly. - features: { - createEnhancer: createEnhancer(reactotron, mergedPluginConfig, handleStoreCreation), - setReduxStore: (store) => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore shhhhhh -- this is a private API - reactotron.reduxStore = store - handleStoreCreation() - }, - reportReduxAction: createSendAction(reactotron), - }, - } satisfies Plugin - } - - return plugin -} - -export type ReactotronReduxPlugin = ReturnType - -export { reactotronRedux }