Skip to content

Commit 9700e13

Browse files
committed
fix: fixes
1 parent c96af3d commit 9700e13

File tree

7 files changed

+1610
-753
lines changed

7 files changed

+1610
-753
lines changed

.npmignore

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

@types/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,8 @@ export type UseIonHeaderParallxInputResult = {
99
ref: React.MutableRefObject<HTMLElement | null>
1010
}
1111

12-
export { useIonHeaderParallax } from '../src/useIonicHeaderParallax'
12+
import {useIonHeaderParallax} from '../src/useIonicHeaderParallax'
13+
14+
export {
15+
useIonHeaderParallax
16+
}

package.json

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,46 @@
1313
"keywords": [
1414
"ionic"
1515
],
16+
"contributors": [
17+
{
18+
"name": "Ahmed Nouira",
19+
"web": "http://twitter.com/AhmNouira"
20+
}
21+
],
1622
"bugs": {
1723
"url": "https://github.com/ahmnouira/ionic-react-header-parallax.git/issues"
1824
},
25+
"files": [
26+
"dist/"
27+
],
1928
"main": "dist/index.js",
2029
"types": "@types/index.ts",
2130
"scripts": {
22-
"prepare": "yarn build",
2331
"build": "tsc",
2432
"test": "jest",
33+
"test:update": "jest -u",
34+
"test:ci": "jest --runInBand --detectOpenHandles",
35+
"test:watch": "jest --watch",
36+
"test:coverage": "jest --coverage",
2537
"lint": "eslint src/**/*.ts",
2638
"eslint:fix": "eslint src/**/*.ts --fix",
2739
"format:fix": "prettier --write \"**/*.{ts,tsx,json}\"",
28-
"release": "auto shipit",
29-
"release:canary": "auto canary"
40+
"clean-install": "rimraf node_modules && yarn",
41+
"prepare": "rimraf dist && yarn build",
42+
"release": "np --no-2fa"
3043
},
3144
"license": "MIT",
3245
"devDependencies": {
3346
"@types/jest": "^27.0.1",
47+
"@types/node": "^16.6.1",
3448
"@types/react": "^17.0.18",
35-
"auto": "^10.31.0",
3649
"eslint": "^7.32.0",
3750
"jest": "^27.0.6",
51+
"np": "^7.5.0",
3852
"prettier": "^2.3.2",
3953
"react": "^17.0.2",
54+
"rimraf": "^3.0.2",
55+
"ts-node": "^10.2.0",
4056
"typescript": "^4.3.5"
4157
}
4258
}

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { useIonHeaderParallax } from './useIonicHeaderParallax'
2+
export type { UseIonHeaderParallaxInputResult, UseIonicHeaderParallaxInput } from './useIonicHeaderParallax'

src/useIonicHeaderParallax.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ export function useIonHeaderParallax({
213213
let targetHeight = maximumHeight - scrollTop
214214
targetHeight = Math.max(targetHeight, headerMinHeight)
215215

216-
console.log(lastScrollTop, ticking, overlayButtons)
216+
console.log(lastScrollTop, ticking, overlayButtons, translateAmt, scaleAmt)
217217
}
218218

219219
return {

tsconfig.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// "allowJs": true, /* Allow javascript files to be compiled. */
1010
// "checkJs": true, /* Report errors in .js files. */
1111
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
12-
"declaration": true /* Generates corresponding '.d.ts' file. */,
13-
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
14-
"sourceMap": true /* Generates corresponding '.map' file. */,
12+
"declaration": false /* Generates corresponding '.d.ts' file. */,
13+
"declarationMap": false /* Generates a sourcemap for each corresponding '.d.ts' file. */,
14+
"sourceMap": false /* Generates corresponding '.map' file. */,
1515
// "outFile": "./", /* Concatenate and emit output to single file. */
1616
"outDir": "./dist" /* Redirect output structure to the directory. */,
1717
// "rootDir": "./src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,

0 commit comments

Comments
 (0)