diff --git a/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/index.js b/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/index.js
deleted file mode 100644
index 7d115b38d5..0000000000
--- a/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- *
- * PluginHeaderActions
- *
- */
-
-import React from 'react';
-
-import styles from './styles.scss';
-
-class PluginHeaderActions extends React.Component { // eslint-disable-line react/prefer-stateless-function
- render() {
- const actions = this.props.actions && this.props.actions.map((action, i) => (
-
- ));
-
- return (
-
- );
- }
-}
-
-PluginHeaderActions.propTypes = {
- actions: React.PropTypes.array,
-};
-
-export default PluginHeaderActions;
diff --git a/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/styles.scss b/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/styles.scss
deleted file mode 100644
index 24a6ef5ff6..0000000000
--- a/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/styles.scss
+++ /dev/null
@@ -1,3 +0,0 @@
-.btn {
- margin-left: 1rem;
-}
diff --git a/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/tests/index.test.js b/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/tests/index.test.js
deleted file mode 100644
index 1a79209b66..0000000000
--- a/packages/strapi-generate-admin/files/admin/public/app/components/PluginHeaderActions/tests/index.test.js
+++ /dev/null
@@ -1,11 +0,0 @@
-// import PluginHeaderActions from '../index';
-
-import expect from 'expect';
-// import { shallow } from 'enzyme';
-// import React from 'react';
-
-describe('', () => {
- it('Expect to have unit tests specified', () => {
- expect(true).toEqual(false);
- });
-});
diff --git a/packages/strapi-helper-plugin/.gitignore b/packages/strapi-helper-plugin/.gitignore
new file mode 100644
index 0000000000..5d06c054ed
--- /dev/null
+++ b/packages/strapi-helper-plugin/.gitignore
@@ -0,0 +1,10 @@
+# Don't check auto-generated stuff into git
+coverage
+build
+node_modules
+stats.json
+
+# Cruft
+.DS_Store
+npm-debug.log
+.idea
diff --git a/packages/strapi-helper-plugin/README.md b/packages/strapi-helper-plugin/README.md
new file mode 100644
index 0000000000..c183e79f61
--- /dev/null
+++ b/packages/strapi-helper-plugin/README.md
@@ -0,0 +1,5 @@
+# Strapi Helper Plugin
+
+## Description
+
+Helper to develop Strapi plugins.
diff --git a/packages/strapi-plugin-content-manager/public/app/app.js b/packages/strapi-helper-plugin/lib/app/app.js
similarity index 83%
rename from packages/strapi-plugin-content-manager/public/app/app.js
rename to packages/strapi-helper-plugin/lib/app/app.js
index f56d749665..8c2f06b62b 100644
--- a/packages/strapi-plugin-content-manager/public/app/app.js
+++ b/packages/strapi-helper-plugin/lib/app/app.js
@@ -8,15 +8,14 @@
import React from 'react';
import { Provider } from 'react-redux';
import { syncHistoryWithStore } from 'react-router-redux';
-
-import App from './containers/App';
-import createRoutes from './routes';
-import configureStore from './store';
-import { selectLocationState } from './containers/App/selectors';
-import { translationMessages } from './i18n';
+import App from 'containers/App';
+import createRoutes from 'routes';
+import configureStore from 'store';
+import { selectLocationState } from 'containers/App/selectors';
+// import { translationMessages } from 'i18n';
// Plugin identifier based on the package.json `name` value
-const pluginId = require('../package.json').name.replace(
+const pluginId = require('../../../../package.json').name.replace(
/^strapi-plugin-/i,
''
);
@@ -59,7 +58,7 @@ if (window.Strapi) {
leftMenuLinks: [],
mainComponent: Comp,
routes: createRoutes(store),
- translationMessages,
+ // translationMessages,
});
}
diff --git a/packages/strapi-helper-plugin/lib/app/i18n.js b/packages/strapi-helper-plugin/lib/app/i18n.js
new file mode 100644
index 0000000000..9d7302b682
--- /dev/null
+++ b/packages/strapi-helper-plugin/lib/app/i18n.js
@@ -0,0 +1,24 @@
+/**
+ * i18n.js
+ *
+ * This will setup the i18n language files and locale data for your plugin.
+ *
+ */
+
+import { defineMessages } from 'react-intl';
+
+import enTranslationMessages from './translations/en.json';
+import frTranslationMessages from './translations/fr.json';
+
+const translationMessages = {
+ en: enTranslationMessages,
+ fr: frTranslationMessages,
+};
+
+const define = messages => {
+ defineMessages(messages);
+};
+
+
+
+export { translationMessages, define };
diff --git a/packages/strapi-plugin-content-manager/public/app/reducers.js b/packages/strapi-helper-plugin/lib/app/reducers.js
similarity index 95%
rename from packages/strapi-plugin-content-manager/public/app/reducers.js
rename to packages/strapi-helper-plugin/lib/app/reducers.js
index 248c6e58b2..af408e4932 100644
--- a/packages/strapi-plugin-content-manager/public/app/reducers.js
+++ b/packages/strapi-helper-plugin/lib/app/reducers.js
@@ -7,7 +7,7 @@ import { combineReducers } from 'redux-immutable';
import { fromJS } from 'immutable';
import { LOCATION_CHANGE } from 'react-router-redux';
-import globalReducer from './containers/App/reducer';
+import globalReducer from 'containers/App/reducer';
/*
* routeReducer
diff --git a/packages/strapi-plugin-content-manager/public/app/store.js b/packages/strapi-helper-plugin/lib/app/store.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/app/store.js
rename to packages/strapi-helper-plugin/lib/app/store.js
diff --git a/packages/strapi-plugin-content-manager/public/app/utils/asyncInjectors.js b/packages/strapi-helper-plugin/lib/app/utils/asyncInjectors.js
similarity index 97%
rename from packages/strapi-plugin-content-manager/public/app/utils/asyncInjectors.js
rename to packages/strapi-helper-plugin/lib/app/utils/asyncInjectors.js
index 4356f00145..1ff068d16e 100644
--- a/packages/strapi-plugin-content-manager/public/app/utils/asyncInjectors.js
+++ b/packages/strapi-helper-plugin/lib/app/utils/asyncInjectors.js
@@ -1,8 +1,7 @@
import { conformsTo, isEmpty, isFunction, isObject, isString } from 'lodash';
import invariant from 'invariant';
import warning from 'warning';
-
-import createReducer from '../reducers';
+import createReducer from 'reducers';
/**
* Validate the shape of redux store
diff --git a/packages/strapi-plugin-content-manager/public/internals/config.js b/packages/strapi-helper-plugin/lib/internals/config.js
similarity index 82%
rename from packages/strapi-plugin-content-manager/public/internals/config.js
rename to packages/strapi-helper-plugin/lib/internals/config.js
index 8953626fa6..f8ba057f7d 100644
--- a/packages/strapi-plugin-content-manager/public/internals/config.js
+++ b/packages/strapi-helper-plugin/lib/internals/config.js
@@ -2,6 +2,7 @@ const resolve = require('path').resolve;
const pullAll = require('lodash/pullAll');
const uniq = require('lodash/uniq');
+const merge = require('lodash/uniq');
const ReactBoilerplate = {
// This refers to the react-boilerplate version this project is based on.
@@ -41,10 +42,10 @@ const ReactBoilerplate = {
path: resolve('../node_modules/react-boilerplate-dlls'),
},
- entry(pkg) {
- const dependencyNames = Object.keys(pkg.dependencies);
- const exclude = pkg.dllPlugin.exclude || ReactBoilerplate.dllPlugin.defaults.exclude;
- const include = pkg.dllPlugin.include || ReactBoilerplate.dllPlugin.defaults.include;
+ entry(helperPkg, pluginPkg) {
+ const dependencyNames = merge(Object.keys(helperPkg.dependencies), Object.keys(pluginPkg.dependencies));
+ const exclude = ReactBoilerplate.dllPlugin.defaults.exclude;
+ const include = ReactBoilerplate.dllPlugin.defaults.include;
const includeDependencies = uniq(dependencyNames.concat(include));
return {
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/component/es6.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/component/es6.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/component/es6.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/component/es6.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/component/index.js b/packages/strapi-helper-plugin/lib/internals/generators/component/index.js
similarity index 84%
rename from packages/strapi-plugin-content-manager/public/internals/generators/component/index.js
rename to packages/strapi-helper-plugin/lib/internals/generators/component/index.js
index 5e230c9761..13cfe40544 100644
--- a/packages/strapi-plugin-content-manager/public/internals/generators/component/index.js
+++ b/packages/strapi-helper-plugin/lib/internals/generators/component/index.js
@@ -39,12 +39,12 @@ module.exports = {
// Generate index.js and index.test.js
const actions = [{
type: 'add',
- path: '../../app/components/{{properCase name}}/index.js',
+ path: '../../../../../app/components/{{properCase name}}/index.js',
templateFile: data.type === 'ES6 Class' ? './component/es6.js.hbs' : './component/stateless.js.hbs',
abortOnFail: true,
}, {
type: 'add',
- path: '../../app/components/{{properCase name}}/tests/index.test.js',
+ path: '../../../../../app/components/{{properCase name}}/tests/index.test.js',
templateFile: './component/test.js.hbs',
abortOnFail: true,
}];
@@ -53,7 +53,7 @@ module.exports = {
if (data.wantCSS) {
actions.push({
type: 'add',
- path: '../../app/components/{{properCase name}}/styles.scss',
+ path: '../../../../../app/components/{{properCase name}}/styles.scss',
templateFile: './component/styles.scss.hbs',
abortOnFail: true,
});
@@ -63,7 +63,7 @@ module.exports = {
if (data.wantMessages) {
actions.push({
type: 'add',
- path: '../../app/components/{{properCase name}}/messages.js',
+ path: '../../../../../app/components/{{properCase name}}/messages.js',
templateFile: './component/messages.js.hbs',
abortOnFail: true,
});
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/component/messages.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/component/messages.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/component/messages.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/component/messages.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/component/stateless.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/component/stateless.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/component/stateless.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/component/stateless.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/component/styles.scss.hbs b/packages/strapi-helper-plugin/lib/internals/generators/component/styles.scss.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/component/styles.scss.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/component/styles.scss.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/component/test.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/component/test.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/component/test.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/component/test.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/actions.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/actions.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/actions.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/actions.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/actions.test.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/actions.test.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/actions.test.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/actions.test.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/constants.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/constants.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/constants.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/constants.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/index.js b/packages/strapi-helper-plugin/lib/internals/generators/container/index.js
similarity index 76%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/index.js
rename to packages/strapi-helper-plugin/lib/internals/generators/container/index.js
index 1f860eb589..4b2bb221cd 100644
--- a/packages/strapi-plugin-content-manager/public/internals/generators/container/index.js
+++ b/packages/strapi-helper-plugin/lib/internals/generators/container/index.js
@@ -48,12 +48,12 @@ module.exports = {
// Generate index.js and index.test.js
const actions = [{
type: 'add',
- path: '../../app/containers/{{properCase name}}/index.js',
+ path: '../../../../../app/containers/{{properCase name}}/index.js',
templateFile: './container/index.js.hbs',
abortOnFail: true,
}, {
type: 'add',
- path: '../../app/containers/{{properCase name}}/tests/index.test.js',
+ path: '../../../../../app/containers/{{properCase name}}/tests/index.test.js',
templateFile: './container/test.js.hbs',
abortOnFail: true,
}];
@@ -62,7 +62,7 @@ module.exports = {
if (data.wantCSS) {
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/styles.scss',
+ path: '../../../../../app/containers/{{properCase name}}/styles.scss',
templateFile: './container/styles.scss.hbs',
abortOnFail: true,
});
@@ -72,7 +72,7 @@ module.exports = {
if (data.wantMessages) {
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/messages.js',
+ path: '../../../../../app/containers/{{properCase name}}/messages.js',
templateFile: './container/messages.js.hbs',
abortOnFail: true,
});
@@ -84,13 +84,13 @@ module.exports = {
// Actions
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/actions.js',
+ path: '../../../../../app/containers/{{properCase name}}/actions.js',
templateFile: './container/actions.js.hbs',
abortOnFail: true,
});
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/tests/actions.test.js',
+ path: '../../../../../app/containers/{{properCase name}}/tests/actions.test.js',
templateFile: './container/actions.test.js.hbs',
abortOnFail: true,
});
@@ -98,7 +98,7 @@ module.exports = {
// Constants
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/constants.js',
+ path: '../../../../../app/containers/{{properCase name}}/constants.js',
templateFile: './container/constants.js.hbs',
abortOnFail: true,
});
@@ -106,13 +106,13 @@ module.exports = {
// Selectors
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/selectors.js',
+ path: '../../../../../app/containers/{{properCase name}}/selectors.js',
templateFile: './container/selectors.js.hbs',
abortOnFail: true,
});
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/tests/selectors.test.js',
+ path: '../../../../../app/containers/{{properCase name}}/tests/selectors.test.js',
templateFile: './container/selectors.test.js.hbs',
abortOnFail: true,
});
@@ -120,13 +120,13 @@ module.exports = {
// Reducer
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/reducer.js',
+ path: '../../../../../app/containers/{{properCase name}}/reducer.js',
templateFile: './container/reducer.js.hbs',
abortOnFail: true,
});
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/tests/reducer.test.js',
+ path: '../../../../../app/containers/{{properCase name}}/tests/reducer.test.js',
templateFile: './container/reducer.test.js.hbs',
abortOnFail: true,
});
@@ -136,13 +136,13 @@ module.exports = {
if (data.wantSagas) {
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/sagas.js',
+ path: '../../../../../app/containers/{{properCase name}}/sagas.js',
templateFile: './container/sagas.js.hbs',
abortOnFail: true,
});
actions.push({
type: 'add',
- path: '../../app/containers/{{properCase name}}/tests/sagas.test.js',
+ path: '../../../../../app/containers/{{properCase name}}/tests/sagas.test.js',
templateFile: './container/sagas.test.js.hbs',
abortOnFail: true,
});
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/index.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/index.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/index.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/index.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/messages.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/messages.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/messages.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/messages.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/reducer.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/reducer.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/reducer.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/reducer.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/reducer.test.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/reducer.test.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/reducer.test.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/reducer.test.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/sagas.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/sagas.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/sagas.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/sagas.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/sagas.test.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/sagas.test.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/sagas.test.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/sagas.test.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/selectors.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/selectors.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/selectors.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/selectors.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/selectors.test.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/selectors.test.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/selectors.test.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/selectors.test.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/styles.scss.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/styles.scss.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/styles.scss.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/styles.scss.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/container/test.js.hbs b/packages/strapi-helper-plugin/lib/internals/generators/container/test.js.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/container/test.js.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/container/test.js.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/index.js b/packages/strapi-helper-plugin/lib/internals/generators/index.js
similarity index 60%
rename from packages/strapi-plugin-content-manager/public/internals/generators/index.js
rename to packages/strapi-helper-plugin/lib/internals/generators/index.js
index cc0c0cb131..a1057b4836 100644
--- a/packages/strapi-plugin-content-manager/public/internals/generators/index.js
+++ b/packages/strapi-helper-plugin/lib/internals/generators/index.js
@@ -5,6 +5,7 @@
*/
const fs = require('fs');
+const path = require('path');
const componentGenerator = require('./component/index.js');
const containerGenerator = require('./container/index.js');
@@ -17,11 +18,14 @@ module.exports = (plop) => {
plop.setGenerator('route', routeGenerator);
plop.setGenerator('language', languageGenerator);
plop.addHelper('directory', (comp) => {
+ console.log('-----------------------------------------------')
+ console.log(path.resolve(process.cwd(), 'app', 'containers', comp))
+ console.log('-----------------------------------------------')
try {
- fs.accessSync(`app/containers/${comp}`, fs.F_OK);
- return `containers/${comp}`;
+ fs.accessSync(`${path.resolve(process.cwd(), 'app', 'containers', comp)}`, fs.F_OK);
+ return `${path.resolve(process.cwd(), 'app', 'containers', comp)}`;
} catch (e) {
- return `components/${comp}`;
+ return `${path.resolve(process.cwd(), 'app', 'components', comp)}`;
}
});
plop.addHelper('curly', (object, open) => (open ? '{' : '}'));
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/add-locale-data.hbs b/packages/strapi-helper-plugin/lib/internals/generators/language/add-locale-data.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/add-locale-data.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/language/add-locale-data.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/app-locale.hbs b/packages/strapi-helper-plugin/lib/internals/generators/language/app-locale.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/app-locale.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/language/app-locale.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/format-translation-messages.hbs b/packages/strapi-helper-plugin/lib/internals/generators/language/format-translation-messages.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/format-translation-messages.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/language/format-translation-messages.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/index.js b/packages/strapi-helper-plugin/lib/internals/generators/language/index.js
similarity index 87%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/index.js
rename to packages/strapi-helper-plugin/lib/internals/generators/language/index.js
index 1b33a6db27..526dcee802 100644
--- a/packages/strapi-plugin-content-manager/public/internals/generators/language/index.js
+++ b/packages/strapi-helper-plugin/lib/internals/generators/language/index.js
@@ -23,43 +23,43 @@ module.exports = {
const actions = [];
actions.push({
type: 'modify',
- path: '../../app/i18n.js',
+ path: '../../../../../app/i18n.js',
pattern: /('react-intl\/locale-data\/[a-z]+';\n)(?!.*'react-intl\/locale-data\/[a-z]+';)/g,
templateFile: './language/intl-locale-data.hbs',
});
actions.push({
type: 'modify',
- path: '../../app/i18n.js',
+ path: '../../../../../app/i18n.js',
pattern: /([\n\s'[a-z]+',)(?!.*[\n\s'[a-z]+',)/g,
templateFile: './language/app-locale.hbs',
});
actions.push({
type: 'modify',
- path: '../../app/i18n.js',
+ path: '../../../../../app/i18n.js',
pattern: /(from\s'.\/translations\/[a-z]+.json';\n)(?!.*from\s'.\/translations\/[a-z]+.json';)/g,
templateFile: './language/translation-messages.hbs',
});
actions.push({
type: 'modify',
- path: '../../app/i18n.js',
+ path: '../../../../../app/i18n.js',
pattern: /(addLocaleData\([a-z]+LocaleData\);\n)(?!.*addLocaleData\([a-z]+LocaleData\);)/g,
templateFile: './language/add-locale-data.hbs',
});
actions.push({
type: 'modify',
- path: '../../app/i18n.js',
+ path: '../../../../../app/i18n.js',
pattern: /([a-z]+:\sformatTranslationMessages\([a-z]+TranslationMessages\),\n)(?!.*[a-z]+:\sformatTranslationMessages\([a-z]+TranslationMessages\),)/g,
templateFile: './language/format-translation-messages.hbs',
});
actions.push({
type: 'add',
- path: '../../app/translations/{{language}}.json',
+ path: '../../../../../app/translations/{{language}}.json',
templateFile: './language/translations-json.hbs',
abortOnFail: true,
});
actions.push({
type: 'modify',
- path: '../../app/app.js',
+ path: '../../../../../app/app.js',
pattern: /(System\.import\('intl\/locale-data\/jsonp\/[a-z]+\.js'\),\n)(?!.*System\.import\('intl\/locale-data\/jsonp\/[a-z]+\.js'\),)/g,
templateFile: './language/polyfill-intl-locale.hbs',
});
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/intl-locale-data.hbs b/packages/strapi-helper-plugin/lib/internals/generators/language/intl-locale-data.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/intl-locale-data.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/language/intl-locale-data.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/polyfill-intl-locale.hbs b/packages/strapi-helper-plugin/lib/internals/generators/language/polyfill-intl-locale.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/polyfill-intl-locale.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/language/polyfill-intl-locale.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/translation-messages.hbs b/packages/strapi-helper-plugin/lib/internals/generators/language/translation-messages.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/translation-messages.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/language/translation-messages.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/language/translations-json.hbs b/packages/strapi-helper-plugin/lib/internals/generators/language/translations-json.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/language/translations-json.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/language/translations-json.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/route/index.js b/packages/strapi-helper-plugin/lib/internals/generators/route/index.js
similarity index 95%
rename from packages/strapi-plugin-content-manager/public/internals/generators/route/index.js
rename to packages/strapi-helper-plugin/lib/internals/generators/route/index.js
index f125218b6a..9a783a5032 100644
--- a/packages/strapi-plugin-content-manager/public/internals/generators/route/index.js
+++ b/packages/strapi-helper-plugin/lib/internals/generators/route/index.js
@@ -63,14 +63,14 @@ module.exports = {
data.useSagas = sagasExists(data.component); // eslint-disable-line no-param-reassign
actions.push({
type: 'modify',
- path: '../../app/routes.js',
+ path: '../../../../../app/routes.js',
pattern: /(\s{\n\s{0,}path: '\*',)/g,
template: trimTemplateFile('routeWithReducer.hbs'),
});
} else {
actions.push({
type: 'modify',
- path: '../../app/routes.js',
+ path: '../../../../../app/routes.js',
pattern: /(\s{\n\s{0,}path: '\*',)/g,
template: trimTemplateFile('route.hbs'),
});
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/route/route.hbs b/packages/strapi-helper-plugin/lib/internals/generators/route/route.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/route/route.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/route/route.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/route/routeWithReducer.hbs b/packages/strapi-helper-plugin/lib/internals/generators/route/routeWithReducer.hbs
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/generators/route/routeWithReducer.hbs
rename to packages/strapi-helper-plugin/lib/internals/generators/route/routeWithReducer.hbs
diff --git a/packages/strapi-plugin-content-manager/public/internals/generators/utils/componentExists.js b/packages/strapi-helper-plugin/lib/internals/generators/utils/componentExists.js
similarity index 60%
rename from packages/strapi-plugin-content-manager/public/internals/generators/utils/componentExists.js
rename to packages/strapi-helper-plugin/lib/internals/generators/utils/componentExists.js
index a5beb09811..b2d80e68e2 100644
--- a/packages/strapi-plugin-content-manager/public/internals/generators/utils/componentExists.js
+++ b/packages/strapi-helper-plugin/lib/internals/generators/utils/componentExists.js
@@ -5,8 +5,10 @@
*/
const fs = require('fs');
-const pageComponents = fs.readdirSync('app/components');
-const pageContainers = fs.readdirSync('app/containers');
+const path = require('path');
+
+const pageComponents = fs.readdirSync(path.resolve(process.cwd(), 'app', 'components'));
+const pageContainers = fs.readdirSync(path.resolve(process.cwd(), 'app', 'containers'));
const components = pageComponents.concat(pageContainers);
function componentExists(comp) {
diff --git a/packages/strapi-plugin-content-manager/public/postcss.config.js b/packages/strapi-helper-plugin/lib/internals/postcss/postcss.config.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/postcss.config.js
rename to packages/strapi-helper-plugin/lib/internals/postcss/postcss.config.js
diff --git a/packages/strapi-plugin-content-manager/public/internals/scripts/analyze.js b/packages/strapi-helper-plugin/lib/internals/scripts/analyze.js
similarity index 77%
rename from packages/strapi-plugin-content-manager/public/internals/scripts/analyze.js
rename to packages/strapi-helper-plugin/lib/internals/scripts/analyze.js
index 08d5ca90c0..d308ca006b 100644
--- a/packages/strapi-plugin-content-manager/public/internals/scripts/analyze.js
+++ b/packages/strapi-helper-plugin/lib/internals/scripts/analyze.js
@@ -1,6 +1,8 @@
#!/usr/bin/env node
var shelljs = require('shelljs');
+var path = require('path');
+
var animateProgress = require('./helpers/progress');
var chalk = require('chalk');
var addCheckMark = require('./helpers/checkmark');
@@ -9,7 +11,7 @@ var progress = animateProgress('Generating stats');
// Generate stats.json file with webpack
shelljs.exec(
- 'webpack --config internals/webpack/webpack.prod.babel.js --profile --json > stats.json',
+ `./node_modules/strapi-helper-plugin/node_modules/webpack/bin/webpack.js --config ${path.resolve(__dirname, '..', 'webpack', 'webpack.prod.babel.js')} --profile --json > stats.json`,
addCheckMark.bind(null, callback) // Output a checkmark on completion
);
diff --git a/packages/strapi-plugin-content-manager/public/internals/scripts/dependencies.js b/packages/strapi-helper-plugin/lib/internals/scripts/dependencies.js
similarity index 81%
rename from packages/strapi-plugin-content-manager/public/internals/scripts/dependencies.js
rename to packages/strapi-helper-plugin/lib/internals/scripts/dependencies.js
index 0cdb064890..61e7a2fd38 100644
--- a/packages/strapi-plugin-content-manager/public/internals/scripts/dependencies.js
+++ b/packages/strapi-helper-plugin/lib/internals/scripts/dependencies.js
@@ -46,4 +46,4 @@ if (!exists(dllManifestPath)) {
}
// the BUILDING_DLL env var is set to avoid confusing the development environment
-exec('cross-env BUILDING_DLL=true webpack --display-chunks --color --config internals/webpack/webpack.dll.babel.js')
+exec('./node_modules/strapi-helper-plugin/node_modules/cross-env/bin/cross-env.js BUILDING_DLL=true ./node_modules/strapi-helper-plugin/node_modules/webpack/bin/webpack.js --display-chunks --color --config ./node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js')
diff --git a/packages/strapi-plugin-content-manager/public/internals/scripts/helpers/checkmark.js b/packages/strapi-helper-plugin/lib/internals/scripts/helpers/checkmark.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/scripts/helpers/checkmark.js
rename to packages/strapi-helper-plugin/lib/internals/scripts/helpers/checkmark.js
diff --git a/packages/strapi-plugin-content-manager/public/internals/scripts/helpers/progress.js b/packages/strapi-helper-plugin/lib/internals/scripts/helpers/progress.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/scripts/helpers/progress.js
rename to packages/strapi-helper-plugin/lib/internals/scripts/helpers/progress.js
diff --git a/packages/strapi-plugin-content-manager/public/internals/scripts/npmcheckversion.js b/packages/strapi-helper-plugin/lib/internals/scripts/npmcheckversion.js
similarity index 71%
rename from packages/strapi-plugin-content-manager/public/internals/scripts/npmcheckversion.js
rename to packages/strapi-helper-plugin/lib/internals/scripts/npmcheckversion.js
index 24baa42613..6461a75d92 100644
--- a/packages/strapi-plugin-content-manager/public/internals/scripts/npmcheckversion.js
+++ b/packages/strapi-helper-plugin/lib/internals/scripts/npmcheckversion.js
@@ -3,7 +3,7 @@ var exec = require('child_process').exec;
exec('npm -v', function (err, stdout, stderr) {
if (err) throw err;
if (parseFloat(stdout) < 3) {
- throw new Error('[ERROR: React Boilerplate] You need npm version @>=3');
+ throw new Error('[ERROR: Strapi plugin] You need npm version @>=3');
process.exit(1);
}
});
diff --git a/packages/strapi-plugin-content-manager/public/internals/testing/karma.conf.js b/packages/strapi-helper-plugin/lib/internals/testing/karma.conf.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/testing/karma.conf.js
rename to packages/strapi-helper-plugin/lib/internals/testing/karma.conf.js
diff --git a/packages/strapi-plugin-content-manager/public/internals/testing/test-bundler.js b/packages/strapi-helper-plugin/lib/internals/testing/test-bundler.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/internals/testing/test-bundler.js
rename to packages/strapi-helper-plugin/lib/internals/testing/test-bundler.js
diff --git a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.base.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.base.babel.js
similarity index 59%
rename from packages/strapi-plugin-content-manager/public/internals/webpack/webpack.base.babel.js
rename to packages/strapi-helper-plugin/lib/internals/webpack/webpack.base.babel.js
index 0c1b0c5965..6a9bfeeff2 100644
--- a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.base.babel.js
+++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.base.babel.js
@@ -6,6 +6,7 @@ const path = require('path');
const webpack = require('webpack');
+console.log(require.resolve('babel-preset-latest'))
module.exports = (options) => ({
entry: options.entry,
output: Object.assign({ // Compile into js/build.js
@@ -15,14 +16,51 @@ module.exports = (options) => ({
module: {
loaders: [{
test: /\.js$/, // Transform all .js files required somewhere with Babel
- loader: 'babel',
- exclude: /node_modules/,
- query: options.babelQuery,
+ use: {
+ loader: 'babel',
+ options: {
+ "presets": [
+ [
+ require.resolve('babel-preset-latest'),
+ {
+ "es2015": {
+ "modules": false
+ }
+ }
+ ],
+ require.resolve('babel-preset-react'),
+ require.resolve('babel-preset-stage-0'),
+ ],
+ "env": {
+ "production": {
+ "only": [
+ "app"
+ ],
+ "plugins": [
+ "transform-react-remove-prop-types",
+ "transform-react-constant-elements",
+ "transform-react-inline-elements"
+ ]
+ },
+ "test": {
+ "plugins": [
+ "istanbul"
+ ]
+ }
+ }
+ },
+ },
+ include: [
+ path.join(process.cwd(), 'app'),
+ // Add the `strapi-helper-plugin` folders watched by babel
+ path.join(process.cwd(), 'node_modules', 'strapi-helper-plugin', 'lib', 'app'),
+ ],
}, {
// Transform our own .css files with PostCSS and CSS-modules
test: /\.scss$/,
exclude: /node_modules/,
- loader: options.cssLoaders,
+ // loader: 'null-loader'
+ use: options.cssLoaders,
}, {
// Do not transform vendor's CSS with CSS-modules
// The point is that they remain in global scope.
@@ -66,7 +104,13 @@ module.exports = (options) => ({
new webpack.NamedModulesPlugin(),
]),
resolve: {
- modules: ['node_modules'],
+ modules: [
+ 'app',
+ 'node_modules/strapi-helper-plugin/lib/app',
+ 'node_modules/strapi-helper-plugin/node_modules',
+ 'node_modules'
+ ],
+ symlinks: false,
extensions: [
'.js',
'.jsx',
@@ -78,6 +122,13 @@ module.exports = (options) => ({
'main',
],
},
+
+ resolveLoader: {
+ modules: [
+ path.join(__dirname, '..', '..', '..', 'node_modules'),
+ path.join(process.cwd(), 'node_modules'),
+ ]
+ },
devtool: options.devtool,
target: 'web', // Make web variables accessible to webpack, e.g. window
});
diff --git a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.dev.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dev.babel.js
similarity index 87%
rename from packages/strapi-plugin-content-manager/public/internals/webpack/webpack.dev.babel.js
rename to packages/strapi-helper-plugin/lib/internals/webpack/webpack.dev.babel.js
index 78b36cf611..d050e1968f 100644
--- a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.dev.babel.js
+++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dev.babel.js
@@ -2,8 +2,8 @@
* DEVELOPMENT WEBPACK CONFIGURATION
*/
-const path = require('path');
const fs = require('fs');
+const path = require('path');
const webpack = require('webpack');
const argv = require('minimist')(process.argv.slice(2));
@@ -16,6 +16,8 @@ const plugins = [
new webpack.NoErrorsPlugin(),
];
+console.log(path.resolve(__dirname, '..', 'postcss', 'postcss.config.js'))
+
const logger = require('../../server/logger');
const pkg = require(path.resolve(process.cwd(), 'package.json'));
@@ -28,7 +30,7 @@ module.exports = require('./webpack.base.babel')({
entry: [
'eventsource-polyfill', // Necessary for hot reloading with IE
`webpack-hot-middleware/client?path=http://localhost:${port}/__webpack_hmr`,
- path.join(process.cwd(), 'app/app.js'), // Start with js/app.js
+ path.join(process.cwd(), 'node_modules', 'strapi-helper-plugin', 'lib', 'app', 'app.js'), // Start with js/app.js
],
// Don't use hashes in dev mode for better performance
@@ -43,7 +45,24 @@ module.exports = require('./webpack.base.babel')({
// Load the SCSS in a style tag in development
// cssLoaders: 'style-loader!css-loader?modules&importLoaders=1&sourceMap!postcss-loader!sass-loader',
- cssLoaders: `style-loader!css-loader?localIdentName=${pluginId}[local]__[path][name]__[hash:base64:5]&modules&importLoaders=1&sourceMap!postcss-loader!sass-loader`,
+ cssLoaders: [{
+ loader: 'style-loader',
+ }, {
+ loader: 'css-loader',
+ options: {
+ localIdentName: `${pluginId}[local]__[path][name]__[hash:base64:5]`,
+ modules: true,
+ importLoaders: 1,
+ sourceMap: true,
+ }
+ }, {
+ loader: 'postcss-loader',
+ options: {
+ config: path.resolve(__dirname, '..', 'postcss', 'postcss.config.js')
+ }
+ }, {
+ loader: 'sass-loader',
+ }],
// Process the CSS with PostCSS
postcssPlugins: [
diff --git a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.dll.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js
similarity index 61%
rename from packages/strapi-plugin-content-manager/public/internals/webpack/webpack.dll.babel.js
rename to packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js
index f6e57b9282..6650baf68f 100644
--- a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.dll.babel.js
+++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.dll.babel.js
@@ -14,15 +14,17 @@ const defaults = require('lodash/defaultsDeep');
const webpack = require('webpack');
const dllPlugin = require('../config').dllPlugin;
+const helperPkg = require(join(__dirname, '..', '..', '..', 'package.json'));
-const pkg = require(join(process.cwd(), 'package.json'));
-if (!pkg.dllPlugin) { process.exit(0); }
-const dllConfig = defaults(pkg.dllPlugin, dllPlugin.defaults);
+const pluginPkg = require(join(process.cwd(), 'package.json'));
+if (!pluginPkg.dllPlugin) { process.exit(0); }
+const dllConfig = defaults(pluginPkg.dllPlugin, dllPlugin.defaults);
const outputPath = join(process.cwd(), dllConfig.path);
module.exports = {
context: process.cwd(),
- entry: dllConfig.dlls ? dllConfig.dlls : dllPlugin.entry(pkg),
+ // entry: dllConfig.dlls ? dllConfig.dlls : dllPlugin.entry(pluginPkg),
+ entry: dllPlugin.entry(helperPkg, pluginPkg),
devtool: 'eval',
output: {
filename: '[name].dll.js',
@@ -32,4 +34,10 @@ module.exports = {
plugins: [
new webpack.DllPlugin({ name: '[name]', path: join(outputPath, '[name].json') }), // eslint-disable-line no-new
],
+ resolve: {
+ modules: [
+ 'node_modules',
+ 'node_modules/strapi-helper-plugin/node_modules'
+ ],
+ },
};
diff --git a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.prod.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js
similarity index 94%
rename from packages/strapi-plugin-content-manager/public/internals/webpack/webpack.prod.babel.js
rename to packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js
index 641611f313..871c7b1ce4 100644
--- a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.prod.babel.js
+++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js
@@ -25,7 +25,7 @@ module.exports = require('./webpack.base.babel')({
// We use ExtractTextPlugin so we get a seperate SCSS file instead
// of the CSS being in the JS and injected as a style tag
- cssLoaders: `style-loader!css-loader?localIdentName=${pluginId}[local]__[path][name]__[hash:base64:5]&modules&importLoaders=1&sourceMap!postcss-loader!sass-loader`,
+ cssLoaders: `style-loader!css-loader?localIdentName=${pluginId}[local]__[path][name]__[hash:base64:5]&modules&importLoaders=1&sourceMap!postcss-loader?config=${path.resolve(__dirname, '..', 'postcss', 'postcss.config.js')}!sass-loader`,
// In production, we minify our CSS with cssnano
postcssPlugins: [
diff --git a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.test.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.test.babel.js
similarity index 97%
rename from packages/strapi-plugin-content-manager/public/internals/webpack/webpack.test.babel.js
rename to packages/strapi-helper-plugin/lib/internals/webpack/webpack.test.babel.js
index bf9f6c710a..22384095fc 100644
--- a/packages/strapi-plugin-content-manager/public/internals/webpack/webpack.test.babel.js
+++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.test.babel.js
@@ -7,7 +7,9 @@ const path = require('path');
const webpack = require('webpack');
const modules = [
+ 'app',
'node_modules',
+ 'node_modules/strapi-helper-plugin/lib/app'
];
module.exports = {
diff --git a/packages/strapi-plugin-content-manager/public/server/index.js b/packages/strapi-helper-plugin/lib/server/index.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/server/index.js
rename to packages/strapi-helper-plugin/lib/server/index.js
diff --git a/packages/strapi-plugin-content-manager/public/server/logger.js b/packages/strapi-helper-plugin/lib/server/logger.js
similarity index 100%
rename from packages/strapi-plugin-content-manager/public/server/logger.js
rename to packages/strapi-helper-plugin/lib/server/logger.js
diff --git a/packages/strapi-plugin-content-manager/public/server/middlewares/frontendMiddleware.js b/packages/strapi-helper-plugin/lib/server/middlewares/frontendMiddleware.js
similarity index 90%
rename from packages/strapi-plugin-content-manager/public/server/middlewares/frontendMiddleware.js
rename to packages/strapi-helper-plugin/lib/server/middlewares/frontendMiddleware.js
index d31e8dfd7a..a11c104388 100644
--- a/packages/strapi-plugin-content-manager/public/server/middlewares/frontendMiddleware.js
+++ b/packages/strapi-helper-plugin/lib/server/middlewares/frontendMiddleware.js
@@ -45,6 +45,8 @@ const addDevMiddlewares = (app, webpackConfig) => {
*/
module.exports = (app) => {
const webpackConfig = require('../../internals/webpack/webpack.dev.babel');
+
+ // const webpackConfig = require(path.resolve(process.cwd(), 'node_modules', 'strapi-helper-plugin', 'internals', 'webpack', 'webpack.dev.babel'));
addDevMiddlewares(app, webpackConfig);
return app;
diff --git a/packages/strapi-helper-plugin/package.json b/packages/strapi-helper-plugin/package.json
new file mode 100644
index 0000000000..c3313ae363
--- /dev/null
+++ b/packages/strapi-helper-plugin/package.json
@@ -0,0 +1,128 @@
+{
+ "name": "strapi-helper-plugin",
+ "version": "3.0.0-alpha.3",
+ "description": "Helper for Strapi plugins development",
+ "engines": {
+ "node": ">= 7.0.0",
+ "npm": ">= 3.0.0"
+ },
+ "author": {
+ "email": "hi@strapi.io",
+ "name": "Strapi team",
+ "url": "http://strapi.io"
+ },
+ "maintainers": [
+ {
+ "name": "Strapi team",
+ "email": "hi@strapi.io",
+ "url": "http://strapi.io"
+ }
+ ],
+ "license": "MIT",
+ "pre-commit": [
+ "lint:admin"
+ ],
+ "dependencies": {
+ "babel-polyfill": "6.13.0",
+ "chalk": "1.1.3",
+ "compression": "1.6.2",
+ "cross-env": "3.1.3",
+ "express": "4.14.0",
+ "fontfaceobserver": "2.0.1",
+ "history": "3.0.0",
+ "immutable": "3.8.1",
+ "intl": "1.2.4",
+ "invariant": "2.2.1",
+ "lodash": "4.15.0",
+ "react": "15.3.0",
+ "react-dom": "15.3.0",
+ "react-helmet": "3.1.0",
+ "react-intl": "2.1.3",
+ "react-redux": "4.4.5",
+ "react-router": "2.6.1",
+ "react-router-redux": "4.0.5",
+ "react-router-scroll": "0.2.1",
+ "redux": "3.5.2",
+ "redux-immutable": "3.0.7",
+ "redux-saga": "0.11.0",
+ "reselect": "2.5.3",
+ "warning": "3.0.0",
+ "whatwg-fetch": "1.0.0"
+ },
+ "devDependencies": {
+ "babel-cli": "^6.18.0",
+ "babel-core": "6.18.0",
+ "babel-eslint": "7.1.0",
+ "babel-loader": "6.2.7",
+ "babel-plugin-istanbul": "2.0.3",
+ "babel-plugin-react-intl": "2.2.0",
+ "babel-plugin-react-transform": "2.0.2",
+ "babel-plugin-transform-async-to-generator": "^6.22.0",
+ "babel-plugin-transform-object-rest-spread": "^6.22.0",
+ "babel-plugin-transform-react-constant-elements": "6.9.1",
+ "babel-plugin-transform-react-inline-elements": "6.8.0",
+ "babel-plugin-transform-react-remove-prop-types": "0.2.10",
+ "babel-plugin-transform-runtime": "^6.15.0",
+ "babel-preset-es2017": "^6.22.0",
+ "babel-preset-latest": "6.16.0",
+ "babel-preset-react": "6.16.0",
+ "babel-preset-react-hmre": "1.1.1",
+ "babel-preset-stage-0": "6.16.0",
+ "chai": "3.5.0",
+ "chai-enzyme": "0.5.2",
+ "cheerio": "0.22.0",
+ "coveralls": "2.11.14",
+ "css-loader": "0.25.0",
+ "enzyme": "2.5.1",
+ "eslint": "3.9.0",
+ "eslint-config-airbnb": "12.0.0",
+ "eslint-config-airbnb-base": "9.0.0",
+ "eslint-config-prettier": "^2.0.0",
+ "eslint-import-resolver-webpack": "0.6.0",
+ "eslint-plugin-import": "2.0.1",
+ "eslint-plugin-jsx-a11y": "2.2.3",
+ "eslint-plugin-react": "6.4.1",
+ "eslint-plugin-redux-saga": "0.1.5",
+ "eventsource-polyfill": "0.9.6",
+ "expect": "1.20.2",
+ "expect-jsx": "2.6.0",
+ "exports-loader": "0.6.3",
+ "file-loader": "0.9.0",
+ "image-webpack-loader": "2.0.0",
+ "imports-loader": "0.6.5",
+ "json-loader": "0.5.4",
+ "karma": "1.3.0",
+ "karma-chrome-launcher": "2.0.0",
+ "karma-coverage": "1.1.1",
+ "karma-firefox-launcher": "1.0.0",
+ "karma-ie-launcher": "1.0.0",
+ "karma-mocha": "1.2.0",
+ "karma-mocha-reporter": "2.2.0",
+ "karma-safari-launcher": "1.0.0",
+ "karma-sourcemap-loader": "0.3.7",
+ "karma-webpack": "1.8.0",
+ "lint-staged": "3.2.0",
+ "mocha": "3.1.2",
+ "node-sass": "^3.13.0",
+ "null-loader": "0.1.1",
+ "plop": "1.5.0",
+ "postcss-cssnext": "^2.8.0",
+ "postcss-focus": "^1.0.0",
+ "postcss-loader": "^1.1.1",
+ "postcss-reporter": "^2.0.0",
+ "postcss-smart-import": "^0.6.7",
+ "pre-commit": "1.1.3",
+ "precss": "^1.4.0",
+ "prettier": "^1.3.1",
+ "psi": "2.0.4",
+ "rimraf": "2.5.4",
+ "sass-loader": "^4.0.2",
+ "shelljs": "0.7.5",
+ "sinon": "2.0.0-pre",
+ "style-loader": "0.13.1",
+ "url-loader": "0.5.7",
+ "webpack": "2.1.0-beta.25",
+ "webpack-dev-middleware": "1.8.4",
+ "webpack-hot-middleware": "2.13.1"
+ }
+}
diff --git a/packages/strapi-plugin-content-manager/public/app/containers/Edit/index.js b/packages/strapi-plugin-content-manager/public/app/containers/Edit/index.js
index 884157ec85..b43176a646 100644
--- a/packages/strapi-plugin-content-manager/public/app/containers/Edit/index.js
+++ b/packages/strapi-plugin-content-manager/public/app/containers/Edit/index.js
@@ -9,9 +9,9 @@ import _ from 'lodash';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
-import Container from '../../components/Container';
-import EditForm from '../../components/EditForm';
-import { makeSelectModels } from '../App/selectors';
+import Container from 'components/Container';
+import EditForm from 'components/EditForm';
+import { makeSelectModels } from 'containers/App/selectors';
import {
setCurrentModelName,
diff --git a/packages/strapi-plugin-content-manager/public/app/containers/Edit/sagas.js b/packages/strapi-plugin-content-manager/public/app/containers/Edit/sagas.js
index 9a6dbf55bb..0656bf6389 100644
--- a/packages/strapi-plugin-content-manager/public/app/containers/Edit/sagas.js
+++ b/packages/strapi-plugin-content-manager/public/app/containers/Edit/sagas.js
@@ -2,8 +2,8 @@ import { takeLatest } from 'redux-saga';
import { call, cancel, fork, put, take, select } from 'redux-saga/effects';
import { LOCATION_CHANGE } from 'react-router-redux';
-import request from '../../utils/request';
-import { router } from '../../app';
+import request from 'utils/request';
+import { router } from 'app';
import {
recordLoaded,
diff --git a/packages/strapi-plugin-content-manager/public/app/containers/Home/index.js b/packages/strapi-plugin-content-manager/public/app/containers/Home/index.js
index 88d1e2b141..fcda1448e5 100644
--- a/packages/strapi-plugin-content-manager/public/app/containers/Home/index.js
+++ b/packages/strapi-plugin-content-manager/public/app/containers/Home/index.js
@@ -7,7 +7,7 @@ import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { injectIntl } from 'react-intl';
-import Container from '../../components/Container';
+import Container from 'components/Container';
import styles from './styles.scss';
diff --git a/packages/strapi-plugin-content-manager/public/app/containers/List/index.js b/packages/strapi-plugin-content-manager/public/app/containers/List/index.js
index e01d60efa7..03dd912223 100644
--- a/packages/strapi-plugin-content-manager/public/app/containers/List/index.js
+++ b/packages/strapi-plugin-content-manager/public/app/containers/List/index.js
@@ -10,10 +10,10 @@ import { createStructuredSelector } from 'reselect';
import { injectIntl } from 'react-intl';
import _ from 'lodash';
-import { makeSelectModels } from '../App/selectors';
-import Container from '../../components/Container';
-import Table from '../../components/Table';
-import TableFooter from '../../components/TableFooter';
+import { makeSelectModels } from 'containers/App/selectors';
+import Container from 'components/Container';
+import Table from 'components/Table';
+import TableFooter from 'components/TableFooter';
import styles from './styles.scss';
import {
diff --git a/packages/strapi-plugin-content-manager/public/app/containers/List/sagas.js b/packages/strapi-plugin-content-manager/public/app/containers/List/sagas.js
index 91ff5abc33..3c830f14e4 100644
--- a/packages/strapi-plugin-content-manager/public/app/containers/List/sagas.js
+++ b/packages/strapi-plugin-content-manager/public/app/containers/List/sagas.js
@@ -2,7 +2,7 @@ import { takeLatest } from 'redux-saga';
import { put, select, fork, call, take, cancel } from 'redux-saga/effects';
import { LOCATION_CHANGE } from 'react-router-redux';
-import request from '../../utils/request';
+import request from 'utils/request';
import { loadedRecord, loadedCount } from './actions';
import { LOAD_RECORDS, LOAD_COUNT } from './constants';
diff --git a/packages/strapi-plugin-content-manager/public/app/i18n.js b/packages/strapi-plugin-content-manager/public/app/i18n.js
deleted file mode 100644
index 01573a5f67..0000000000
--- a/packages/strapi-plugin-content-manager/public/app/i18n.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * i18n.js
- *
- * This will setup the i18n language files and locale data for your plugin.
- *
- */
-
-import { defineMessages } from 'react-intl';
-
-import enTranslationMessages from './translations/en.json';
-import frTranslationMessages from './translations/fr.json';
-
-const translationMessages = {
- en: enTranslationMessages,
- fr: frTranslationMessages,
-};
-
-const define = messages => {
- defineMessages(messages);
-};
-
-// Hot reloadable translation json files
-if (module.hot) {
- // modules.hot.accept does not accept dynamic dependencies,
- // have to be constants at compile-time
- module.hot.accept('./i18n', () => {
- if (window.Strapi) {
- System.import('./i18n').then(result => {
- const translationMessagesUpdated = result.translationMessages;
- window.Strapi
- .refresh(pluginId)
- .translationMessages(translationMessagesUpdated);
- });
- }
- });
-}
-
-export { translationMessages, define };
diff --git a/packages/strapi-plugin-content-manager/public/app/routes.js b/packages/strapi-plugin-content-manager/public/app/routes.js
index 4ca5936330..721055cf17 100644
--- a/packages/strapi-plugin-content-manager/public/app/routes.js
+++ b/packages/strapi-plugin-content-manager/public/app/routes.js
@@ -2,8 +2,8 @@
// They are all wrapped in the App component, which should contain the navbar etc
// See http://blog.mxstbr.com/2016/01/react-apps-with-pages for more information
// about the code splitting business
-import { getAsyncInjectors } from './utils/asyncInjectors';
-import appSagas from './containers/App/sagas';
+import { getAsyncInjectors } from 'utils/asyncInjectors';
+import appSagas from 'containers/App/sagas';
const loadModule = cb => componentModule => {
cb(null, componentModule.default);
diff --git a/packages/strapi-plugin-content-manager/public/internals/scripts/extract-intl.js b/packages/strapi-plugin-content-manager/public/internals/scripts/extract-intl.js
deleted file mode 100644
index 4468313eb6..0000000000
--- a/packages/strapi-plugin-content-manager/public/internals/scripts/extract-intl.js
+++ /dev/null
@@ -1,153 +0,0 @@
-/* eslint-disable */
-/**
- * This script will extract the internationalization messages from all components
- and package them in the transalation json files in the translations file.
- */
-const fs = require('fs');
-const nodeGlob = require('glob');
-const transform = require('babel-core').transform;
-
-const animateProgress = require('./helpers/progress');
-const addCheckmark = require('./helpers/checkmark');
-
-const pkg = require('../../package.json');
-const i18n = require('../../app/i18n');
-
-require('shelljs/global');
-
-// Glob to match all js files except test files
-const FILES_TO_PARSE = 'app/**/!(*.test).js';
-const locales = i18n.appLocales;
-
-const newLine = () => process.stdout.write('\n');
-
-// Progress Logger
-let progress;
-const task = (message) => {
- progress = animateProgress(message);
- process.stdout.write(message);
-
- return (error) => {
- if (error) {
- process.stderr.write(error);
- }
- clearTimeout(progress);
- return addCheckmark(() => newLine());
- }
-}
-
-// Wrap async functions below into a promise
-const glob = (pattern) => new Promise((resolve, reject) => {
- nodeGlob(pattern, (error, value) => (error ? reject(error) : resolve(value)));
-});
-
-const readFile = (fileName) => new Promise((resolve, reject) => {
- fs.readFile(fileName, (error, value) => (error ? reject(error) : resolve(value)));
-});
-
-const writeFile = (fileName, data) => new Promise((resolve, reject) => {
- fs.writeFile(fileName, data, (error, value) => (error ? reject(error) : resolve(value)));
-});
-
-// Store existing translations into memory
-const oldLocaleMappings = [];
-const localeMappings = [];
-// Loop to run once per locale
-for (const locale of locales) {
- oldLocaleMappings[locale] = {};
- localeMappings[locale] = {};
- // File to store translation messages into
- const translationFileName = `app/translations/${locale}.json`;
- try {
- // Parse the old translation message JSON files
- const messages = JSON.parse(fs.readFileSync(translationFileName));
- for (const message of messages) {
- oldLocaleMappings[locale][message.id] = message;
- }
- } catch (error) {
- if (error.code !== 'ENOENT') {
- process.stderr.write(
- `There was an error loading this translation file: ${translationFileName}
- \n${error}`
- );
- }
- }
-}
-
-const extractFromFile = async (fileName) => {
- try {
- const code = await readFile(fileName);
- // Use babel plugin to extract instances where react-intl is used
- const { metadata: result } = await transform(code, {
- presets: pkg.babel.presets,
- plugins: [
- ['react-intl'],
- ],
- });
- for (const message of result['react-intl'].messages) {
- for (const locale of locales) {
- const oldLocaleMapping = oldLocaleMappings[locale][message.id];
- // Merge old translations into the babel extracted instances where react-intl is used
- localeMappings[locale][message.id] = {
- id: message.id,
- description: message.description,
- defaultMessage: message.defaultMessage,
- message: (oldLocaleMapping && oldLocaleMapping.message)
- ? oldLocaleMapping.message
- : '',
- };
- }
- }
- } catch (error) {
- process.stderr.write(`Error transforming file: ${fileName}\n${error}`);
- }
-};
-
-(async function main() {
- const memoryTaskDone = task('Storing language files in memory');
- const files = await glob(FILES_TO_PARSE);
- memoryTaskDone()
-
- const extractTaskDone = task('Run extraction on all files');
- // Run extraction on all files that match the glob on line 16
- await Promise.all(files.map((fileName) => extractFromFile(fileName)));
- extractTaskDone()
-
- // Make the directory if it doesn't exist, especially for first run
- mkdir('-p', 'app/translations');
- for (const locale of locales) {
- const translationFileName = `app/translations/${locale}.json`;
-
- try {
- const localeTaskDone = task(
- `Writing translation messages for ${locale} to: ${translationFileName}`
- );
-
- // Sort the translation JSON file so that git diffing is easier
- // Otherwise the translation messages will jump around every time we extract
- let messages = Object.values(localeMappings[locale]).sort((a, b) => {
- a = a.id.toUpperCase();
- b = b.id.toUpperCase();
- return do {
- if (a < b) -1;
- else if (a > b) 1;
- else 0;
- };
- });
-
- // Write to file the JSON representation of the translation messages
- const prettified = `${JSON.stringify(messages, null, 2)}\n`;
-
- await writeFile(translationFileName, prettified);
-
- localeTaskDone();
- } catch (error) {
- localeTaskDone(
- `There was an error saving this translation file: ${translationFileName}
- \n${error}`
- );
- }
- }
-
- process.exit()
-}());
diff --git a/packages/strapi-plugin-content-manager/public/package.json b/packages/strapi-plugin-content-manager/public/package.json
index ed8efe92cf..0e886e8b05 100644
--- a/packages/strapi-plugin-content-manager/public/package.json
+++ b/packages/strapi-plugin-content-manager/public/package.json
@@ -11,36 +11,26 @@
"author": "Strapi",
"license": "MIT",
"scripts": {
- "analyze:clean": "rimraf stats.json",
+ "analyze:clean": "./node_modules/strapi-helper-plugin/node_modules/rimraf/bin.js stats.json",
"preanalyze": "npm run analyze:clean",
- "analyze": "node ./internals/scripts/analyze.js",
- "extract-intl": "babel-node --presets latest,stage-0 -- ./internals/scripts/extract-intl.js",
- "npmcheckversion": "node ./internals/scripts/npmcheckversion.js",
+ "analyze": "node ./node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js",
+ "npmcheckversion": "node ./node_modules/strapi-helper-plugin/lib/internals/scripts/npmcheckversion.js",
"preinstall": "npm run npmcheckversion",
"postinstall": "npm run build:dll",
"prebuild": "npm run build:clean && npm run test",
- "build": "cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p --progress",
- "build:clean": "npm run test:clean && rimraf ./build",
- "build:dll": "node ./internals/scripts/dependencies.js",
- "start": "cross-env NODE_ENV=development node server",
- "start:tunnel": "cross-env NODE_ENV=development ENABLE_TUNNEL=true node server",
- "start:production": "npm run build && npm run start:prod",
- "start:prod": "cross-env NODE_ENV=production node server",
- "pagespeed": "node ./internals/scripts/pagespeed.js",
- "presetup": "npm i chalk shelljs",
- "setup": "node ./internals/scripts/setup.js",
- "postsetup": "npm run build:dll",
- "clean": "shjs ./internals/scripts/clean.js",
- "clean:all": "npm run analyze:clean && npm run test:clean && npm run build:clean",
- "generate": "plop --plopfile internals/generators/index.js",
+ "build": "./node_modules/cross-env/bin/cross-env.js NODE_ENV=production ./node_modules/strapi-helper-plugin/webpack/bin/webpack.js --config ./node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
+ "build:clean": "npm run test:clean && ./node_modules/strapi-helper-plugin/node_modules/rimraf/bin.js ./build",
+ "build:dll": "node ./node_modules/strapi-helper-plugin/lib/internals/scripts/dependencies.js",
+ "start": "./node_modules/strapi-helper-plugin/node_modules/cross-env/bin/cross-env.js NODE_ENV=development node ./node_modules/strapi-helper-plugin/lib/server",
+ "generate": "./node_modules/strapi-helper-plugin/node_modules/plop/plop.js --plopfile ./node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
"lint": "npm run lint:js",
- "lint:eslint": "eslint --ignore-path .gitignore --ignore-pattern internals/scripts",
+ "lint:eslint": "./node_modules/strapi-helper-plugin/node_modules/eslint/bin/eslint.js --ignore-path .gitignore",
"lint:js": "npm run lint:eslint -- . ",
"lint:staged": "lint-staged",
"pretest": "npm run test:clean && npm run lint",
- "prettier": "prettier --single-quote --trailing-comma es5 --write \"{app,__{tests,mocks}__}/**/*.js\"",
- "test:clean": "rimraf ./coverage",
- "test": "cross-env NODE_ENV=test karma start internals/testing/karma.conf.js --single-run",
+ "prettier": "./node_modules/strapi-helper-plugin/node_modules/prettier/bin/prettier.js --single-quote --trailing-comma es5 --write \"{app,__{tests,mocks}__}/**/*.js\"",
+ "test:clean": "./node_modules/strapi-helper-plugin/node_modules/rimraf/bin.js ./coverage",
+ "test": "./node_modules/cross-env/bin/cross-env.js NODE_ENV=test ./node_modules/strapi-helper-plugin/node_modules/karma/bin/karma start ./node_modules/strapi-helper-plugin/lib/internals/testing/karma.conf.js --single-run",
"test:watch": "npm run test -- --auto-watch --no-single-run",
"test:firefox": "npm run test -- --browsers Firefox",
"test:safari": "npm run test -- --browsers Safari",
@@ -54,37 +44,6 @@
]
},
"pre-commit": "lint:staged",
- "babel": {
- "presets": [
- [
- "latest",
- {
- "es2015": {
- "modules": false
- }
- }
- ],
- "react",
- "stage-0"
- ],
- "env": {
- "production": {
- "only": [
- "app"
- ],
- "plugins": [
- "transform-react-remove-prop-types",
- "transform-react-constant-elements",
- "transform-react-inline-elements"
- ]
- },
- "test": {
- "plugins": [
- "istanbul"
- ]
- }
- }
- },
"eslintConfig": {
"parser": "babel-eslint",
"extends": [
@@ -173,7 +132,7 @@
"settings": {
"import/resolver": {
"webpack": {
- "config": "./internals/webpack/webpack.test.babel.js"
+ "config": "./node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.test.babel.js"
}
}
}
@@ -195,107 +154,8 @@
"eventsource-polyfill"
]
},
- "dependencies": {
- "babel-polyfill": "6.13.0",
- "chalk": "1.1.3",
- "compression": "1.6.2",
- "cross-env": "3.1.3",
- "express": "4.14.0",
- "fontfaceobserver": "2.0.1",
- "history": "3.0.0",
- "immutable": "3.8.1",
- "intl": "1.2.4",
- "invariant": "2.2.1",
- "lodash": "4.15.0",
- "react": "15.3.0",
- "react-dom": "15.3.0",
- "react-helmet": "3.1.0",
- "react-intl": "2.1.3",
- "react-redux": "4.4.5",
- "react-router": "2.6.1",
- "react-router-redux": "4.0.5",
- "react-router-scroll": "0.2.1",
- "redux": "3.5.2",
- "redux-immutable": "3.0.7",
- "redux-saga": "0.11.0",
- "reselect": "2.5.3",
- "warning": "3.0.0",
- "whatwg-fetch": "1.0.0"
- },
+ "dependencies": {},
"devDependencies": {
- "babel-cli": "^6.18.0",
- "babel-core": "6.18.0",
- "babel-eslint": "7.1.0",
- "babel-loader": "6.2.7",
- "babel-plugin-istanbul": "2.0.3",
- "babel-plugin-react-intl": "2.2.0",
- "babel-plugin-react-transform": "2.0.2",
- "babel-plugin-transform-async-to-generator": "^6.22.0",
- "babel-plugin-transform-object-rest-spread": "^6.22.0",
- "babel-plugin-transform-react-constant-elements": "6.9.1",
- "babel-plugin-transform-react-inline-elements": "6.8.0",
- "babel-plugin-transform-react-remove-prop-types": "0.2.10",
- "babel-plugin-transform-runtime": "^6.15.0",
- "babel-preset-es2017": "^6.22.0",
- "babel-preset-latest": "6.16.0",
- "babel-preset-react": "6.16.0",
- "babel-preset-react-hmre": "1.1.1",
- "babel-preset-stage-0": "6.16.0",
- "chai": "3.5.0",
- "chai-enzyme": "0.5.2",
- "cheerio": "0.22.0",
- "coveralls": "2.11.14",
- "css-loader": "0.25.0",
- "enzyme": "2.5.1",
- "eslint": "3.9.0",
- "eslint-config-airbnb": "12.0.0",
- "eslint-config-airbnb-base": "9.0.0",
- "eslint-config-prettier": "^2.0.0",
- "eslint-import-resolver-webpack": "0.6.0",
- "eslint-plugin-import": "2.0.1",
- "eslint-plugin-jsx-a11y": "2.2.3",
- "eslint-plugin-react": "6.4.1",
- "eslint-plugin-redux-saga": "0.1.5",
- "eventsource-polyfill": "0.9.6",
- "expect": "1.20.2",
- "expect-jsx": "2.6.0",
- "exports-loader": "0.6.3",
- "file-loader": "0.9.0",
- "image-webpack-loader": "2.0.0",
- "imports-loader": "0.6.5",
- "json-loader": "0.5.4",
- "karma": "1.3.0",
- "karma-chrome-launcher": "2.0.0",
- "karma-coverage": "1.1.1",
- "karma-firefox-launcher": "1.0.0",
- "karma-ie-launcher": "1.0.0",
- "karma-mocha": "1.2.0",
- "karma-mocha-reporter": "2.2.0",
- "karma-safari-launcher": "1.0.0",
- "karma-sourcemap-loader": "0.3.7",
- "karma-webpack": "1.8.0",
- "lint-staged": "3.2.0",
- "mocha": "3.1.2",
- "node-sass": "^3.13.0",
- "null-loader": "0.1.1",
- "plop": "1.5.0",
- "postcss-cssnext": "^2.8.0",
- "postcss-focus": "^1.0.0",
- "postcss-loader": "^1.1.1",
- "postcss-reporter": "^2.0.0",
- "postcss-smart-import": "^0.6.7",
- "pre-commit": "1.1.3",
- "precss": "^1.4.0",
- "prettier": "^1.3.1",
- "psi": "2.0.4",
- "rimraf": "2.5.4",
- "sass-loader": "^4.0.2",
- "shelljs": "0.7.5",
- "sinon": "2.0.0-pre",
- "style-loader": "0.13.1",
- "url-loader": "0.5.7",
- "webpack": "2.1.0-beta.25",
- "webpack-dev-middleware": "1.8.4",
- "webpack-hot-middleware": "2.13.1"
+ "strapi-helper-plugin": "^3.0.0-alpha.3"
}
}