Skip to content

Commit

Permalink
feat(core): add typescript definition
Browse files Browse the repository at this point in the history
  • Loading branch information
Johann-S committed Sep 1, 2018
1 parent b1a5dab commit 690de35
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

A little plugin which makes Bootstrap 4 custom file input dynamic with no dependencies.

You can use it on [React](https://stackblitz.com/edit/bs-custom-file-input-react) and Angular too because this plugins is written with the most used JavaScript framework: [VanillaJS](http://vanilla-js.com/)

Features:

- Works with Bootstrap 4
Expand Down
8 changes: 8 additions & 0 deletions bs-custom-file-input.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
declare module 'bs-custom-file-input' {
interface bsCustomFileInput {
init(inputSelector?: string, formSelector?: string): void,
destroy(): void,
}

export default bsCustomFileInput;
}
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.0.2",
"description": "A little plugin for Bootstrap 4 custom file input",
"main": "dist/bs-custom-file-input.js",
"types": "bs-custom-file-input.d.ts",
"bugs": {
"url": "https://github.com/Johann-S/bs-custom-file-input/issues"
},
Expand All @@ -21,12 +22,16 @@
"test": "npm run js-lint && npm run js-test"
},
"files": [
"dist/*.{js,map}"
"dist/*.{js,map}",
"bs-custom-file-input.d.ts"
],
"keywords": [
"bootstrap",
"bootstrap 4",
"custom file input"
"custom file input",
"vanillajs",
"react",
"angular"
],
"author": "Johann-S <johann.servoire@gmail.com>",
"homepage": "https://github.com/Johann-S/bs-custom-file-input",
Expand All @@ -35,6 +40,7 @@
"url": "git+https://github.com/Johann-S/bs-custom-file-input.git"
},
"license": "MIT",
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.0.0",
"@babel/preset-env": "^7.0.0",
Expand All @@ -60,6 +66,5 @@
"shx": "^0.3.2",
"sinon": "^6.1.5",
"standard-version": "^4.4.0"
},
"dependencies": {}
}
}

0 comments on commit 690de35

Please sign in to comment.