From 62f96e5c0738a62c9fc6aa3d44a06b2011543f94 Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Tue, 26 Sep 2017 16:36:28 +0200 Subject: [PATCH] Use one webpack server to serve admin in development mode --- packages/strapi-admin/admin/src/app.js | 20 +------- .../admin/src/components/Header/index.js | 1 + .../src/components/LeftMenuFooter/index.js | 1 + .../src/components/LeftMenuHeader/index.js | 1 + .../src/components/LeftMenuLink/index.js | 5 +- .../components/LeftMenuLinkContainer/index.js | 1 + .../src/components/Notification/index.js | 1 + .../NotificationsContainer/index.js | 5 +- .../admin/src/components/Toggle/index.js | 1 + .../src/components/ToggleOption/index.js | 1 + .../admin/src/containers/AdminPage/index.js | 1 + .../admin/src/containers/App/index.js | 1 + .../src/containers/ComingSoonPage/index.js | 1 + .../admin/src/containers/Content/index.js | 1 + .../admin/src/containers/HomePage/index.js | 1 + .../src/containers/LanguageProvider/index.js | 1 + .../admin/src/containers/LeftMenu/index.js | 1 + .../src/containers/LocaleToggle/index.js | 1 + .../src/containers/NotFoundPage/index.js | 1 + .../containers/NotificationProvider/index.js | 2 +- .../admin/src/containers/PluginPage/index.js | 3 +- packages/strapi-admin/admin/src/index.html | 4 -- .../admin/src/utils/injectReducer.js | 2 +- .../admin/src/utils/injectSaga.js | 2 +- packages/strapi-admin/package.json | 4 +- packages/strapi-generate-admin/package.json | 4 +- packages/strapi-generate-new/package.json | 4 +- packages/strapi-generate/package.json | 4 +- .../internals/webpack/webpack.base.babel.js | 48 +++++++++---------- .../internals/webpack/webpack.dev.babel.js | 39 ++++++++------- .../internals/webpack/webpack.prod.babel.js | 2 +- .../server/middlewares/frontendMiddleware.js | 2 +- packages/strapi-helper-plugin/lib/src/app.js | 1 + .../lib/src/components/Button/index.js | 1 + .../lib/src/components/Input/index.js | 1 + .../lib/src/components/PluginHeader/index.js | 1 + .../components/PluginHeaderActions/index.js | 1 + .../src/components/PluginHeaderTitle/index.js | 1 + .../lib/src/components/PopUpWarning/index.js | 1 + .../lib/src/utils/injectReducer.js | 2 +- .../lib/src/utils/injectSaga.js | 2 +- packages/strapi-helper-plugin/package.json | 13 +++-- packages/strapi-mongoose/lib/index.js | 2 - packages/strapi-mongoose/package.json | 4 +- .../admin/src/components/Container/index.js | 1 + .../admin/src/components/EditForm/index.js | 1 + .../src/components/EditFormRelations/index.js | 1 + .../admin/src/components/LimitSelect/index.js | 1 + .../admin/src/components/Pagination/index.js | 1 + .../admin/src/components/SelectMany/index.js | 1 + .../admin/src/components/SelectOne/index.js | 1 + .../admin/src/components/Table/index.js | 1 + .../admin/src/components/TableEmpty/index.js | 1 + .../admin/src/components/TableFooter/index.js | 1 + .../admin/src/components/TableHeader/index.js | 1 + .../admin/src/components/TableRow/index.js | 1 + .../admin/src/containers/App/index.js | 5 +- .../admin/src/containers/App/sagas.js | 4 +- .../admin/src/containers/Edit/index.js | 1 + .../admin/src/containers/Home/index.js | 3 +- .../admin/src/containers/List/index.js | 1 + .../src/containers/NotFoundPage/index.js | 1 + .../package.json | 4 +- .../package.json | 4 +- .../admin/src/utils/request.js | 4 +- .../package.json | 4 +- packages/strapi-utils/package.json | 2 +- packages/strapi/package.json | 16 +++---- 68 files changed, 144 insertions(+), 113 deletions(-) diff --git a/packages/strapi-admin/admin/src/app.js b/packages/strapi-admin/admin/src/app.js index 4bcd6f0130..063f1a174f 100755 --- a/packages/strapi-admin/admin/src/app.js +++ b/packages/strapi-admin/admin/src/app.js @@ -8,6 +8,8 @@ import 'babel-polyfill'; // Import all the third party stuff import { Provider } from 'react-redux'; +import React from 'react'; +import ReactDOM from 'react-dom'; import { ConnectedRouter } from 'react-router-redux'; import createHistory from 'history/createBrowserHistory'; import { merge, isFunction } from 'lodash'; @@ -20,7 +22,6 @@ import App from 'containers/App'; import { showNotification } from 'containers/NotificationProvider/actions'; import { pluginLoaded, updatePlugin } from 'containers/App/actions'; -import { plugins } from '../../config/admin.json'; import configureStore from './store'; import { translationMessages, languages } from './i18n'; @@ -129,23 +130,6 @@ window.Strapi = { languages, }; -// Ping each plugins port defined in configuration -if (window.location.hostname === 'localhost') { - plugins.ports.forEach(pluginPort => { - // Define plugin url - const pluginUrl = `http://localhost:${pluginPort}/main.js`; - - // Check that the server in running - fetch(pluginUrl) - .then(() => { - // Inject `script` tag in DOM - const script = window.document.createElement('script'); - script.src = pluginUrl; - window.document.body.appendChild(script); - }); - }); -} - const dispatch = store.dispatch; export { dispatch, diff --git a/packages/strapi-admin/admin/src/components/Header/index.js b/packages/strapi-admin/admin/src/components/Header/index.js index 0309c4e660..1d254ca65f 100755 --- a/packages/strapi-admin/admin/src/components/Header/index.js +++ b/packages/strapi-admin/admin/src/components/Header/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import styles from './styles.scss'; class Header extends React.Component { // eslint-disable-line react/prefer-stateless-function diff --git a/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js b/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js index 57398e6c8d..a9ad2b2a1b 100755 --- a/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuFooter/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import { defineMessages, FormattedMessage } from 'react-intl'; import LocaleToggle from 'containers/LocaleToggle'; diff --git a/packages/strapi-admin/admin/src/components/LeftMenuHeader/index.js b/packages/strapi-admin/admin/src/components/LeftMenuHeader/index.js index c8843a71e7..fc114b0593 100755 --- a/packages/strapi-admin/admin/src/components/LeftMenuHeader/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuHeader/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import { Link } from 'react-router-dom'; import styles from './styles.scss'; diff --git a/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js b/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js index dc8bb81bd5..0fb8a45fb1 100755 --- a/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuLink/index.js @@ -4,7 +4,8 @@ * */ -import _ from 'lodash'; +import React from 'react'; +import { startsWith } from 'lodash'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { Link } from 'react-router-dom'; @@ -15,7 +16,7 @@ class LeftMenuLink extends React.Component { // eslint-disable-line react/prefer render() { // We need to create our own active url checker, // because of the two levels router. - const isLinkActive = _.startsWith(window.location.pathname.replace('/admin', ''), this.props.destination); + const isLinkActive = startsWith(window.location.pathname.replace('/admin', ''), this.props.destination); return (
  • diff --git a/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js b/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js index 932f70455f..7002ade35a 100755 --- a/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js +++ b/packages/strapi-admin/admin/src/components/LeftMenuLinkContainer/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { map } from 'lodash'; diff --git a/packages/strapi-admin/admin/src/components/Notification/index.js b/packages/strapi-admin/admin/src/components/Notification/index.js index 4847493322..d2876f7df0 100755 --- a/packages/strapi-admin/admin/src/components/Notification/index.js +++ b/packages/strapi-admin/admin/src/components/Notification/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; diff --git a/packages/strapi-admin/admin/src/components/NotificationsContainer/index.js b/packages/strapi-admin/admin/src/components/NotificationsContainer/index.js index f14616778c..cb734cdefd 100755 --- a/packages/strapi-admin/admin/src/components/NotificationsContainer/index.js +++ b/packages/strapi-admin/admin/src/components/NotificationsContainer/index.js @@ -4,13 +4,14 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; +import { CSSTransition, TransitionGroup } from 'react-transition-group'; + import Notification from 'components/Notification'; import styles from './styles.scss'; -const { CSSTransition, TransitionGroup } = ReactTransitionGroup; - class NotificationsContainer extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { if (this.props.notifications.length === 0) { diff --git a/packages/strapi-admin/admin/src/components/Toggle/index.js b/packages/strapi-admin/admin/src/components/Toggle/index.js index 9f7fe59424..0d3cce44f6 100755 --- a/packages/strapi-admin/admin/src/components/Toggle/index.js +++ b/packages/strapi-admin/admin/src/components/Toggle/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import ToggleOption from 'components/ToggleOption'; diff --git a/packages/strapi-admin/admin/src/components/ToggleOption/index.js b/packages/strapi-admin/admin/src/components/ToggleOption/index.js index 6fb67a44b5..f72109a57a 100755 --- a/packages/strapi-admin/admin/src/components/ToggleOption/index.js +++ b/packages/strapi-admin/admin/src/components/ToggleOption/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { injectIntl, intlShape } from 'react-intl'; diff --git a/packages/strapi-admin/admin/src/containers/AdminPage/index.js b/packages/strapi-admin/admin/src/containers/AdminPage/index.js index a5ec88f087..4fe17333d7 100644 --- a/packages/strapi-admin/admin/src/containers/AdminPage/index.js +++ b/packages/strapi-admin/admin/src/containers/AdminPage/index.js @@ -9,6 +9,7 @@ * the linting exception. */ +import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; diff --git a/packages/strapi-admin/admin/src/containers/App/index.js b/packages/strapi-admin/admin/src/containers/App/index.js index 2d832477b1..7441753f96 100644 --- a/packages/strapi-admin/admin/src/containers/App/index.js +++ b/packages/strapi-admin/admin/src/containers/App/index.js @@ -11,6 +11,7 @@ * the linting exception. */ +import React from 'react'; import PropTypes from 'prop-types'; import { Switch, Route } from 'react-router-dom'; diff --git a/packages/strapi-admin/admin/src/containers/ComingSoonPage/index.js b/packages/strapi-admin/admin/src/containers/ComingSoonPage/index.js index aea3a0c74e..67c6dcdd16 100755 --- a/packages/strapi-admin/admin/src/containers/ComingSoonPage/index.js +++ b/packages/strapi-admin/admin/src/containers/ComingSoonPage/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import { connect } from 'react-redux'; import Helmet from 'react-helmet'; diff --git a/packages/strapi-admin/admin/src/containers/Content/index.js b/packages/strapi-admin/admin/src/containers/Content/index.js index 38b6bf4d00..0b2d751ef5 100755 --- a/packages/strapi-admin/admin/src/containers/Content/index.js +++ b/packages/strapi-admin/admin/src/containers/Content/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; diff --git a/packages/strapi-admin/admin/src/containers/HomePage/index.js b/packages/strapi-admin/admin/src/containers/HomePage/index.js index e256d315cd..d3fc554480 100644 --- a/packages/strapi-admin/admin/src/containers/HomePage/index.js +++ b/packages/strapi-admin/admin/src/containers/HomePage/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import { connect } from 'react-redux'; import Helmet from 'react-helmet'; import { FormattedMessage } from 'react-intl'; diff --git a/packages/strapi-admin/admin/src/containers/LanguageProvider/index.js b/packages/strapi-admin/admin/src/containers/LanguageProvider/index.js index 5fc465c591..cf6a183e8f 100755 --- a/packages/strapi-admin/admin/src/containers/LanguageProvider/index.js +++ b/packages/strapi-admin/admin/src/containers/LanguageProvider/index.js @@ -6,6 +6,7 @@ * IntlProvider component and i18n messages (loaded from `app/translations`) */ +import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; diff --git a/packages/strapi-admin/admin/src/containers/LeftMenu/index.js b/packages/strapi-admin/admin/src/containers/LeftMenu/index.js index 35cd08b6d6..202412b49b 100755 --- a/packages/strapi-admin/admin/src/containers/LeftMenu/index.js +++ b/packages/strapi-admin/admin/src/containers/LeftMenu/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; diff --git a/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js b/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js index e4aec6fd4d..eacba0b0a2 100755 --- a/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js +++ b/packages/strapi-admin/admin/src/containers/LocaleToggle/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createSelector } from 'reselect'; diff --git a/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js b/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js index 9c379c3d72..a819eb5203 100755 --- a/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js +++ b/packages/strapi-admin/admin/src/containers/NotFoundPage/index.js @@ -9,6 +9,7 @@ * the linting exception. */ +import React from 'react'; import PropTypes from 'prop-types'; import { defineMessages, FormattedMessage } from 'react-intl'; diff --git a/packages/strapi-admin/admin/src/containers/NotificationProvider/index.js b/packages/strapi-admin/admin/src/containers/NotificationProvider/index.js index 1106f37860..0367a53315 100644 --- a/packages/strapi-admin/admin/src/containers/NotificationProvider/index.js +++ b/packages/strapi-admin/admin/src/containers/NotificationProvider/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; @@ -12,7 +13,6 @@ import NotificationsContainer from 'components/NotificationsContainer'; import { selectNotifications } from './selectors'; import { hideNotification } from './actions'; - export class NotificationProvider extends React.Component { // eslint-disable-line react/prefer-stateless-function render() { return ( diff --git a/packages/strapi-admin/admin/src/containers/PluginPage/index.js b/packages/strapi-admin/admin/src/containers/PluginPage/index.js index 2db1f6f6d8..793596c0cc 100755 --- a/packages/strapi-admin/admin/src/containers/PluginPage/index.js +++ b/packages/strapi-admin/admin/src/containers/PluginPage/index.js @@ -3,7 +3,8 @@ * PluginPage * */ - + +import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import Helmet from 'react-helmet'; diff --git a/packages/strapi-admin/admin/src/index.html b/packages/strapi-admin/admin/src/index.html index f9b3624764..ff86160ebd 100755 --- a/packages/strapi-admin/admin/src/index.html +++ b/packages/strapi-admin/admin/src/index.html @@ -12,9 +12,5 @@
    - - - - diff --git a/packages/strapi-admin/admin/src/utils/injectReducer.js b/packages/strapi-admin/admin/src/utils/injectReducer.js index 27f2751b2e..1e46dbb3b8 100644 --- a/packages/strapi-admin/admin/src/utils/injectReducer.js +++ b/packages/strapi-admin/admin/src/utils/injectReducer.js @@ -1,4 +1,4 @@ - +import React from 'react'; import PropTypes from 'prop-types'; import hoistNonReactStatics from 'hoist-non-react-statics'; diff --git a/packages/strapi-admin/admin/src/utils/injectSaga.js b/packages/strapi-admin/admin/src/utils/injectSaga.js index 161993fe19..1679cf9a99 100644 --- a/packages/strapi-admin/admin/src/utils/injectSaga.js +++ b/packages/strapi-admin/admin/src/utils/injectSaga.js @@ -1,4 +1,4 @@ - +import React from 'react'; import PropTypes from 'prop-types'; import hoistNonReactStatics from 'hoist-non-react-statics'; diff --git a/packages/strapi-admin/package.json b/packages/strapi-admin/package.json index 55d5389a9e..831b2f60c7 100755 --- a/packages/strapi-admin/package.json +++ b/packages/strapi-admin/package.json @@ -46,7 +46,7 @@ "plop": "^1.8.1", "prettier": "^1.7.0", "rimraf": "^2.6.2", - "strapi-helper-plugin": "file:../strapi-helper-plugin", + "strapi-helper-plugin": "3.0.0-alpha.5.5", "webpack": "^3.6.0" }, "author": { @@ -66,4 +66,4 @@ "npm": ">= 3.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-generate-admin/package.json b/packages/strapi-generate-admin/package.json index 73eb0ffa43..35dd814036 100755 --- a/packages/strapi-generate-admin/package.json +++ b/packages/strapi-generate-admin/package.json @@ -15,7 +15,7 @@ "dependencies": { "fs-extra": "^4.0.1", "lodash": "^4.17.4", - "strapi-admin": "file:../strapi-admin" + "strapi-admin": "3.0.0-alpha.5.5" }, "author": { "email": "hi@strapi.io", @@ -41,4 +41,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-generate-new/package.json b/packages/strapi-generate-new/package.json index c9d2dcdfae..b66f01bfa0 100755 --- a/packages/strapi-generate-new/package.json +++ b/packages/strapi-generate-new/package.json @@ -17,7 +17,7 @@ "fs-extra": "^4.0.0", "get-installed-path": "^3.0.1", "lodash": "^4.17.4", - "strapi-utils": "file:../strapi-utils" + "strapi-utils": "3.0.0-alpha.5.5" }, "scripts": { "prepublish": "npm prune" @@ -46,4 +46,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-generate/package.json b/packages/strapi-generate/package.json index 9fde8d1dff..09c7c7f960 100755 --- a/packages/strapi-generate/package.json +++ b/packages/strapi-generate/package.json @@ -17,7 +17,7 @@ "fs-extra": "^4.0.0", "lodash": "^4.17.4", "reportback": "^2.0.1", - "strapi-utils": "file:../strapi-utils" + "strapi-utils": "3.0.0-alpha.5.5" }, "author": { "name": "Strapi team", @@ -43,4 +43,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.base.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.base.babel.js index 0d65de2d0c..0bfdc7f966 100755 --- a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.base.babel.js +++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.base.babel.js @@ -2,6 +2,7 @@ * COMMON WEBPACK CONFIGURATION */ +const fs = require('fs'); const path = require('path'); const webpack = require('webpack'); @@ -9,18 +10,26 @@ const webpack = require('webpack'); const pkg = require(path.resolve(process.cwd(), 'package.json')); const pluginId = pkg.name.replace(/^strapi-/i, ''); +const plugins = process.env.IS_ADMIN === 'true' ? fs.readdirSync(path.resolve(process.env.PWD, '..', 'plugins')) + .filter(x => x[0] !== '.') : []; + +const pluginFolders = plugins.reduce((acc, current) => { + acc[current] = path.resolve(process.env.PWD, '..', 'plugins', current, 'node_modules', 'strapi-helper-plugin', 'lib', 'src'); + + return acc; +}, {}); + module.exports = (options) => ({ - entry: options.entry, + entry: Object.assign(options.entry, plugins.reduce((acc, current) => { + acc[current] = path.resolve(pluginFolders[current], 'app.js'); + + return acc; + }, {})), output: Object.assign({ // Compile into js/build.js path: path.resolve(process.cwd(), 'admin', 'build'), publicPath: '/', }, options.output), // Merge with env dependent settings module: { - // Comment - noParse: [ - /\/react\//g, - /\/react-dom\//g, - ], loaders: [{ test: /\.js$/, // Transform all .js files required somewhere with Babel, use: { @@ -46,11 +55,13 @@ module.exports = (options) => ({ }, }, }, - include: [ - path.join(process.cwd(), 'admin', 'src'), - // Add the `strapi-helper-plugin` folders watched by babel - path.join(process.cwd(), 'node_modules', 'strapi-helper-plugin', 'lib', 'src'), - ], + include: [path.join(process.cwd(), 'admin', 'src')] + .concat(plugins.reduce((acc, current) => { + acc.push(path.resolve(process.env.PWD, '..', 'plugins', current, 'admin', 'src'), pluginFolders[current]); + + return acc; + }, [])) + .concat([path.join(process.cwd(), 'node_modules', 'strapi-helper-plugin', 'lib', 'src')]) }, { // Transform our own .scss files test: /\.scss$/, @@ -145,9 +156,6 @@ module.exports = (options) => ({ ], alias: { moment: 'moment/moment.js', - 'react': 'react', - 'react-dom': 'react-dom', - 'react-transition-group': 'react-transition-group', }, symlinks: false, extensions: [ @@ -161,7 +169,7 @@ module.exports = (options) => ({ 'main', ], }, - externals: generateExternals(), + externals: {}, resolveLoader: { modules: [ path.join(__dirname, '..', '..', '..', 'node_modules'), @@ -169,13 +177,5 @@ module.exports = (options) => ({ ], }, devtool: options.devtool, - target: 'web', // Make web variables accessible to webpack, e.g. window + target: 'web', // Make web variables accessible to webpack, e.g. window, }); - -function generateExternals() { - return { - 'react': 'React', - 'react-dom': 'ReactDOM', - 'react-transition-group': 'ReactTransitionGroup', - }; -} diff --git a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dev.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dev.babel.js index 64972cc182..8e459d9536 100755 --- a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dev.babel.js +++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dev.babel.js @@ -11,24 +11,29 @@ const argv = require('minimist')(process.argv.slice(2)); const cssnext = require('postcss-cssnext'); const postcssFocus = require('postcss-focus'); const postcssReporter = require('postcss-reporter'); +const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; + const plugins = [ new webpack.HotModuleReplacementPlugin(), // Tell webpack we want hot reloading + // new BundleAnalyzerPlugin(), ]; -const isAdmin = process.env.IS_ADMIN === 'true'; - -// Build the `index.htm file` -if (isAdmin) { - plugins.push(new HtmlWebpackPlugin({ +// Build the `index.html file` +plugins.push( + new HtmlWebpackPlugin({ favicon: 'admin/src/favicon.ico', inject: true, // Inject all files that are generated by webpack, e.g. bundle.js templateContent: templateContent(), // eslint-disable-line no-use-before-define - })); -} + chunksSortMode: 'auto', + }), + new webpack.optimize.CommonsChunkPlugin({ + name: 'vendor', + minChunks: 2, // Ensure there is only the defined dependencies. + }) +); -const appPath = isAdmin - ? path.join(process.cwd(), 'admin', 'src', 'app.js') - : path.join(process.cwd(), 'node_modules', 'strapi-helper-plugin', 'lib', 'src', 'app.js'); + +const appPath = path.join(process.cwd(), 'admin', 'src', 'app.js') const logger = require('../../server/logger'); @@ -38,10 +43,12 @@ const port = argv.port || process.env.PORT || 3000; module.exports = require('./webpack.base.babel')({ // Add hot reloading in development - entry: [ - `webpack-hot-middleware/client?path=http://localhost:${port}/__webpack_hmr`, - appPath, - ], + entry: { + main: [ + `webpack-hot-middleware/client?path=http://localhost:${port}/__webpack_hmr`, + appPath, + ] + }, // Don't use hashes in dev mode for better performance output: { @@ -51,7 +58,7 @@ module.exports = require('./webpack.base.babel')({ }, // Add development plugins - plugins: dependencyHandlers().concat(plugins), // eslint-disable-line no-use-before-define, + plugins: plugins, // eslint-disable-line no-use-before-define, // Process the CSS with PostCSS postcssPlugins: [ @@ -102,7 +109,7 @@ function dependencyHandlers() { if (!dllPlugin) { return [ new webpack.optimize.CommonsChunkPlugin({ - name: 'vendor', + name: 'commons', children: true, minChunks: 2, async: true, diff --git a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js index 9d004fe839..f0ee58fa3c 100755 --- a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js +++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js @@ -18,7 +18,6 @@ const plugins = [ name: 'vendor', children: true, minChunks: 2, - async: true, }), // Minify and optimize the JavaScript @@ -45,6 +44,7 @@ if (isAdmin) { minifyCSS: true, minifyURLs: true, }, + chunksSortMode: 'auto', inject: true, })); plugins.push(new ExtractTextPlugin('[name].[contenthash].css')); diff --git a/packages/strapi-helper-plugin/lib/server/middlewares/frontendMiddleware.js b/packages/strapi-helper-plugin/lib/server/middlewares/frontendMiddleware.js index 875cdb0751..b49122c97a 100755 --- a/packages/strapi-helper-plugin/lib/server/middlewares/frontendMiddleware.js +++ b/packages/strapi-helper-plugin/lib/server/middlewares/frontendMiddleware.js @@ -15,7 +15,7 @@ const addDevMiddlewares = (app, webpackConfig) => { stats: 'errors-only', headers: { 'Access-Control-Allow-Origin': '*', - }, + } }); app.use(middleware); diff --git a/packages/strapi-helper-plugin/lib/src/app.js b/packages/strapi-helper-plugin/lib/src/app.js index b6bd2605ee..0c3a32336a 100755 --- a/packages/strapi-helper-plugin/lib/src/app.js +++ b/packages/strapi-helper-plugin/lib/src/app.js @@ -5,6 +5,7 @@ * only setup and plugin code. */ +import React from 'react'; import { Provider } from 'react-redux'; import App, { bootstrap } from 'containers/App'; // eslint-disable-line diff --git a/packages/strapi-helper-plugin/lib/src/components/Button/index.js b/packages/strapi-helper-plugin/lib/src/components/Button/index.js index 2795e155a2..37412cab84 100755 --- a/packages/strapi-helper-plugin/lib/src/components/Button/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/Button/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import styles from './styles.scss'; diff --git a/packages/strapi-helper-plugin/lib/src/components/Input/index.js b/packages/strapi-helper-plugin/lib/src/components/Input/index.js index 9612252e41..de63b5116a 100644 --- a/packages/strapi-helper-plugin/lib/src/components/Input/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/Input/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import moment from 'moment'; import PropTypes from 'prop-types'; import { get, isEmpty, map, mapKeys, isObject, reject, includes } from 'lodash'; diff --git a/packages/strapi-helper-plugin/lib/src/components/PluginHeader/index.js b/packages/strapi-helper-plugin/lib/src/components/PluginHeader/index.js index e47d72b02c..596076407d 100755 --- a/packages/strapi-helper-plugin/lib/src/components/PluginHeader/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/PluginHeader/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import PluginHeaderTitle from 'components/PluginHeaderTitle'; import PluginHeaderActions from 'components/PluginHeaderActions'; diff --git a/packages/strapi-helper-plugin/lib/src/components/PluginHeaderActions/index.js b/packages/strapi-helper-plugin/lib/src/components/PluginHeaderActions/index.js index 3c091661b9..b57dd2b2ec 100755 --- a/packages/strapi-helper-plugin/lib/src/components/PluginHeaderActions/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/PluginHeaderActions/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import Button from 'components/Button'; diff --git a/packages/strapi-helper-plugin/lib/src/components/PluginHeaderTitle/index.js b/packages/strapi-helper-plugin/lib/src/components/PluginHeaderTitle/index.js index cf4d2b71ae..d602960e29 100755 --- a/packages/strapi-helper-plugin/lib/src/components/PluginHeaderTitle/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/PluginHeaderTitle/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; diff --git a/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/index.js b/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/index.js index f7e746f99a..b2bea9cbd9 100644 --- a/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/index.js +++ b/packages/strapi-helper-plugin/lib/src/components/PopUpWarning/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; // modal diff --git a/packages/strapi-helper-plugin/lib/src/utils/injectReducer.js b/packages/strapi-helper-plugin/lib/src/utils/injectReducer.js index 27f2751b2e..1e46dbb3b8 100644 --- a/packages/strapi-helper-plugin/lib/src/utils/injectReducer.js +++ b/packages/strapi-helper-plugin/lib/src/utils/injectReducer.js @@ -1,4 +1,4 @@ - +import React from 'react'; import PropTypes from 'prop-types'; import hoistNonReactStatics from 'hoist-non-react-statics'; diff --git a/packages/strapi-helper-plugin/lib/src/utils/injectSaga.js b/packages/strapi-helper-plugin/lib/src/utils/injectSaga.js index 161993fe19..1679cf9a99 100644 --- a/packages/strapi-helper-plugin/lib/src/utils/injectSaga.js +++ b/packages/strapi-helper-plugin/lib/src/utils/injectSaga.js @@ -1,4 +1,4 @@ - +import React from 'react'; import PropTypes from 'prop-types'; import hoistNonReactStatics from 'hoist-non-react-statics'; diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json index ab81530f4f..b8c1a47640 100755 --- a/packages/strapi-helper-plugin/package.json +++ b/packages/strapi-helper-plugin/package.json @@ -88,16 +88,17 @@ "postcss-smart-import": "^0.7.5", "precss": "^2.0.0", "prettier": "^1.5.3", - "react": "^15.6.1", + "react": "^15.6.2", + "react-css-transition": "^0.7.4", "react-datetime": "^2.8.6", - "react-dom": "^15.6.1", + "react-dom": "^15.6.2", "react-helmet": "^5.1.3", "react-intl": "^2.3.0", "react-redux": "^5.0.6", "react-router-dom": "^4.1.2", "react-router-redux": "^5.0.0-alpha.6", "react-transition-group": "1.1.2", - "reactstrap": "^4.8.0", + "reactstrap": "^5.0.0-alpha.1", "redux": "^3.7.2", "redux-immutable": "^4.0.0", "redux-saga": "^0.15.6", @@ -113,5 +114,7 @@ "webpack-hot-middleware": "^2.18.2", "whatwg-fetch": "^2.0.3" }, - "devDependencies": {} -} + "devDependencies": { + "webpack-bundle-analyzer": "^2.9.0" + } +} \ No newline at end of file diff --git a/packages/strapi-mongoose/lib/index.js b/packages/strapi-mongoose/lib/index.js index 1508fef06b..07a9688cbc 100755 --- a/packages/strapi-mongoose/lib/index.js +++ b/packages/strapi-mongoose/lib/index.js @@ -248,8 +248,6 @@ module.exports = function (strapi) { case 'belongsTo': FK = _.find(definition.associations, {alias: name}); - console.log(name, FK); - if (FK && FK.nature !== 'oneToOne' && FK.nature !== 'oneToMany') { definition.loadedModel[name] = { type: 'virtual', diff --git a/packages/strapi-mongoose/package.json b/packages/strapi-mongoose/package.json index fdd576ea8c..ccc302c9b6 100755 --- a/packages/strapi-mongoose/package.json +++ b/packages/strapi-mongoose/package.json @@ -20,7 +20,7 @@ "mongoose-double": "0.0.1", "mongoose-float": "^1.0.2", "pluralize": "^6.0.0", - "strapi-utils": "file:../strapi-utils" + "strapi-utils": "3.0.0-alpha.5.5" }, "strapi": { "isHook": true @@ -49,4 +49,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Container/index.js b/packages/strapi-plugin-content-manager/admin/src/components/Container/index.js index 2f62b65b2e..5adee1e0c9 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/Container/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Container/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; class Container extends React.Component { diff --git a/packages/strapi-plugin-content-manager/admin/src/components/EditForm/index.js b/packages/strapi-plugin-content-manager/admin/src/components/EditForm/index.js index 116f841f7f..73cee12a7d 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/EditForm/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/EditForm/index.js @@ -5,6 +5,7 @@ */ // Dependencies. +import React from 'react'; import PropTypes from 'prop-types'; import { findIndex, get, omit, isFunction, merge } from 'lodash'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/EditFormRelations/index.js b/packages/strapi-plugin-content-manager/admin/src/components/EditFormRelations/index.js index 7458ae8911..fd46798e28 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/EditFormRelations/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/EditFormRelations/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { map } from 'lodash'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/LimitSelect/index.js b/packages/strapi-plugin-content-manager/admin/src/components/LimitSelect/index.js index b376bc15af..b86488ea22 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/LimitSelect/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/LimitSelect/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage } from 'react-intl'; import { map } from 'lodash'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Pagination/index.js b/packages/strapi-plugin-content-manager/admin/src/components/Pagination/index.js index ed8fa188bb..5941f8ad36 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/Pagination/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Pagination/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import { map } from 'lodash'; import PropTypes from 'prop-types'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js b/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js index 308b2a4bdd..f048333680 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/SelectMany/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import Select from 'react-select'; import PropTypes from 'prop-types'; import 'react-select/dist/react-select.css'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js b/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js index 0290151566..e15d419d43 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/SelectOne/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import Select from 'react-select'; import PropTypes from 'prop-types'; import 'react-select/dist/react-select.css'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/Table/index.js b/packages/strapi-plugin-content-manager/admin/src/components/Table/index.js index 70fc726d4e..ab1ec79293 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/Table/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/Table/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import TableHeader from '../TableHeader'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/TableEmpty/index.js b/packages/strapi-plugin-content-manager/admin/src/components/TableEmpty/index.js index 52c3f150bf..49ec28592e 100644 --- a/packages/strapi-plugin-content-manager/admin/src/components/TableEmpty/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/TableEmpty/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import styles from './styles.scss'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/TableFooter/index.js b/packages/strapi-plugin-content-manager/admin/src/components/TableFooter/index.js index 9208ef29f4..87b83929b3 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/TableFooter/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/TableFooter/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import LimitSelect from '../LimitSelect'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js b/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js index d19cd422fe..de919a26e3 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/TableHeader/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import styles from './styles.scss'; diff --git a/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js b/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js index 5400f0c965..2fb5d6541a 100755 --- a/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/components/TableRow/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import PropTypes from 'prop-types'; import { isEmpty } from 'lodash'; diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/App/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/App/index.js index 0b18908b3b..eda1f45056 100755 --- a/packages/strapi-plugin-content-manager/admin/src/containers/App/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/App/index.js @@ -5,11 +5,12 @@ * */ +import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators, compose } from 'redux'; import { createStructuredSelector } from 'reselect'; import PropTypes from 'prop-types'; -import _ from 'lodash'; +import { isEmpty, get } from 'lodash'; import { Switch, Route } from 'react-router-dom'; import injectSaga from 'utils/injectSaga'; @@ -46,7 +47,7 @@ class App extends React.Component { componentDidMount() { const config = tryRequire('../../../../config/admin.json'); - if (!_.isEmpty(_.get(config, 'admin.schema'))) { + if (!isEmpty(get(config, 'admin.schema'))) { this.props.updateSchema(config.admin.schema); } else { this.props.loadModels(); diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/App/sagas.js b/packages/strapi-plugin-content-manager/admin/src/containers/App/sagas.js index 61d7f676e7..c981588b3b 100755 --- a/packages/strapi-plugin-content-manager/admin/src/containers/App/sagas.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/App/sagas.js @@ -1,4 +1,4 @@ -import _ from 'lodash'; +import { map } from 'lodash'; import { fork, put, select, call, takeLatest } from 'redux-saga/effects'; import request from 'utils/request'; @@ -16,7 +16,7 @@ export const generateMenu = function () { .then(displayedModels => { return [{ name: 'Content Types', - links: _.map(displayedModels, (model, key) => ({ + links: map(displayedModels, (model, key) => ({ label: model.labelPlural || model.label || key, destination: key, })), diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/Edit/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/Edit/index.js index 4382c8ebcd..4f0bc245f3 100755 --- a/packages/strapi-plugin-content-manager/admin/src/containers/Edit/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/Edit/index.js @@ -5,6 +5,7 @@ */ // Dependencies. +import React from 'react'; import moment from 'moment'; import { connect } from 'react-redux'; import { bindActionCreators, compose } from 'redux'; diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/Home/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/Home/index.js index 57bbad234d..bd2e801d0c 100755 --- a/packages/strapi-plugin-content-manager/admin/src/containers/Home/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/Home/index.js @@ -2,6 +2,7 @@ * Home */ +import React from 'react'; import { connect } from 'react-redux'; import { createStructuredSelector } from 'reselect'; import { FormattedMessage } from 'react-intl'; @@ -11,7 +12,7 @@ import PluginHeader from 'components/PluginHeader'; import styles from './styles.scss'; export class Home extends React.Component { - render() { + render() { return (
    diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/List/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/List/index.js index 57a5ad93ca..ff62573c4b 100755 --- a/packages/strapi-plugin-content-manager/admin/src/containers/List/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/List/index.js @@ -4,6 +4,7 @@ * */ +import React from 'react'; import { connect } from 'react-redux'; import { bindActionCreators, compose } from 'redux'; import { createStructuredSelector } from 'reselect'; diff --git a/packages/strapi-plugin-content-manager/admin/src/containers/NotFoundPage/index.js b/packages/strapi-plugin-content-manager/admin/src/containers/NotFoundPage/index.js index 2710fc8416..4dd04fd1db 100755 --- a/packages/strapi-plugin-content-manager/admin/src/containers/NotFoundPage/index.js +++ b/packages/strapi-plugin-content-manager/admin/src/containers/NotFoundPage/index.js @@ -9,6 +9,7 @@ * the linting exception. */ +import React from 'react'; import { FormattedMessage } from 'react-intl'; export default class NotFound extends React.Component { diff --git a/packages/strapi-plugin-content-manager/package.json b/packages/strapi-plugin-content-manager/package.json index 7c3f629c8a..c567291cf1 100755 --- a/packages/strapi-plugin-content-manager/package.json +++ b/packages/strapi-plugin-content-manager/package.json @@ -62,7 +62,7 @@ "plop": "^1.8.1", "prettier": "^1.7.0", "rimraf": "^2.6.2", - "strapi-helper-plugin": "file:../strapi-helper-plugin", + "strapi-helper-plugin": "3.0.0-alpha.5.5", "webpack": "^3.6.0" } -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-content-type-builder/package.json b/packages/strapi-plugin-content-type-builder/package.json index 0be8547d08..62ac339a6d 100755 --- a/packages/strapi-plugin-content-type-builder/package.json +++ b/packages/strapi-plugin-content-type-builder/package.json @@ -51,7 +51,7 @@ "plop": "^1.8.1", "prettier": "^1.7.0", "rimraf": "^2.6.2", - "strapi-helper-plugin": "file:../strapi-helper-plugin", + "strapi-helper-plugin": "3.0.0-alpha.5.5", "webpack": "^3.6.0" }, "author": { @@ -71,4 +71,4 @@ "npm": ">= 3.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-plugin-settings-manager/admin/src/utils/request.js b/packages/strapi-plugin-settings-manager/admin/src/utils/request.js index 13d989d647..ff9f43cff8 100755 --- a/packages/strapi-plugin-settings-manager/admin/src/utils/request.js +++ b/packages/strapi-plugin-settings-manager/admin/src/utils/request.js @@ -1,5 +1,5 @@ import 'whatwg-fetch'; -import _ from 'lodash'; +import { startsWith } from 'lodash'; /** * Parses the JSON returned by a network request @@ -62,7 +62,7 @@ export default function request(url, options) { }; // Add parameters to url - let urlFormatted = _.startsWith(url, '/') + let urlFormatted = startsWith(url, '/') ? `${Strapi.apiUrl}${url}` : url; diff --git a/packages/strapi-plugin-settings-manager/package.json b/packages/strapi-plugin-settings-manager/package.json index 6f498b4792..fb29b41a3b 100755 --- a/packages/strapi-plugin-settings-manager/package.json +++ b/packages/strapi-plugin-settings-manager/package.json @@ -48,7 +48,7 @@ "plop": "^1.8.1", "prettier": "^1.7.0", "rimraf": "^2.6.2", - "strapi-helper-plugin": "file:../strapi-helper-plugin", + "strapi-helper-plugin": "3.0.0-alpha.5.5", "webpack": "^3.6.0" }, "author": { @@ -68,4 +68,4 @@ "npm": ">= 3.0.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi-utils/package.json b/packages/strapi-utils/package.json index 32ce37facc..207856befb 100755 --- a/packages/strapi-utils/package.json +++ b/packages/strapi-utils/package.json @@ -45,4 +45,4 @@ "npm": ">= 5.3.0" }, "license": "MIT" -} +} \ No newline at end of file diff --git a/packages/strapi/package.json b/packages/strapi/package.json index ac9da2f398..b4502febf4 100755 --- a/packages/strapi/package.json +++ b/packages/strapi/package.json @@ -52,13 +52,13 @@ "node-schedule": "^1.2.0", "semver": "^5.4.1", "stack-trace": "0.0.10", - "strapi-generate": "file:../strapi-generate", - "strapi-generate-admin": "file:../strapi-generate-admin", - "strapi-generate-api": "file:../strapi-generate-api", - "strapi-generate-new": "file:../strapi-generate-new", - "strapi-generate-policy": "file:../strapi-generate-policy", - "strapi-generate-service": "file:../strapi-generate-service", - "strapi-utils": "file:../strapi-utils" + "strapi-generate": "3.0.0-alpha.5.5", + "strapi-generate-admin": "3.0.0-alpha.5.5", + "strapi-generate-api": "3.0.0-alpha.5.5", + "strapi-generate-new": "3.0.0-alpha.5.5", + "strapi-generate-policy": "3.0.0-alpha.5.5", + "strapi-generate-service": "3.0.0-alpha.5.5", + "strapi-utils": "3.0.0-alpha.5.5" }, "author": { "email": "hi@strapi.io", @@ -85,4 +85,4 @@ }, "preferGlobal": true, "license": "MIT" -} +} \ No newline at end of file