Skip to content

Commit

Permalink
chore: use microbundle (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap authored Nov 16, 2022
1 parent 3a629ce commit c41283f
Show file tree
Hide file tree
Showing 9 changed files with 2,764 additions and 33 deletions.
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

0 comments on commit c41283f

Please sign in to comment.