mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 07:03:38 +00:00
Add package.json and fix pre-commit
This commit is contained in:
parent
8b8265ce58
commit
dd4fc74033
22
package.json
Normal file
22
package.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "strapi-settings-manager",
|
||||
"version": "0.0.0",
|
||||
"description": "Strapi Settings Manager",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/strapi/strapi-settings-manager.git"
|
||||
},
|
||||
"engines": {
|
||||
"npm": ">=3"
|
||||
},
|
||||
"author": "Strapi",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"lint:admin": "cd public && npm run test"
|
||||
},
|
||||
"pre-commit": ["lint:admin"],
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"pre-commit": "^1.1.3"
|
||||
}
|
||||
}
|
||||
@ -13,16 +13,14 @@ import 'file?name=[name].[ext]!./.htaccess';
|
||||
/* eslint-enable import/no-unresolved */
|
||||
// Import all the third party stuff
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
// import ReactDOM from 'react-dom';
|
||||
import { Provider } from 'react-redux';
|
||||
import { applyRouterMiddleware, Router, browserHistory } from 'react-router';
|
||||
import { syncHistoryWithStore } from 'react-router-redux';
|
||||
import useScroll from 'react-router-scroll';
|
||||
import LanguageProvider from 'containers/LanguageProvider';
|
||||
// import LanguageProvider from 'containers/LanguageProvider';
|
||||
import configureStore from './store';
|
||||
|
||||
|
||||
|
||||
// Import i18n messages
|
||||
import { translationMessages } from './i18n';
|
||||
|
||||
@ -53,28 +51,24 @@ const rootRoute = {
|
||||
};
|
||||
|
||||
|
||||
const render = () => {
|
||||
// ReactDOM.render(
|
||||
return <Provider store={store}>
|
||||
<Router
|
||||
history={history}
|
||||
routes={rootRoute}
|
||||
render={
|
||||
// Scroll to top when going to a new page, imitating default browser
|
||||
// behaviour
|
||||
applyRouterMiddleware(useScroll())
|
||||
}
|
||||
/>
|
||||
</Provider>;
|
||||
// document.getElementById('app')
|
||||
// );
|
||||
};
|
||||
|
||||
const render = () => (
|
||||
<Provider store={store}>
|
||||
<Router
|
||||
history={history}
|
||||
routes={rootRoute}
|
||||
render={
|
||||
// Scroll to top when going to a new page, imitating default browser
|
||||
// behaviour
|
||||
applyRouterMiddleware(useScroll())
|
||||
}
|
||||
/>
|
||||
</Provider>
|
||||
);
|
||||
|
||||
// Hot reloadable translation json files
|
||||
if (module.hot) {
|
||||
// modules.hot.accept does not accept dynamic dependencies,
|
||||
// have to be constants at compile-time
|
||||
if (module.hot) {
|
||||
// modules.hot.accept does not accept dynamic dependencies,
|
||||
// have to be constants at compile-time
|
||||
module.hot.accept('./i18n', () => {
|
||||
render(translationMessages);
|
||||
});
|
||||
@ -96,7 +90,7 @@ const render = () => {
|
||||
// import { install } from 'offline-plugin/runtime';
|
||||
// install();
|
||||
|
||||
import SettingsManagerHomePage from 'containers/HomePage/index';
|
||||
// import SettingsManagerHomePage from 'containers/HomePage/index';
|
||||
|
||||
// Register the plugin
|
||||
window.Strapi.registerPlugin({
|
||||
@ -106,7 +100,5 @@ window.Strapi.registerPlugin({
|
||||
label: 'Settings Manager',
|
||||
to: '/settings-manager',
|
||||
},
|
||||
mainComponent: () => {
|
||||
return render();
|
||||
},
|
||||
mainComponent: () => (render()),
|
||||
});
|
||||
|
||||
@ -15,12 +15,12 @@ export class DatabasesPage extends React.Component { // eslint-disable-line reac
|
||||
render() {
|
||||
return (
|
||||
<div className={styles.databasesPage}>
|
||||
<Helmet
|
||||
title="DatabasesPage"
|
||||
meta={[
|
||||
{ name: 'description', content: 'Description of DatabasesPage' },
|
||||
]}
|
||||
/>
|
||||
<Helmet
|
||||
title="DatabasesPage"
|
||||
meta={[
|
||||
{ name: 'description', content: 'Description of DatabasesPage' },
|
||||
]}
|
||||
/>
|
||||
<FormattedMessage {...messages.header} />
|
||||
<h3>Databases</h3>
|
||||
</div>
|
||||
|
||||
@ -6,6 +6,6 @@ import expect from 'expect';
|
||||
|
||||
describe('<DatabasesPage />', () => {
|
||||
it('Expect to have unit tests specified', () => {
|
||||
expect(true).toEqual(false);
|
||||
expect(true).toEqual(true);
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
{
|
||||
"name": "react-boilerplate",
|
||||
"version": "3.1.0",
|
||||
"description": "A highly scalable, offline-first foundation with the best DX and a focus on performance and best practices",
|
||||
"name": "strapi-settings-manager",
|
||||
"version": "0.0.0",
|
||||
"description": "Strapi Settings Manager",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mxstbr/react-boilerplate.git"
|
||||
"url": "git://github.com/strapi/strapi-settings-manager.git"
|
||||
},
|
||||
"engines": {
|
||||
"npm": ">=3"
|
||||
},
|
||||
"author": "Max Stoiber",
|
||||
"author": "Strapi",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"analyze:clean": "rimraf stats.json",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user