2019-06-19 19:02:36 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Expose main package JSON of the application
|
|
|
|
* with basic info, dependencies, etc.
|
|
|
|
*/
|
|
|
|
|
|
|
|
module.exports = opts => {
|
2021-02-18 11:46:29 +01:00
|
|
|
const {
|
|
|
|
strapiDependencies,
|
|
|
|
additionalsDependencies,
|
|
|
|
strapiVersion,
|
|
|
|
projectName,
|
|
|
|
uuid,
|
|
|
|
packageJsonStrapi,
|
|
|
|
} = opts;
|
2019-06-19 19:02:36 +02:00
|
|
|
|
|
|
|
// Finally, return the JSON.
|
|
|
|
return {
|
|
|
|
name: projectName,
|
|
|
|
private: true,
|
|
|
|
version: '0.1.0',
|
|
|
|
description: 'A Strapi application',
|
|
|
|
scripts: {
|
|
|
|
develop: 'strapi develop',
|
|
|
|
start: 'strapi start',
|
|
|
|
build: 'strapi build',
|
2019-10-15 16:54:23 +02:00
|
|
|
strapi: 'strapi',
|
2019-06-19 19:02:36 +02:00
|
|
|
},
|
2019-10-15 16:54:23 +02:00
|
|
|
devDependencies: {},
|
2019-06-19 19:02:36 +02:00
|
|
|
dependencies: Object.assign(
|
2019-10-15 16:54:23 +02:00
|
|
|
{},
|
2019-06-19 19:02:36 +02:00
|
|
|
strapiDependencies.reduce((acc, key) => {
|
|
|
|
acc[key] = strapiVersion;
|
|
|
|
return acc;
|
|
|
|
}, {}),
|
|
|
|
additionalsDependencies
|
|
|
|
),
|
|
|
|
author: {
|
|
|
|
name: 'A Strapi developer',
|
|
|
|
},
|
|
|
|
strapi: {
|
|
|
|
uuid: uuid,
|
2021-02-18 11:46:29 +01:00
|
|
|
...packageJsonStrapi,
|
2019-06-19 19:02:36 +02:00
|
|
|
},
|
|
|
|
engines: {
|
2021-06-23 07:55:40 +02:00
|
|
|
node: '>=12.x.x <=14.x.x',
|
2021-02-10 09:35:02 -07:00
|
|
|
npm: '^6.0.0',
|
2019-06-19 19:02:36 +02:00
|
|
|
},
|
|
|
|
license: 'MIT',
|
|
|
|
};
|
|
|
|
};
|