Skip to content

Commit

Permalink
1.0.0 (#18)
Browse files Browse the repository at this point in the history
* Switch from webpack to rollup

* Delete webpack.config.js

* v1.0.0 beta 2.1

* Update index.tsx

* Revert module

* 1.0.0 beta 3

* 1.0.0
  • Loading branch information
JB1905 authored Aug 12, 2019
1 parent cd293d6 commit 71cd34b
Show file tree
Hide file tree
Showing 12 changed files with 1,146 additions and 1,153 deletions.
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
src
docs

tsconfig.json
.travis.yml
.prettierrc
doczrc.js
.docz
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# react-wordpress-hooks Changelog

## 1.0.0 beta 3 / 1.0.0 (2019-08-12)
#### Repository Changes
- removed ES module
- switched back from `rollup` to `webpack`

## 1.0.0 beta 1 / 1.0.0 beta 2 (2019-08-09)
#### Repository Changes
- added ES module
- switched from `webpack` to `rollup`

## 1.0.0 alpha 1 (2019-07-21)
#### New Feature
- options parameter can be an array of IDs
Expand Down
24 changes: 12 additions & 12 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export { usePosts, useCreatePost, useRetrivePost, useUpdatePost, useDeletePost } from './hooks/usePosts';
export { useRevisions, useRetriveRevision, useDeleteRevision } from './hooks/useRevisions';
export { useCategories, useCreateCategory, useRetriveCategory, useUpdateCategory, useDeleteCategory } from './hooks/useCategories';
export { useTags, useCreateTag, useRetriveTag, useUpdateTag, useDeleteTag } from './hooks/useTags';
export { usePages, useCreatePage, useRetrivePage, useUpdatePage, useDeletePage } from './hooks/usePages';
export { useComments, useCreateComment, useRetriveComment, useUpdateComment, useDeleteComment } from './hooks/useComments';
export { useTaxonomies, useRetriveTaxonomy } from './hooks/useTaxonomies';
export { useMedia, useCreateMedia, useRetriveMedia, useUpdateMedia, useDeleteMedia } from './hooks/useMedia';
export { useUsers, useCreateUser, useRetriveUser, useUpdateUser, useDeleteUser } from './hooks/useUsers';
export { useTypes, useRetriveType } from './hooks/useTypes';
export { useStatuses, useRetriveStatus } from './hooks/useStatuses';
export { useSettings, useUpdateSetting } from './hooks/useSettings';
export * from './hooks/usePosts';
export * from './hooks/useRevisions';
export * from './hooks/useCategories';
export * from './hooks/useTags';
export * from './hooks/usePages';
export * from './hooks/useComments';
export * from './hooks/useTaxonomies';
export * from './hooks/useMedia';
export * from './hooks/useUsers';
export * from './hooks/useTypes';
export * from './hooks/useStatuses';
export * from './hooks/useSettings';
export { WPContext } from './context';
1,030 changes: 590 additions & 440 deletions lib/react-wordpress-hooks.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-wordpress-hooks.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react-wordpress-hooks.min.js

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "react-wordpress-hooks",
"version": "1.0.0-alpha.1",
"version": "1.0.0",
"description": "Set of hooks for WordPress REST API",
"author": "Jakub Biesiada",
"license": "MIT",
"main": "lib/react-wordpress-hooks.min.js",
"types": "lib/index.d.ts",
"scripts": {
"release": "npm run prettier && npm run lint && npm run build:dev && npm run build",
"release": "rimraf lib/* && npm run prettier && npm run lint && npm run build:dev && npm run build",
"build": "webpack --env build",
"build:dev": "webpack --env dev",
"watch": "npm run build -- --watch",
Expand Down Expand Up @@ -35,20 +35,20 @@
},
"homepage": "https://github.com/JB1905/react-wordpress-hooks#readme",
"devDependencies": {
"@types/react": "^16.8.24",
"@types/react": "^16.9.1",
"@typescript-eslint/parser": "^1.13.0",
"docz": "^1.2.0",
"docz-theme-default": "^1.2.0",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^1.6.1",
"gh-pages": "^2.1.0",
"husky": "^3.0.2",
"eslint-plugin-react-hooks": "^1.7.0",
"gh-pages": "^2.1.1",
"husky": "^3.0.3",
"lint-staged": "^9.2.1",
"prettier": "^1.18.2",
"react": "^16.8.6",
"react": "^16.9.0",
"ts-loader": "^6.0.4",
"typescript": "^3.5.3",
"webpack": "^4.39.1",
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useApiRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const useApiRequest = ({
const [error, setError] = useState<string | object | null>(null);

useEffect(() => {
const loadData = async () => {
async function loadData() {
try {
setLoading(true);

Expand Down Expand Up @@ -60,7 +60,7 @@ export const useApiRequest = ({
setLoading(false);
setError(err);
}
};
}

loadData();
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down
79 changes: 12 additions & 67 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,69 +1,14 @@
export {
usePosts,
useCreatePost,
useRetrivePost,
useUpdatePost,
useDeletePost
} from './hooks/usePosts';

export {
useRevisions,
useRetriveRevision,
useDeleteRevision
} from './hooks/useRevisions';

export {
useCategories,
useCreateCategory,
useRetriveCategory,
useUpdateCategory,
useDeleteCategory
} from './hooks/useCategories';

export {
useTags,
useCreateTag,
useRetriveTag,
useUpdateTag,
useDeleteTag
} from './hooks/useTags';

export {
usePages,
useCreatePage,
useRetrivePage,
useUpdatePage,
useDeletePage
} from './hooks/usePages';

export {
useComments,
useCreateComment,
useRetriveComment,
useUpdateComment,
useDeleteComment
} from './hooks/useComments';

export { useTaxonomies, useRetriveTaxonomy } from './hooks/useTaxonomies';

export {
useMedia,
useCreateMedia,
useRetriveMedia,
useUpdateMedia,
useDeleteMedia
} from './hooks/useMedia';

export {
useUsers,
useCreateUser,
useRetriveUser,
useUpdateUser,
useDeleteUser
} from './hooks/useUsers';

export { useTypes, useRetriveType } from './hooks/useTypes';
export { useStatuses, useRetriveStatus } from './hooks/useStatuses';
export { useSettings, useUpdateSetting } from './hooks/useSettings';
export * from './hooks/usePosts';
export * from './hooks/useRevisions';
export * from './hooks/useCategories';
export * from './hooks/useTags';
export * from './hooks/usePages';
export * from './hooks/useComments';
export * from './hooks/useTaxonomies';
export * from './hooks/useMedia';
export * from './hooks/useUsers';
export * from './hooks/useTypes';
export * from './hooks/useStatuses';
export * from './hooks/useSettings';

export { WPContext } from './context';
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"target": "es5",
"module": "esnext",
"checkJs": false,
"declaration": true,
"jsx": "react",
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ module.exports = env => {
]
}
};
};
};
Loading

0 comments on commit 71cd34b

Please sign in to comment.