mirror of
https://github.com/strapi/strapi.git
synced 2025-08-19 06:08:50 +00:00
Avoid write files if not development environment
This commit is contained in:
parent
1233d5fac9
commit
a5dc07c0a5
@ -266,8 +266,10 @@ module.exports = {
|
|||||||
resolvers,
|
resolvers,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Write schema.
|
if (strapi.config.environment === 'development') {
|
||||||
this.writeGenerateSchema(graphql.printSchema(schema));
|
// Write schema.
|
||||||
|
this.writeGenerateSchema(graphql.printSchema(schema));
|
||||||
|
}
|
||||||
|
|
||||||
// Remove custom scaler (like Upload);
|
// Remove custom scaler (like Upload);
|
||||||
typeDefs = Types.removeCustomScalar(typeDefs, resolvers);
|
typeDefs = Types.removeCustomScalar(typeDefs, resolvers);
|
||||||
|
@ -88,6 +88,10 @@ module.exports = async function() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strapi.config.environment !== 'development') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// arrange system directories
|
// arrange system directories
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
fs.remove(sourcePath),
|
fs.remove(sourcePath),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user