Remove hook package and move it into core/admin

Signed-off-by: soupette <cyril.lpz@gmail.com>
This commit is contained in:
soupette 2021-06-23 10:16:24 +02:00
parent 63c7dff65a
commit 9b9876d50f
5 changed files with 6 additions and 32 deletions

View File

@ -5,8 +5,8 @@ import { QueryClientProvider, QueryClient } from 'react-query';
import { ThemeProvider } from 'styled-components';
import { LibraryProvider, StrapiAppProvider } from '@strapi/helper-plugin';
import pick from 'lodash/pick';
import createHook from '@strapi/hooks';
import invariant from 'invariant';
import createHook from './core/utils/createHook';
import configureStore from './core/store/configureStore';
import { Plugin } from './core/apis';
import basename from './utils/basename';

View File

@ -1,5 +1,5 @@
'use strict';
/* eslint-disable no-await-in-loop */
/* eslint-disable no-restricted-syntax */
const createHook = () => {
const _handlers = [];
@ -44,4 +44,4 @@ const createHook = () => {
};
};
module.exports = createHook;
export default createHook;

View File

@ -1,8 +1,6 @@
'use strict';
import createHook from '../createHook';
const createHook = require('../');
describe('createHook', () => {
describe('ADMIN | core | utils | createHook', () => {
let hooksContainer;
beforeEach(() => {

View File

@ -38,7 +38,6 @@
"@fortawesome/free-solid-svg-icons": "^5.15.3",
"@fortawesome/react-fontawesome": "^0.1.14",
"@strapi/helper-plugin": "3.6.0",
"@strapi/hooks": "^0.1.0",
"@strapi/utils": "3.6.0",
"axios": "^0.21.1",
"babel-loader": "8.2.2",

View File

@ -1,23 +0,0 @@
{
"name": "@strapi/hooks",
"main": "./lib/index.js",
"version": "0.1.0",
"license": "SEE LICENSE IN LICENSE",
"description": "Strapi hook system, it allows Strapi to define places in the application where plugins can add personalized behavior.",
"author": {
"name": "Strapi Team",
"email": "hi@strapi.io",
"url": "https://strapi.io"
},
"maintainers": [
{
"name": "Strapi team",
"email": "hi@strapi.io",
"url": "https://strapi.io"
}
],
"repository": {
"type": "git",
"url": "git://github.com/strapi/strapi.git"
}
}