Skip to content
This repository was archived by the owner on Apr 19, 2020. It is now read-only.

Commit 3e97a74

Browse files
committed
Initial commit
0 parents  commit 3e97a74

14 files changed

+7283
-0
lines changed

.bilirc.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
type Config = import('bili').Config
2+
3+
const config: Config = {
4+
input: ['src/index.ts'],
5+
output: {
6+
dir: 'lib',
7+
format: ['cjs', 'esm']
8+
}
9+
}
10+
11+
export default config

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Build directories
2+
lib

.eslintrc.js

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
module.exports = {
2+
extends: [
3+
'standard-with-typescript',
4+
'plugin:prettier/recommended',
5+
'prettier/standard',
6+
'prettier/@typescript-eslint'
7+
],
8+
parserOptions: {
9+
project: './tsconfig.json',
10+
createDefaultProgram: true
11+
},
12+
rules: {
13+
'@typescript-eslint/camelcase': 'warn',
14+
'@typescript-eslint/consistent-type-definitions': 'off',
15+
'@typescript-eslint/no-empty-interface': 'warn',
16+
'@typescript-eslint/no-non-null-assertion': 'warn',
17+
'@typescript-eslint/promise-function-async': 'off',
18+
'@typescript-eslint/require-array-sort-compare': 'off',
19+
'@typescript-eslint/require-await': 'warn',
20+
'@typescript-eslint/strict-boolean-expressions': 'off'
21+
}
22+
}

.gitignore

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Build directories
9+
lib
10+
11+
# Dependency directories
12+
node_modules
13+
14+
# Output of 'npm pack'
15+
*.tgz
16+
17+
# dotenv files
18+
.env
19+
20+
# Others
21+
package-lock.json
22+
*.local

.huskyrc.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const tasks = taskList => taskList.join(' && ')
2+
3+
module.exports = {
4+
hooks: {
5+
'pre-commit': tasks(['lint-staged', 'pretty-quick --staged'])
6+
}
7+
}

.lintstagedrc.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
'src/**/*.ts': () => 'tsc -p tsconfig.json --noEmit',
3+
'src/**/*.ts': ['eslint']
4+
}

.prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Build directories
2+
lib

.prettierrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
endOfLine: 'lf',
3+
semi: false,
4+
singleQuote: true
5+
}

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Munif Tanjim
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Synor Source File
2+
3+
Synor Source Engine - File
4+
5+
## Installation
6+
7+
```sh
8+
# using yarn:
9+
yarn add @synor/source-file
10+
11+
# using npm:
12+
npm install --save @synor/source-file
13+
```
14+
15+
## License
16+
17+
Licensed under the MIT License. Check the [LICENSE](./LICENSE) file for details.

jest.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node'
4+
}

package.json

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"name": "@synor/source-file",
3+
"version": "0.0.0",
4+
"description": "Synor Source Engine - File",
5+
"keywords": [
6+
"synor",
7+
"synor-source",
8+
"file"
9+
],
10+
"homepage": "https://github.com/Synor/source-file#readme",
11+
"bugs": "https://github.com/Synor/source-file/issues",
12+
"license": "MIT",
13+
"author": "Munif Tanjim (https://muniftanjim.dev)",
14+
"files": [
15+
"lib"
16+
],
17+
"main": "lib/index.js",
18+
"module": "lib/index.esm.js",
19+
"types": "lib/index.d.ts",
20+
"repository": "https://github.com/Synor/source-file",
21+
"scripts": {
22+
"prebuild": "npm run clean",
23+
"build": "bili",
24+
"clean": "rimraf lib/*",
25+
"test": "jest"
26+
},
27+
"dependencies": {
28+
"@synor/core": "^0.1.0",
29+
"debug": "^4.1.1"
30+
},
31+
"devDependencies": {
32+
"@types/debug": "^4.1.5",
33+
"@types/jest": "^24.0.19",
34+
"@typescript-eslint/eslint-plugin": "^2.5.0",
35+
"@typescript-eslint/parser": "^2.5.0",
36+
"bili": "^4.8.1",
37+
"eslint": "^6.5.1",
38+
"eslint-config-prettier": "^6.4.0",
39+
"eslint-config-standard-with-typescript": "^10.0.0",
40+
"eslint-plugin-import": "^2.18.2",
41+
"eslint-plugin-node": "^10.0.0",
42+
"eslint-plugin-prettier": "^3.1.1",
43+
"eslint-plugin-promise": "^4.2.1",
44+
"eslint-plugin-standard": "^4.0.1",
45+
"husky": "^3.0.9",
46+
"jest": "^24.9.0",
47+
"lint-staged": "^9.4.2",
48+
"prettier": "^1.18.2",
49+
"pretty-quick": "^2.0.0",
50+
"rimraf": "^3.0.0",
51+
"rollup-plugin-typescript2": "^0.25.2",
52+
"ts-jest": "^24.1.0",
53+
"ts-node": "^8.5.4",
54+
"typescript": "^3.7.2"
55+
}
56+
}

tsconfig.json

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"compilerOptions": {
3+
/* Basic Options */
4+
// "incremental": true, /* Enable incremental compilation */
5+
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */,
6+
"module": "esnext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
7+
// "lib": [], /* Specify library files to be included in the compilation. */
8+
// "allowJs": true, /* Allow javascript files to be compiled. */
9+
// "checkJs": true, /* Report errors in .js files. */
10+
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
11+
"declaration": true /* Generates corresponding '.d.ts' file. */,
12+
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
13+
// "sourceMap": true /* Generates corresponding '.map' file. */,
14+
// "outFile": "./", /* Concatenate and emit output to single file. */
15+
"outDir": "./lib" /* Redirect output structure to the directory. */,
16+
"rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
17+
// "composite": true, /* Enable project compilation */
18+
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
19+
// "removeComments": true, /* Do not emit comments to output. */
20+
"noEmit": true /* Do not emit outputs. */,
21+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
22+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
23+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
24+
25+
/* Strict Type-Checking Options */
26+
"strict": true /* Enable all strict type-checking options. */,
27+
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
28+
// "strictNullChecks": true, /* Enable strict null checks. */
29+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
30+
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
31+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
32+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
33+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
34+
35+
/* Additional Checks */
36+
// "noUnusedLocals": true, /* Report errors on unused locals. */
37+
// "noUnusedParameters": true, /* Report errors on unused parameters. */
38+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
39+
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
40+
41+
/* Module Resolution Options */
42+
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
43+
// "baseUrl": "./src", /* Base directory to resolve non-absolute module names. */
44+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
45+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
46+
// "typeRoots": [], /* List of folders to include type definitions from. */
47+
// "types": [], /* Type declaration files to be included in compilation. */
48+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
49+
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
50+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
51+
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
52+
53+
/* Source Map Options */
54+
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
55+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
56+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
57+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
58+
59+
/* Experimental Options */
60+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
61+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
62+
},
63+
"include": ["src"],
64+
"exclude": ["src/**/*.test.ts", "src/**/*.snap"]
65+
}

0 commit comments

Comments
 (0)