-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
3,244 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{json,yml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
registry=https://registry.npmjs.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# Build dribbblejs | ||
|
||
function BUNDLE { | ||
echo "Bundling..." | ||
rm -rf dist | ||
yarn bundle | ||
mv dist/index.d.ts index.d.ts | ||
echo "Bundling done." | ||
} | ||
|
||
BUNDLE | ||
echo "Completed build process." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,52 @@ | ||
{ | ||
"name": "dribbblejs", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"author": "Stefan Mansson <[email protected]>", | ||
"license": "MIT" | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"umd": "dist/index.umd.js", | ||
"module": "dist/index.m.js", | ||
"scripts": { | ||
"release": "changelog && git push --follow-tags && yarn publish --access public --non-interactive", | ||
"build": "sh ./build.sh", | ||
"bundle": "rollup -c", | ||
"prepublishOnly": "yarn build", | ||
"lint": "tslint -p tsconfig.json" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/animify/dribbblejs.git" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^16.8.17", | ||
"changelog.md": "^1.1.0", | ||
"husky": "^2.2.0", | ||
"lint-staged": "^8.1.6", | ||
"rollup": "^1.11.3", | ||
"rollup-plugin-babel": "^4.3.2", | ||
"rollup-plugin-commonjs": "^9.3.4", | ||
"rollup-plugin-node-resolve": "^4.2.4", | ||
"rollup-plugin-peer-deps-external": "^2.2.0", | ||
"rollup-plugin-typescript2": "^0.21.0", | ||
"tslint": "^5.16.0", | ||
"typescript": "^3.4.5" | ||
}, | ||
"files": [ | ||
"dist", | ||
"index.d.ts", | ||
"README.md", | ||
"LICENSE" | ||
], | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.ts": "yarn run lint" | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"registry": "https://registry.npmjs.org/" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
parser: "typescript", | ||
printWidth: 100, | ||
tabWidth: 4, | ||
singleQuote: true, | ||
trailingComma: "all", | ||
"jsx-a11y/href-no-hash": false | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import typescript from "rollup-plugin-typescript2"; | ||
import commonjs from "rollup-plugin-commonjs"; | ||
import external from "rollup-plugin-peer-deps-external"; | ||
import resolve from "rollup-plugin-node-resolve"; | ||
import pkg from "./package.json"; | ||
|
||
export default { | ||
input: "src/index.ts", | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: "cjs", | ||
exports: "named" | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: "es", | ||
exports: "named" | ||
} | ||
], | ||
plugins: [ | ||
external(), | ||
resolve(), | ||
typescript({ | ||
clean: true, | ||
rollupCommonJSResolveHack: true, | ||
exclude: ["*.d.ts", "**/*.d.ts"] | ||
}), | ||
commonjs() | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"compilerOptions": { | ||
"lib": ["dom", "es2015", "es2016", "es2017"], | ||
"outDir": "build", | ||
"module": "esnext", | ||
"target": "es5", | ||
"jsx": "react", | ||
"sourceMap": false, | ||
"allowJs": false, | ||
"noUnusedLocals": true, | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": true, | ||
"moduleResolution": "node", | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noImplicitAny": true, | ||
"strictNullChecks": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"noUnusedParameters": true | ||
}, | ||
"include": ["src"], | ||
"exclude": ["node_modules", "dist", "rollup.config.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"defaultSeverity": "error", | ||
"extends": ["tslint:recommended"], | ||
"rules": { | ||
"quotemark": [true, "single"], | ||
"array-type": [true, "array"], | ||
"no-namespace": [true, "allow-declarations"], | ||
"no-trailing-whitespace": false, | ||
"no-bitwise": false, | ||
"no-angle-bracket-type-assertion": true, | ||
"curly": [true, "ignore-same-line"], | ||
"variable-name": [ | ||
false, | ||
"ban-keywords", | ||
"check-format", | ||
"allow-leading-underscore" | ||
], | ||
"eofline": true, | ||
"interface-name": false, | ||
"member-ordering": false, | ||
"no-any": false, | ||
"no-console": false, | ||
"no-unused-expression": [true, "allow-fast-null-checks", "allow-new"], | ||
"object-literal-shorthand": false, | ||
"object-literal-sort-keys": false, | ||
"ordered-imports": false, | ||
"prefer-const": true, | ||
"radix": false, | ||
"triple-equals": [true, "allow-null-check"] | ||
}, | ||
"linterOptions": { | ||
"exclude": [ | ||
"index.d.ts" | ||
] | ||
} | ||
} |
Oops, something went wrong.