typescript(monadic): chore: initial commit
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
commit
7bdf572b2d
42
typescript/monadic/.github/workflows/main.yml
vendored
Normal file
42
typescript/monadic/.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: CI
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Begin CI...
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Use Node 12
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 12.x
|
||||
|
||||
- name: Use cached node_modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: node_modules
|
||||
key: nodeModules-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
nodeModules-
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Test
|
||||
run: yarn test --ci --coverage --maxWorkers=2
|
||||
env:
|
||||
CI: true
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
env:
|
||||
CI: true
|
4
typescript/monadic/.gitignore
vendored
Normal file
4
typescript/monadic/.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
*.log
|
||||
.DS_Store
|
||||
node_modules
|
||||
dist
|
21
typescript/monadic/LICENSE
Normal file
21
typescript/monadic/LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 Matei Adriel
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
27
typescript/monadic/README.md
Normal file
27
typescript/monadic/README.md
Normal file
|
@ -0,0 +1,27 @@
|
|||
# TSDX Bootstrap
|
||||
|
||||
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx).
|
||||
|
||||
## Local Development
|
||||
|
||||
Below is a list of commands you will probably find useful.
|
||||
|
||||
### `npm start` or `yarn start`
|
||||
|
||||
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab.
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif" width="600" />
|
||||
|
||||
Your library will be rebuilt if you make edits.
|
||||
|
||||
### `npm run build` or `yarn build`
|
||||
|
||||
Bundles the package to the `dist` folder.
|
||||
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module).
|
||||
|
||||
<img src="https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif" width="600" />
|
||||
|
||||
### `npm test` or `yarn test`
|
||||
|
||||
Runs the test watcher (Jest) in an interactive mode.
|
||||
By default, runs tests related to files changed since the last commit.
|
41
typescript/monadic/package.json
Normal file
41
typescript/monadic/package.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"version": "0.1.0",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist",
|
||||
"src"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "tsdx watch",
|
||||
"build": "tsdx build",
|
||||
"test": "tsdx test",
|
||||
"lint": "tsdx lint",
|
||||
"prepare": "tsdx build"
|
||||
},
|
||||
"peerDependencies": {},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "tsdx lint"
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 80,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"trailingComma": "es5"
|
||||
},
|
||||
"name": "monadic",
|
||||
"author": "Matei Adriel",
|
||||
"module": "dist/monadic.esm.js",
|
||||
"devDependencies": {
|
||||
"husky": "^4.2.5",
|
||||
"tsdx": "^0.13.2",
|
||||
"tslib": "^1.11.1",
|
||||
"typescript": "^3.8.3"
|
||||
}
|
||||
}
|
6
typescript/monadic/src/index.ts
Normal file
6
typescript/monadic/src/index.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
export const sum = (a: number, b: number) => {
|
||||
if ('development' === process.env.NODE_ENV) {
|
||||
console.log('boop');
|
||||
}
|
||||
return a + b;
|
||||
};
|
7
typescript/monadic/test/blah.test.ts
Normal file
7
typescript/monadic/test/blah.test.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import { sum } from '../src';
|
||||
|
||||
describe('blah', () => {
|
||||
it('works', () => {
|
||||
expect(sum(1, 1)).toEqual(2);
|
||||
});
|
||||
});
|
23
typescript/monadic/tsconfig.json
Normal file
23
typescript/monadic/tsconfig.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"include": ["src", "types"],
|
||||
"compilerOptions": {
|
||||
"module": "esnext",
|
||||
"lib": ["dom", "esnext"],
|
||||
"importHelpers": true,
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"rootDir": "./src",
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"moduleResolution": "node",
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"*": ["src/*", "node_modules/*"]
|
||||
},
|
||||
"jsx": "react",
|
||||
"esModuleInterop": true
|
||||
}
|
||||
}
|
6276
typescript/monadic/yarn.lock
Normal file
6276
typescript/monadic/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue