# @git-stack/core

> GraphQL for sample

Latest version **0.10.3-alpha.1** (published 2020-12-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @git-stack/core
pnpm add @git-stack/core
yarn add @git-stack/core
bun add @git-stack/core
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.10.3-alpha.1 |
| Published | 2020-12-08 |
| First published | 2018-03-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 729.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | CDMBase LLC |
| Maintainers | veeramarni, files-stack, git-stack, lyuda-cdmbase, lyuda_dzyubinska |

## Links

- npm: https://www.npmjs.com/package/@git-stack/core
- Repository: https://github.com/cdmbase/git-stack
- Homepage: https://github.com/cdmbase/git-stack#readme
- Issues: https://github.com/cdmbase/git-stack/issues
- npm.io page: https://npm.io/package/@git-stack/core

## Recent versions

- 0.10.3-alpha.1 (latest) — 2020-12-08
- 0.10.3-alpha.0 — 2020-12-08
- 0.0.1-alpha.20 — 2020-11-26
- 0.0.1-alpha.10 — 2020-11-02
- 0.0.1-alpha.4 — 2020-10-22
- 0.0.1-alpha.3 — 2020-10-14
- 0.0.1-alpha.0 — 2020-05-13
- 0.10.1-alpha.39 — 2020-05-13
- 0.10.1-alpha.38 — 2020-05-13
- 0.10.1-alpha.36 — 2020-05-07
- 0.10.1-alpha.35 — 2020-05-05
- 0.10.1-alpha.32 — 2020-05-04
- 0.10.1-alpha.30 — 2020-05-04
- 0.10.1-alpha.28 — 2020-04-07
- 0.10.1-alpha.27 — 2020-04-06
- … 78 more at https://npm.io/package/@git-stack/core/versions

## README

# Client State Package

All client(cache) state management will be done in this package. It not includes `Redux`,`Apollo Client`, `Redux-Epics` or anything that is used for managing the state.

Redux npm package includes actions, action-types and reducers

  1. [TypeScript and Redux: getting started][article-1]
  2. [TypeScript and Redux: async actions][article-3]
  3. [TypeScript and Redux: unit testing with Jest][article-4]
  4. [Integrating TypeScript and redux-thunk][article-5]


What does it include:
---
    1. exported reducers
    2. exported actions
    3. exported graphql queries
    4. Typescript 2.0.0 => ES6
    5. unit testing with jest

Purpose:
---
This package can be installable in front-end webserver to use the reducers and actions.

The goal is to make a isolated and reusable module that is self-contained. In order to avoid name conflicts, following rules need to be abide.
1. MUST export a function call reducer()
2. MUST export its action creators as functions
3. MUST have action types in the form `@npm-module-or-app/ACTION_TYPE` eg. `@@git-stack/INCREMENT_COUNTER`
4. MUST have reducer in the form `npm-module-or-app/reducer_name` eg. `@git-stack/counter`

What's not included
---
- It does not have any client UI components such as React
- It does not configure Redux Store

Useful commands:
---
    npm run build       - build the library files
    npm run test        - run tests once
    npm run test:watch  - run tests in watchmode (Useful for development)
    
Files explained:
---
     src                         - directory is used for typescript code that is part of the project
        index.ts                 - Index file of the package. Consists of exported reducers and actions
        index.spec.ts            - Tests file for main
        actions                  - Contains Actions to transform the state tree
            index.ts             - References all the exported actions
        reducers                 - Contains reducers, pure function with (state, action) => state signature. 
            index.ts             - References all the exported reducers.
     package.json                - file is used to describe the library and packages that are required added under peer-dependencies section
     tsconfig.json               - configuration file for the library compilation
     webpack.config.js           - configuration file of the compilation automation process for the library
                 

[article-1]: https://rjzaworski.com/2016/08/getting-started-with-redux-and-typescript
[article-2]: https://rjzaworski.com/2016/08/typescript-redux-and-react
[article-3]: https://rjzaworski.com/2016/09/typescript-redux-async-actions
[article-4]: https://rjzaworski.com/2016/12/testing-typescript-with-jest
[article-5]: https://rjzaworski.com/2017/01/typescript-redux-thunk

---
_Source: https://npm.io/package/@git-stack/core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
