Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate typescript declaration files #1

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
node_modules/
node_modules/
.idea/
package-lock.json
.DS_Store
dist/
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
# React Native Animated Ellipsis
A simple, customizable animated dots component ideal for loading screens in React Native apps (forked from adorableio/react-native-animated-ellipsis - not maintained).

A simple, customizable animated dots component ideal for loading screens in
React Native apps (forked from Thanhal-P-A/rn-animated-ellipsis - not maintained).

![Kinda like iOS](https://raw.githubusercontent.com/wiki/adorableio/react-native-animated-ellipsis/images/example_ios_ish.gif)

## Supported Versions
- **React:** >=18.0.0
- **React Native:** >=0.70.0

## Installation
using npm
```shell
npm install rn-animated-ellipsis
npm install @reagankm/rn-animated-ellipsis
```
or using yarn
```shell
yarn add rn-animated-ellipsis
yarn add @reagankm/rn-animated-ellipsis
```
## Importing
```js
import AnimatedEllipsis from 'rn-animated-ellipsis';
import AnimatedEllipsis from '@reagankm/rn-animated-ellipsis';
```

## Usage
Expand Down Expand Up @@ -90,3 +95,11 @@ Customize the number of dots, animation speed, and style using these props:
}}
/>
```

This is a fork of [rn-animated-ellipsis](https://github.com/Thanhal-P-A/rn-animated-ellipsis) by
[Thanhal-P-A](https://github.com/Thanhal-P-A), which is a fork of
[react-native-animated-ellipsis](https://github.com/adorableio/react-native-animated-ellipsis)
by [adorableio](https://github.com/adorableio).

This fork includes TypeScript types and additional updates.

6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: ["module:metro-react-native-babel-preset"],
plugins: [
["@babel/plugin-transform-private-methods", { loose: true }],
]
};
92 changes: 0 additions & 92 deletions index.js

This file was deleted.

22 changes: 22 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// module.exports = {
// preset: 'react-native',
// setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
// transformIgnorePatterns: [
// 'node_modules/(?!(react-native|@react-native|@react-native-community|@testing-library)/)',
// ],
// transform: {
// '^.+\\.(js|jsx|ts|tsx)$': 'babel-jest',
// },
// moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
// };

module.exports = {
preset: 'react-native',
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
transformIgnorePatterns: [
'node_modules/(?!(react-native|@react-native|@react-native-community|@testing-library)/)',
],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': ['babel-jest', { configFile: './babel.config.js' }]
}
};
9 changes: 9 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import '@testing-library/jest-native/extend-expect';

jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');

jest.useFakeTimers();
afterEach(() => {
jest.clearAllMocks();
jest.clearAllTimers();
});
104 changes: 88 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,99 @@
{
"name": "rn-animated-ellipsis",
"version": "2.1.3",
"description": "A simple, customizable animated dots component ideal for loading screens in React Native apps.",
"main": "index.js",
"name": "@reagankm/rn-animated-ellipsis",
"version": "3.0.0",
"description": "An updated version of rn-animated-ellipsis, a simple, customizable animated dots component ideal for loading screens in React Native apps.",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"author": {
"name": "Thanhal P A",
"email": "[email protected]"
"name": "Reagan Middlebrook",
"email": "[email protected]"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"repository": {
"type": "git",
"url": "git+https://github.com/thanhal-p-a/rn-animated-ellipsis.git"
"url": "git+https://github.com/reagankm/rn-animated-ellipsis.git"
},
"bugs": {
"url": "https://github.com/reagankm/rn-animated-ellipsis/issues"
},
"homepage": "https://github.com/thanhal-p-a/rn-animated-ellipsis",
"homepage": "https://github.com/reagankm/rn-animated-ellipsis",
"license": "MIT",
"licenseFilename": "LICENSE",
"readmeFilename": "README.md",
"dependencies": {
"prop-types": "^15.5.10",
"babel-preset-stage-2": "^6.24.1",
"deprecated-react-native-prop-types": "^2.3.0"
},
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-plugin-transform-react-jsx": "^6.24.1"
}
"@babel/core": "^7.26.0",
"@babel/plugin-transform-private-methods": "^7.25.9",
"@babel/runtime": "^7.26.0",
"@react-native/eslint-config": "^0.73.1",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.9.0",
"@types/jest": "^29.5.14",
"@types/react": "^18.0.0",
"@types/react-native": "^0.70.0",
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"jest": "^29.7.0",
"metro-react-native-babel-preset": "^0.77.0",
"prettier": "^3.0.3",
"react-test-renderer": "^18.3.1",
"tsup": "^8.3.5",
"typescript": "^4.9.5"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
},
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts",
"test": "jest",
"typecheck": "tsc --noEmit",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"postbuild": "rm -f dist/*.mts"
},
"eslintConfig": {
"root": true,
"extends": [
"@react-native",
"prettier"
],
"rules": {
"react/react-in-jsx-scope": "off",
"prettier/prettier": [
"error",
{
"quoteProps": "consistent",
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": false
}
]
}
},
"eslintIgnore": [
"node_modules/"
],
"prettier": {
"quoteProps": "consistent",
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5",
"useTabs": false
},
"keywords": [
"react-native",
"animated ellipsis",
"rn-animated-ellipsis",
"react-native-animated-ellipsis",
"loading animation"
],
"files": [
"dist",
"README.md",
"LICENSE"
],
"readme": "README.md"
}
Loading