diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b6e772 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +# Logs +logs +*.log +npm-debug.log* + +# node stuff +node_modules + +# typescript stuff +coverage +build diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/index.ts b/index.ts new file mode 100644 index 0000000..e69de29 diff --git a/package.json b/package.json new file mode 100644 index 0000000..8068de0 --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "name": "ts-serializer", + "version": "0.1.0", + "description": "Object serialization made easy with decorators.", + "main": "index.js", + "scripts": { + "clean": "del build coverage", + "pretest": "echo 'stuff'", + "test": "echo \"Error: no test specified\" && exit 1", + "predevelop": "npm run clean", + "develop": "tsc --sourceMap", + "prebuild": "npm run clean", + "build": "tsc --outDir ." + }, + "keywords": [ + "typescript", + "serialization", + "deserialization", + "decorators", + "json" + ], + "author": "Christoph Bühler ", + "license": "MIT", + "devDependencies": { + "@types/chai": "^3.4.34", + "@types/mocha": "^2.2.39", + "@types/reflect-metadata": "0.0.5", + "chai": "^3.5.0", + "del-cli": "^0.2.1", + "istanbul": "^0.4.5", + "mocha": "^3.2.0", + "mocha-lcov-reporter": "^1.2.0", + "remap-istanbul": "^0.9.1", + "tslint": "^4.4.2", + "tslint-jsdoc-rules": "^0.1.2", + "typescript": "^2.1.6" + }, + "dependencies": { + "tslib": "^1.5.0" + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..b2981a4 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "moduleResolution": "node", + "removeComments": false, + "outDir": "./build", + "declaration": true, + "sourceMap": false, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "importHelpers": true, + "strictNullChecks": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "lib": [ + "es2015" + ] + }, + "exclude": [ + "node_modules", + "build" + ] +} diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..509044b --- /dev/null +++ b/tslint.json @@ -0,0 +1,109 @@ +{ + "extends": "tslint:recommended", + "rulesDirectory": [ + "node_modules/tslint-jsdoc-rules/lib" + ], + "rules": { + "adjacent-overload-signatures": true, + "interface-name": [ + true, + "never-prefix" + ], + "jsdoc-require": [ + true, + "no-constructors", + "no-properties", + "no-private-properties" + ], + "member-access": [ + true, + "check-accessor" + ], + "ordered-imports": [ + false + ], + "object-literal-sort-keys": false, + "max-classes-per-file": [ + false + ], + "array-type": [ + true, + "array" + ], + "arrow-parens": [ + true, + "ban-single-arg-parens" + ], + "no-trailing-whitespace": false, + "member-ordering": [ + true, + { + "order": [ + "public-static-field", + "protected-static-field", + "private-static-field", + "public-instance-field", + "protected-instance-field", + "private-instance-field", + "constructor", + "public-static-method", + "protected-static-method", + "private-static-method", + "public-instance-method", + "protected-instance-method", + "private-instance-method" + ] + } + ], + "no-bitwise": false, + "no-default-export": true, + "no-invalid-this": true, + "no-namespace": [ + true, + "allow-declarations" + ], + "no-string-literal": false, + "object-literal-key-quotes": [ + false, + "as-needed" + ], + "one-variable-per-declaration": [ + false + ], + "only-arrow-functions": [ + true, + "allow-declarations" + ], + "quotemark": [ + true, + "single", + "avoid-escape" + ], + "trailing-comma": [ + false + ], + "triple-equals": true, + "typedef": [ + true, + "call-signature", + "parameter", + "property-declaration", + "member-variable-declaration" + ], + "variable-name": [ + true, + "ban-keywords", + "check-format", + "allow-pascal-case", + "allow-leading-underscore" + ], + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ] + } +}