mirror of
https://github.com/strapi/strapi.git
synced 2025-11-16 01:57:56 +00:00
Fix build due to layout
This commit is contained in:
parent
b195ae0ef8
commit
2b86bde1b4
@ -26,21 +26,20 @@ module.exports = scope => {
|
|||||||
'description': `Description of ${scope.id} plugin.`
|
'description': `Description of ${scope.id} plugin.`
|
||||||
},
|
},
|
||||||
'scripts': {
|
'scripts': {
|
||||||
'analyze:clean': 'rimraf stats.json',
|
'analyze:clean': 'node ./node_modules/strapi-helper-plugin/node_modules/.bin/rimraf stats.json',
|
||||||
'preanalyze': 'npm run analyze:clean',
|
'preanalyze': 'npm run analyze:clean',
|
||||||
'analyze': 'node node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js',
|
'analyze': 'node ./node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js',
|
||||||
'prebuild': 'npm run build:clean && npm run test',
|
'prebuild': 'npm run build:clean && npm run test',
|
||||||
'build:dev': 'cross-env NODE_ENV=development webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress',
|
'build:dev': 'node ./node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development node ./node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress',
|
||||||
'build': 'cross-env NODE_ENV=production webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress',
|
'build': 'node ./node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production node node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress',
|
||||||
'build:clean': 'rimraf admin/build',
|
'build:clean': 'node ./node_modules/strapi-helper-plugin/node_modules/.bin/rimraf admin/build',
|
||||||
'start': 'cross-env NODE_ENV=development node node_modules/strapi-helper-plugin/lib/server',
|
'start': 'node ./node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development node ./node_modules/strapi-helper-plugin/lib/server',
|
||||||
'generate': 'plop --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js',
|
'generate': 'node ./node_modules/plop/plop.js --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js',
|
||||||
'lint': 'eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin',
|
'lint': 'node ./node_modules/strapi-helper-plugin/node_modules/.bin/eslint --ignore-path .gitignore --config ./node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin',
|
||||||
'pretest': 'npm run lint',
|
'pretest': 'npm run lint',
|
||||||
'prettier': 'prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"',
|
'prettier': 'node ./node_modules/strapi-helper-plugin/node_modules/.bin/prettier --single-quote --trailing-comma es5 --write "{admin,__{tests,mocks}__}/**/*.js"',
|
||||||
'test': 'echo Tests are not implemented.',
|
'test': 'echo Tests are not implemented.',
|
||||||
'prepublish': 'npm run build',
|
'prepublishOnly': 'npm run build'
|
||||||
'postinstall': 'node node_modules/strapi-helper-plugin/lib/internals/scripts/postinstall.js'
|
|
||||||
},
|
},
|
||||||
'dependencies': {},
|
'dependencies': {},
|
||||||
'devDependencies': {
|
'devDependencies': {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -39,9 +39,13 @@ const plugins = [
|
|||||||
// Minify and optimize the JavaScript
|
// Minify and optimize the JavaScript
|
||||||
new webpack.optimize.UglifyJsPlugin({
|
new webpack.optimize.UglifyJsPlugin({
|
||||||
sourceMap: true,
|
sourceMap: true,
|
||||||
|
parallel: true,
|
||||||
compress: {
|
compress: {
|
||||||
warnings: false
|
warnings: false
|
||||||
},
|
},
|
||||||
|
uglifyOptions: {
|
||||||
|
ecma: 8,
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
new webpack.LoaderOptionsPlugin({
|
new webpack.LoaderOptionsPlugin({
|
||||||
minimize: true
|
minimize: true
|
||||||
|
|||||||
@ -22,17 +22,16 @@ const tryRequireRoot = (source) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const tryRequireConfig = (source) => {
|
const bootstrap = tryRequireRoot('bootstrap');
|
||||||
|
const pluginRequirements = tryRequireRoot('requirements');
|
||||||
|
|
||||||
|
const layout = (() => {
|
||||||
try {
|
try {
|
||||||
return require('../../../../config/' + source + '.js');
|
return require('../../../../config/layout.js');
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
};
|
})();
|
||||||
|
|
||||||
const bootstrap = tryRequireRoot('bootstrap');
|
|
||||||
const pluginRequirements = tryRequireRoot('requirements');
|
|
||||||
const layout = tryRequireConfig('layout');
|
|
||||||
|
|
||||||
const injectedComponents = (() => {
|
const injectedComponents = (() => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -256,268 +256,34 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"application": {
|
"application": {
|
||||||
"controllers": {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
"name": "Guest",
|
|
||||||
"description": "",
|
|
||||||
"permissions": {
|
|
||||||
"content-manager": {
|
|
||||||
"controllers": {
|
"controllers": {
|
||||||
"contentmanager": {
|
"product": {
|
||||||
"models": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"find": {
|
"find": {
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"count": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"findOne": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"create": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"delete": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"identity": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content-type-builder": {
|
|
||||||
"controllers": {
|
|
||||||
"contenttypebuilder": {
|
|
||||||
"getModels": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"updateModel": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"checkTableExists": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"autoReload": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"createModel": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"getModel": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"deleteModel": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"identity": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"getConnections": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"settings-manager": {
|
|
||||||
"controllers": {
|
|
||||||
"settingsmanager": {
|
|
||||||
"environments": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"deleteLanguage": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"updateDatabase": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"deleteDatabase": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"autoReload": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"databaseModel": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"createLanguage": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"get": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"createDatabase": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"databases": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"languages": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"database": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"identity": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"menu": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"users-permissions": {
|
|
||||||
"controllers": {
|
|
||||||
"auth": {
|
|
||||||
"callback": {
|
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"register": {
|
"findOne": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"forgotPassword": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"changePassword": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"identity": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"user": {
|
|
||||||
"find": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"findOne": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"create": {
|
"create": {
|
||||||
"enabled": false,
|
"enabled": true,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"update": {
|
"update": {
|
||||||
"enabled": false,
|
"enabled": true,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"destroy": {
|
"destroy": {
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"identity": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userspermissions": {
|
|
||||||
"searchUsers": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"getRoutes": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"deleteRole": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"getPolicies": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"getRoles": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"getRole": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"getPermissions": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"init": {
|
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"policy": ""
|
"policy": ""
|
||||||
},
|
},
|
||||||
"index": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"createRole": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"deleteProvider": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"identity": {
|
"identity": {
|
||||||
"enabled": false,
|
"enabled": true,
|
||||||
"policy": ""
|
|
||||||
},
|
|
||||||
"updateRole": {
|
|
||||||
"enabled": false,
|
|
||||||
"policy": ""
|
"policy": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"application": {
|
|
||||||
"controllers": {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,36 +8,38 @@
|
|||||||
"description": "users-permissions.plugin.description"
|
"description": "users-permissions.plugin.description"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"analyze:clean": "rimraf stats.json",
|
"analyze:clean": "node ./node_modules/strapi-helper-plugin/node_modules/.bin/rimraf stats.json",
|
||||||
"preanalyze": "npm run analyze:clean",
|
"preanalyze": "npm run analyze:clean",
|
||||||
"analyze": "node node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js",
|
"analyze": "node ./node_modules/strapi-helper-plugin/lib/internals/scripts/analyze.js",
|
||||||
"prebuild": "npm run build:clean && npm run test",
|
"prebuild": "npm run build:clean && npm run test",
|
||||||
"build": "cross-env NODE_ENV=production webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
|
"build:dev": "node ./node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development node ./node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
|
||||||
"build:clean": "rimraf admin/build",
|
"build": "node ./node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=production node node_modules/strapi-helper-plugin/node_modules/.bin/webpack --config node_modules/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js --color -p --progress",
|
||||||
"start": "cross-env NODE_ENV=development node node_modules/strapi-helper-plugin/lib/server",
|
"build:clean": "node ./node_modules/strapi-helper-plugin/node_modules/.bin/rimraf admin/build",
|
||||||
"generate": "plop --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
|
"start": "node ./node_modules/strapi-helper-plugin/node_modules/.bin/cross-env NODE_ENV=development node ./node_modules/strapi-helper-plugin/lib/server",
|
||||||
"lint": "eslint --ignore-path .gitignore --config node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
|
"generate": "node ./node_modules/plop/plop.js --plopfile node_modules/strapi-helper-plugin/lib/internals/generators/index.js",
|
||||||
|
"lint": "node ./node_modules/strapi-helper-plugin/node_modules/.bin/eslint --ignore-path .gitignore --config ./node_modules/strapi-helper-plugin/lib/internals/eslint/.eslintrc.json admin",
|
||||||
"pretest": "npm run lint",
|
"pretest": "npm run lint",
|
||||||
"prettier": "prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
|
"prettier": "node ./node_modules/strapi-helper-plugin/node_modules/.bin/prettier --single-quote --trailing-comma es5 --write \"{admin,__{tests,mocks}__}/**/*.js\"",
|
||||||
"test": "echo Tests are not implemented.",
|
"test": "echo Tests are not implemented.",
|
||||||
"prepublish": "npm run build",
|
"prepublishOnly": "npm run build"
|
||||||
"postinstall": "node node_modules/strapi-helper-plugin/lib/internals/scripts/postinstall.js"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"jsonwebtoken": "^8.1.0",
|
"jsonwebtoken": "^8.1.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
"strapi-helper-plugin": "3.0.0-alpha.6.7"
|
"strapi-helper-plugin": "3.0.0-alpha.6.7"
|
||||||
},
|
},
|
||||||
"author": {
|
"author": {
|
||||||
"name": "A Strapi developer",
|
"name": "Strapi team",
|
||||||
"email": "",
|
"email": "hi@strapi.io",
|
||||||
"url": ""
|
"url": "http://strapi.io"
|
||||||
},
|
},
|
||||||
"maintainers": [
|
"maintainers": [
|
||||||
{
|
{
|
||||||
"name": "A Strapi developer",
|
"name": "Strapi team",
|
||||||
"email": "",
|
"email": "hi@strapi.io",
|
||||||
"url": ""
|
"url": "http://strapi.io"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -61,4 +63,4 @@
|
|||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"webpack": "^3.9.1"
|
"webpack": "^3.9.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,6 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getActions: () => {
|
getActions: () => {
|
||||||
console.log(strapi);
|
|
||||||
const generateActions = (data) => (
|
const generateActions = (data) => (
|
||||||
Object.keys(data).reduce((acc, key) => {
|
Object.keys(data).reduce((acc, key) => {
|
||||||
acc[key] = { enabled: false, policy: '' };
|
acc[key] = { enabled: false, policy: '' };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user