Skip to content

Commit 88ffa82

Browse files
Merge pull request #52 from Naturalclar/chore/includeIndexToTs
chore: include index.ts in src
2 parents 2f7ae68 + 2919502 commit 88ffa82

File tree

4 files changed

+27
-26
lines changed

4 files changed

+27
-26
lines changed

index.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"name": "react-native-hooks",
33
"version": "0.9.0",
44
"description": "",
5-
"main": "index.js",
5+
"main": "lib/index.js",
6+
"types": "lib/index.d.ts",
67
"scripts": {
8+
"prepare":"yarn build",
79
"build": "yarn tsc",
810
"release": "release-it",
911
"test": "echo \"Error: no test specified\" && exit 1"
@@ -21,7 +23,6 @@
2123
"typescript": "^3.6.4"
2224
},
2325
"files": [
24-
"index.js",
2526
"lib"
2627
]
2728
}

src/index.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import useDimensions from './useDimensions'
2+
import useAppState from './useAppState'
3+
import useBackHandler from './useBackHandler'
4+
import useCameraRoll from './useCameraRoll'
5+
import useClipboard from './useClipboard'
6+
import useAccessibilityInfo from './useAccessibilityInfo'
7+
import useKeyboard from './useKeyboard'
8+
import useInteractionManager from './useInteractionManager'
9+
import useDeviceOrientation from './useDeviceOrientation'
10+
import useLayout from './useLayout'
11+
12+
export {
13+
useDimensions,
14+
useAppState,
15+
useBackHandler,
16+
useCameraRoll,
17+
useClipboard,
18+
useAccessibilityInfo,
19+
useKeyboard,
20+
useInteractionManager,
21+
useDeviceOrientation,
22+
useLayout
23+
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"sourceMap": true, /* Generates corresponding '.map' file. */
1414
// "outFile": "./", /* Concatenate and emit output to single file. */
1515
"outDir": "./lib", /* Redirect output structure to the directory. */
16-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
16+
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
1717
// "composite": true, /* Enable project compilation */
1818
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
1919
// "removeComments": true, /* Do not emit comments to output. */

0 commit comments

Comments
 (0)