mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 15:49:50 +00:00
Merge pull request #34 from wistityhq/improve/strapi-link
Improve strapi link
This commit is contained in:
commit
f285cf8485
@ -35,7 +35,9 @@ const logger = new (winston.Logger)({
|
|||||||
module.exports = function () {
|
module.exports = function () {
|
||||||
const HOME = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME'];
|
const HOME = process.env[process.platform === 'win32' ? 'USERPROFILE' : 'HOME'];
|
||||||
const pathToPackageJSON = path.resolve(process.cwd(), 'package.json');
|
const pathToPackageJSON = path.resolve(process.cwd(), 'package.json');
|
||||||
|
const pathToStudioJSON = path.resolve(process.cwd(), 'config', 'studio.json');
|
||||||
const appPkg = JSON.parse(fs.readFileSync(pathToPackageJSON));
|
const appPkg = JSON.parse(fs.readFileSync(pathToPackageJSON));
|
||||||
|
const studioConfig = JSON.parse(fs.readFileSync(pathToStudioJSON));
|
||||||
let invalidPackageJSON;
|
let invalidPackageJSON;
|
||||||
|
|
||||||
// First, check if we are in a Strapi project.
|
// First, check if we are in a Strapi project.
|
||||||
@ -86,7 +88,8 @@ module.exports = function () {
|
|||||||
uri: 'http://studio.strapi.io/app',
|
uri: 'http://studio.strapi.io/app',
|
||||||
body: {
|
body: {
|
||||||
name: appPkg.name,
|
name: appPkg.name,
|
||||||
token: config.token
|
token: config.token,
|
||||||
|
appToDelete: studioConfig.studio.appId
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -199,7 +199,7 @@ module.exports = function (strapi) {
|
|||||||
usefulFunctions: true
|
usefulFunctions: true
|
||||||
}, function (schemas) {
|
}, function (schemas) {
|
||||||
strapi.schemas = schemas;
|
strapi.schemas = schemas;
|
||||||
|
|
||||||
strapi.emit('waterline:graphql:ready');
|
strapi.emit('waterline:graphql:ready');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user