Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microbundle #65

Merged
merged 1 commit into from
Nov 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: ci
on:
push:
branches: [ master ]
branches: [master, main]
pull_request:
branches: [ master ]
branches: [master, main]
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,3 +18,4 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: yarn
- run: yarn test
- run: yarn build
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
registry-url: https://registry.npmjs.org
- name: install dependencies
run: yarn install --frozen-lockfile
- name: build
run: NODE_ENV=production yarn build
- name: test
run: yarn test
- name: version
Expand Down
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
test/
prettier.config.js
src/
type-tests/
prettier.config.cjs
prettier.md.cjs
tsconfig.json
tsconfig.test.json
.travis.yml
yarn.lock
jest.config.cjs
File renamed without changes.
20 changes: 15 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,32 @@
{
"name": "robodux",
"version": "0.0.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"license": "MIT",
"description": "caching in redux made simple",
"author": "Eric Bower",
"repository": {
"type": "git",
"url": "git+https://github.com/neurosnap/robodux.git"
},
"type": "module",
"source": "./src/index.ts",
"main": "./dist/robodux.cjs",
"types": "./dist/index.d.ts",
"module": "./dist/robodux.module.js",
"unpkg": "./dist/robodux.umd.js",
"exports": {
"types": "./dist/index.d.ts",
"require": "./dist/robodux.cjs",
"default": "./dist/robodux.modern.js"
},
"scripts": {
"build": "tsc",
"prebuild": "rm -rf dist",
"build": "microbundle",
"tc": "typings-checker --allow-expect-error --project tsconfig.json type-tests/*.ts",
"test": "tsc && yarn tc && jest",
"prepublish": "yarn build",
"precommit": "lint-staged",
"prettier-js": "prettier --write src/*.ts",
"prettier-md": "prettier --config prettier.md.js --write *.md docs/*.md",
"prettier-md": "prettier --config prettier.md.cjs --write *.md docs/*.md",
"format": "yarn prettier-js && yarn prettier-md"
},
"dependencies": {
Expand All @@ -36,6 +45,7 @@
"husky": "^7.0.4",
"jest": "^27.5.1",
"lint-staged": "^12.3.7",
"microbundle": "^0.15.1",
"prettier": "^2.6.2",
"redux": "^4.1.2",
"redux-thunk": "^2.4.1",
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion src/create-slice.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import createAction from './create-action';
import createReducer, { createReducerPlain } from './create-reducer';
import type { Action, ActionsObjWithSlice, ActionsAny, ReducerMap, Reducer } from './types';
import type {
Action,
ActionsObjWithSlice,
ActionsAny,
ReducerMap,
Reducer,
} from './types';

interface SliceOptions<SliceState = any, Ax = ActionsAny> {
initialState: SliceState;
Expand Down
Loading