From 3c6e07117aa427c50acd0b5bbf26fc5324c51a34 Mon Sep 17 00:00:00 2001 From: Yanzhen Yu Date: Sun, 30 Sep 2018 10:32:44 +0800 Subject: [PATCH] init the repo --- .gitignore | 4 ++++ .prettierrc | 4 ++++ README.md | 3 +++ package.json | 33 +++++++++++++++++++++++++++++++++ src/index.ts | 0 tsconfig.json | 12 ++++++++++++ tslint.json | 14 ++++++++++++++ 7 files changed, 70 insertions(+) create mode 100644 .gitignore create mode 100644 .prettierrc create mode 100644 README.md create mode 100644 package.json create mode 100644 src/index.ts create mode 100644 tsconfig.json create mode 100644 tslint.json diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..6ccc9d84 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.vscode +node_modules +package-lock.json +build diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..1502887d --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "trailingComma": "es5" +} \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 00000000..98c66522 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# rrweb-snapshot + +Not ready yet diff --git a/package.json b/package.json new file mode 100644 index 00000000..c8c0d7d1 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "rrweb-snapshot", + "version": "0.1.0", + "description": "rrweb's component to take a snapshot of DOM, aka DOM serializer", + "main": "index.js", + "scripts": { + "test": "mocha -r ts-node/register src/**/*.test.ts" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/rrweb-io/rrweb-snapshot.git" + }, + "keywords": [ + "rrweb", + "snapshot", + "DOM" + ], + "author": "yanzhen@smartx.com", + "license": "MIT", + "bugs": { + "url": "https://github.com/rrweb-io/rrweb-snapshot/issues" + }, + "homepage": "https://github.com/rrweb-io/rrweb-snapshot#readme", + "devDependencies": { + "@types/chai": "^4.1.4", + "@types/mocha": "^5.2.5", + "chai": "^4.1.2", + "mocha": "^5.2.0", + "ts-node": "^7.0.1", + "tslint": "^4.5.1", + "typescript": "^3.0.3" + } +} diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..1aec14ff --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "module": "commonjs", + "noImplicitAny": true, + "removeComments": true, + "preserveConstEnums": true, + "sourceMap": true, + "rootDir": "src", + "outDir": "build" + }, + "compileOnSave": true +} \ No newline at end of file diff --git a/tslint.json b/tslint.json new file mode 100644 index 00000000..c82ebf60 --- /dev/null +++ b/tslint.json @@ -0,0 +1,14 @@ +{ + "defaultSeverity": "error", + "extends": ["tslint:recommended"], + "jsRules": {}, + "rules": { + "no-any": true, + "quotemark": [true, "single"], + "ordered-imports": false, + "object-literal-sort-keys": false, + "no-unused-variable": true, + "object-literal-key-quotes": false + }, + "rulesDirectory": [] +} \ No newline at end of file