Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Sets up project layout, configuration, and Yarn scripts.
  • Loading branch information
dphilipson committed Jun 18, 2017
0 parents commit bac3f0f
Show file tree
Hide file tree
Showing 10 changed files with 2,718 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# OS X
.DS_Store

# NPM/Yarn
node_modules
yarn-debug.log
yarn-error.log

dist
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 David Philipson

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.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TypeScript Transducers

Convenient TypeScript wrapper of transducers-js.
8 changes: 8 additions & 0 deletions __tests__/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import * as t from "../src/index";

describe("Jest", () => {
it("should run tests", () => {
t.hello();
expect(2).toEqual(2);
});
});
61 changes: 61 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"name": "typescript-transducers",
"version": "0.1.0",
"description": "Convenient TypeScript wrapper of transducers-js.",
"main": "dist/index.js",
"types": "dist/index",
"files": [
"dist/"
],
"repository": {
"type": "git",
"url": "git://github.com/dphilipson/typescript-transducers.git"
},
"homepage": "https://github.com/dphilipson/typescript-transducers",
"bugs": {
"url": "https://github.com/dphilipson/typescript-transducers/issues",
"email": "[email protected]"
},
"author": "David Philipson <[email protected]> (http://dphil.me)",
"license": "MIT",
"scripts": {
"build": "yarn run clean && tsc -p tsconfig.build.json",
"clean": "rm -rf dist",
"format": "yarn run format-glob -- \"'src/**/*.{ts,tsx}'\"",
"format-glob": "prettier --tab-width 4 --trailing-comma all --write",
"jest": "jest",
"jest-watch": "yarn run jest -- --watch",
"lint": "tslint --project .",
"precommit": "lint-staged",
"test": "yarn run lint && tsc && yarn run jest",
"watch": "tsc --watch"
},
"jest": {
"transform": {
".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
},
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js"
]
},
"lint-staged": {
"*.{ts,tsx}": [
"format-glob",
"yarn run lint -- --fix",
"git add"
]
},
"devDependencies": {
"@types/jest": "^20.0.0",
"husky": "^0.13.4",
"jest": "^20.0.4",
"lint-staged": "^3.6.1",
"prettier": "^1.4.4",
"ts-jest": "^20.0.6",
"tslint": "^5.4.3",
"typescript": "^2.3.4"
}
}
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export function hello() {
// tslint:disable-next-line:no-console
console.log("Hello, world!");
}
12 changes: 12 additions & 0 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"compilerOptions": {
"inlineSources": true,
"noEmit": false,
"outDir": "dist",
"sourceMap": true
},
"exclude": [
"__tests__/**/*"
],
"extends": "./tsconfig.json"
}
17 changes: 17 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"compilerOptions": {
"module": "commonjs",
"noEmit": true,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"strict": true,
"target": "es5"
},
"include": [
"src/**/*",
"__tests__/**/*"
]
}
22 changes: 22 additions & 0 deletions tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": [
"tslint:latest"
],
"rules": {
"arrow-parens": [
true,
"ban-single-arg-parens"
],
"interface-name": [
true,
"never-prefix"
],
"no-bitwise": false,
"object-literal-sort-keys": false,
"semicolon": [
true,
"always",
"ignore-bound-class-methods"
]
}
}
Loading

0 comments on commit bac3f0f

Please sign in to comment.