tuitio-react-client package initialization
commit
3d84fef6ad
|
@ -0,0 +1,17 @@
|
||||||
|
# See https://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# builds
|
||||||
|
build
|
||||||
|
lib
|
||||||
|
dist
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
example/package-lock.json
|
||||||
|
|
||||||
|
coverage
|
|
@ -0,0 +1,2 @@
|
||||||
|
//lab.code-rove.com/:_authToken=${OWN_NPM_TOKEN}
|
||||||
|
@flare:registry=https://lab.code-rove.com/public-node-registry
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"arrowParens": "avoid",
|
||||||
|
"printWidth": 160,
|
||||||
|
"trailingComma": "none",
|
||||||
|
"singleQuote": false
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"name": "Jest file",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/jest",
|
||||||
|
"args": ["${fileBasenameNoExtension}", "--runInBand", "--watch", "--coverage=false", "--no-cache"],
|
||||||
|
"cwd": "${workspaceRoot}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"internalConsoleOptions": "neverOpen",
|
||||||
|
"sourceMaps": true,
|
||||||
|
"windows": {
|
||||||
|
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Tuitio client
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
Tuitio react client is an npm package written in typescript that facilitates the integration of a react application with [Tuitio](https://lab.code-rove.com/gitea/tudor.stanciu/tuitio).
|
||||||
|
|
||||||
|
This package uses [tuitio-client](https://lab.code-rove.com/gitea/bricks/tuitio-client#readme) internally and adds state management through a react context and various react hooks through which the user has access to data and actions.
|
||||||
|
|
||||||
|
## Package installation
|
||||||
|
|
||||||
|
The package installation can be done in two ways:
|
||||||
|
|
||||||
|
- from the command line: `npm install @flare/tuitio-react-client@1.0.0`
|
||||||
|
- from the package.json file: `"@flare/tuitio-react-client": "1.0.0"`
|
||||||
|
|
||||||
|
## How to use the package
|
||||||
|
|
||||||
|
TO DO
|
||||||
|
|
||||||
|
## Unit testing
|
||||||
|
|
||||||
|
Unit testing is done using [Jest](https://jestjs.io/). This is an awesome testing framework created by Facebook.
|
||||||
|
The files containing tests are identified by the extension `*.test.ts`.
|
||||||
|
All tests in the package can be executed by running: `npm test`.
|
||||||
|
|
||||||
|
## Changelog
|
||||||
|
|
||||||
|
1.0.0 - Package initialization
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"transform": {
|
||||||
|
"^.+\\.(t|j)sx?$": "ts-jest"
|
||||||
|
},
|
||||||
|
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
|
||||||
|
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"],
|
||||||
|
"collectCoverage": true,
|
||||||
|
"coverageThreshold": {
|
||||||
|
"global": {
|
||||||
|
"branches": 50,
|
||||||
|
"functions": 50,
|
||||||
|
"lines": 50,
|
||||||
|
"statements": 50
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,59 @@
|
||||||
|
{
|
||||||
|
"name": "@flare/tuitio-react-client",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "React Tuitio client",
|
||||||
|
"main": "./lib/index.js",
|
||||||
|
"types": "./lib/index.d.ts",
|
||||||
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
|
"test": "jest --config jestconfig.json",
|
||||||
|
"format": "prettier --write \"src/**/*.ts\"",
|
||||||
|
"lint": "tslint -p tsconfig.json",
|
||||||
|
"prepublishOnly": "npm test && npm run lint",
|
||||||
|
"prepush": "npm run build",
|
||||||
|
"preversion": "npm run lint",
|
||||||
|
"version": "npm run format && git add -A src",
|
||||||
|
"push": "npm publish",
|
||||||
|
"push:major": "npm run version:major && npm run push",
|
||||||
|
"push:minor": "npm run version:minor && npm run push",
|
||||||
|
"push:patch": "npm run version:patch && npm run push",
|
||||||
|
"version:major": "npm version major --no-git-tag-version",
|
||||||
|
"version:minor": "npm version minor --no-git-tag-version",
|
||||||
|
"version:patch": "npm version patch --no-git-tag-version"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://lab.code-rove.com/gitea/bricks/tuitio-react-client.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"flare",
|
||||||
|
"tuitio-react-client"
|
||||||
|
],
|
||||||
|
"author": {
|
||||||
|
"name": "Tudor Stanciu",
|
||||||
|
"email": "tudor.stanciu94@gmail.com",
|
||||||
|
"url": "https://lab.code-rove.com/tsp"
|
||||||
|
},
|
||||||
|
"license": "ISC",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://lab.code-rove.com/gitea/bricks/tuitio-react-client/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://lab.code-rove.com/gitea/bricks/tuitio-react-client#readme",
|
||||||
|
"files": [
|
||||||
|
"lib/**/*"
|
||||||
|
],
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/jest": "^29.4.0",
|
||||||
|
"jest": "^29.4.1",
|
||||||
|
"jest-environment-jsdom": "^29.4.2",
|
||||||
|
"prettier": "^2.8.3",
|
||||||
|
"ts-jest": "^29.0.5",
|
||||||
|
"tslint": "^6.1.3",
|
||||||
|
"tslint-config-prettier": "^1.18.0",
|
||||||
|
"typescript": "^4.9.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@flare/tuitio-client": "^1.0.0",
|
||||||
|
"axios": "^1.3.2"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1 @@
|
||||||
|
// to do
|
|
@ -0,0 +1,2 @@
|
||||||
|
const x = 4;
|
||||||
|
export default x;
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "es5",
|
||||||
|
"module": "commonjs",
|
||||||
|
"declaration": true,
|
||||||
|
"outDir": "./lib",
|
||||||
|
"jsx": "react",
|
||||||
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"allowJs": false,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true
|
||||||
|
},
|
||||||
|
"include": ["./src"],
|
||||||
|
"exclude": ["node_modules", "**/__tests__/*"]
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"extends": ["tslint:recommended", "tslint-config-prettier"]
|
||||||
|
}
|
Loading…
Reference in New Issue