Initial commit

This commit is contained in:
Satyajit Sahoo
2019-06-09 14:45:27 +00:00
commit 32139afa3e
13 changed files with 7792 additions and 0 deletions

12
.babelrc Normal file
View File

@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": 3
}
],
"@babel/preset-typescript"
]
}

56
.circleci/config.yml Normal file
View File

@@ -0,0 +1,56 @@
version: 2
defaults: &defaults
docker:
- image: circleci/node:10
working_directory: ~/project
jobs:
install-dependencies:
<<: *defaults
steps:
- checkout
- attach_workspace:
at: ~/project
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: yarn install
- save_cache:
key: v1-dependencies-{{ checksum "package.json" }}
paths: node_modules
- persist_to_workspace:
root: .
paths: .
lint-and-typecheck:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: |
yarn lint
yarn typescript
unit-test:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: |
yarn test --coverage
cat ./coverage/lcov.info | ./node_modules/.bin/codecov
- store_artifacts:
path: coverage
destination: coverage
workflows:
version: 2
build-and-test:
jobs:
- install-dependencies
- lint-and-typecheck:
requires:
- install-dependencies
- unit-test:
requires:
- install-dependencies

4
.eslintignore Normal file
View File

@@ -0,0 +1,4 @@
node_modules/
coverage/
dist/
lib/

11
.eslintrc Normal file
View File

@@ -0,0 +1,11 @@
{
extends: 'satya164',
settings: {
react: {
version: '16'
}
},
env: {
browser: true
}
}

9
.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
.DS_Store
.cache
.vscode
/coverage/
/types/
/lib/
/dist/
/node_modules/

14
.release-it.json Normal file
View File

@@ -0,0 +1,14 @@
{
"git": {
"commitMessage": "chore: release %s",
"tagName": "v%s"
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# TypeScript template
Template repository for TypeScript projects with Babel.

6
commitlint.config.js Normal file
View File

@@ -0,0 +1,6 @@
/* eslint-env node */
/* eslint-disable import/no-commonjs */
module.exports = {
extends: ['@commitlint/config-conventional'],
};

70
package.json Normal file
View File

@@ -0,0 +1,70 @@
{
"name": "typescript-template",
"private": true,
"version": "0.0.0",
"description": "Template repository for TypeScript projects with Babel",
"keywords": [],
"types": "types/index.d.ts",
"main": "lib/index.js",
"files": [
"lib/",
"types/",
"index.d.ts"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/satya164/typescript-template.git"
},
"author": "Satyajit Sahoo <satyajit.happy@gmail.com> (https://github.com/satya164/)",
"scripts": {
"lint": "eslint .",
"typescript": "tsc --noEmit",
"test": "jest",
"prebuild": "del lib/ types/",
"babel": "babel src --out-dir lib --ignore '**/__tests__/**' --source-maps",
"declarations": "tsc --declaration --emitDeclarationOnly --outDir types",
"build": "yarn babel && yarn declarations",
"prepare": "yarn build",
"release": "release-it"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"core-js": "^3.1.3"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
"@babel/core": "^7.4.5",
"@babel/preset-env": "^7.4.5",
"@babel/preset-typescript": "^7.3.3",
"@commitlint/config-conventional": "^8.0.0",
"@release-it/conventional-changelog": "^1.1.0",
"@types/jest": "^24.0.13",
"codecov": "^3.5.0",
"commitlint": "^8.0.0",
"del-cli": "^2.0.0",
"eslint": "^5.16.0",
"eslint-config-satya164": "^2.4.1",
"husky": "^2.4.0",
"jest": "^24.8.0",
"prettier": "^1.18.2",
"release-it": "^12.3.0",
"typescript": "^3.5.1"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "yarn lint && yarn typescript && yarn test"
}
},
"jest": {
"testEnvironment": "node",
"modulePathIgnorePatterns": [
"<rootDir>/types/",
"<rootDir>/lib/"
],
"testRegex": "/__tests__/.*\\.(test|spec)\\.(js|tsx?)$"
}
}

View File

@@ -0,0 +1 @@
it.todo('placeholder');

0
src/index.ts Normal file
View File

22
tsconfig.json Normal file
View File

@@ -0,0 +1,22 @@
{
"compilerOptions": {
"allowUnreachableCode": false,
"allowUnusedLabels": false,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["esnext"],
"module": "esnext",
"moduleResolution": "node",
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noImplicitUseStrict": false,
"noStrictGenericChecks": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
"resolveJsonModule": true,
"skipLibCheck": true,
"strict": true,
"target": "esnext"
}
}

7584
yarn.lock Normal file

File diff suppressed because it is too large Load Diff