Skip to content
This repository has been archived by the owner on Feb 8, 2020. It is now read-only.

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jun 9, 2019
0 parents commit 32139af
Show file tree
Hide file tree
Showing 13 changed files with 7,792 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .babelrc
@@ -0,0 +1,12 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"corejs": 3
}
],
"@babel/preset-typescript"
]
}
56 changes: 56 additions & 0 deletions .circleci/config.yml
@@ -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 changes: 4 additions & 0 deletions .eslintignore
@@ -0,0 +1,4 @@
node_modules/
coverage/
dist/
lib/
11 changes: 11 additions & 0 deletions .eslintrc
@@ -0,0 +1,11 @@
{
extends: 'satya164',
settings: {
react: {
version: '16'
}
},
env: {
browser: true
}
}
9 changes: 9 additions & 0 deletions .gitignore
@@ -0,0 +1,9 @@
.DS_Store
.cache
.vscode

/coverage/
/types/
/lib/
/dist/
/node_modules/
14 changes: 14 additions & 0 deletions .release-it.json
@@ -0,0 +1,14 @@
{
"git": {
"commitMessage": "chore: release %s",
"tagName": "v%s"
},
"github": {
"release": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": "angular"
}
}
}
3 changes: 3 additions & 0 deletions README.md
@@ -0,0 +1,3 @@
# TypeScript template

Template repository for TypeScript projects with Babel.
6 changes: 6 additions & 0 deletions commitlint.config.js
@@ -0,0 +1,6 @@
/* eslint-env node */
/* eslint-disable import/no-commonjs */

module.exports = {
extends: ['@commitlint/config-conventional'],
};
70 changes: 70 additions & 0 deletions package.json
@@ -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?)$"
}
}
1 change: 1 addition & 0 deletions src/__tests__/index.test.ts
@@ -0,0 +1 @@
it.todo('placeholder');
Empty file added src/index.ts
Empty file.
22 changes: 22 additions & 0 deletions tsconfig.json
@@ -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"
}
}

0 comments on commit 32139af

Please sign in to comment.