mirror of
https://github.com/strapi/strapi.git
synced 2025-10-30 17:37:26 +00:00
Remove copy-resource, favicon path resolution is already handled by the favicon middleware
This commit is contained in:
parent
a9525c0704
commit
6f5e69b659
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
const compilers = require('./compilers');
|
const compilers = require('./compilers');
|
||||||
const getConfigPath = require('./utils/get-config-path');
|
const getConfigPath = require('./utils/get-config-path');
|
||||||
const copyResources = require('./utils/copy-resources');
|
|
||||||
|
|
||||||
module.exports = async (srcDir, { watch = false } = {}) => {
|
module.exports = async (srcDir, { watch = false } = {}) => {
|
||||||
// TODO: Use the Strapi debug logger instead or don't log at all
|
// TODO: Use the Strapi debug logger instead or don't log at all
|
||||||
@ -12,6 +11,4 @@ module.exports = async (srcDir, { watch = false } = {}) => {
|
|||||||
const configPath = getConfigPath(srcDir);
|
const configPath = getConfigPath(srcDir);
|
||||||
|
|
||||||
compiler.run(configPath);
|
compiler.run(configPath);
|
||||||
|
|
||||||
await copyResources(srcDir);
|
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,12 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const path = require('path');
|
|
||||||
const fse = require('fs-extra');
|
|
||||||
|
|
||||||
const DEFAULT_RESOURCES_PATHS = ['favicon.ico'];
|
|
||||||
|
|
||||||
module.exports = async (dir, resources = DEFAULT_RESOURCES_PATHS) => {
|
|
||||||
await Promise.all(
|
|
||||||
resources.map(resourceName => fse.copy(resourceName, path.join(dir, 'dist', resourceName)))
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@ -5,7 +5,6 @@ const isTypeScriptProjectSync = require('./is-typescript-project-sync');
|
|||||||
const getConfigPath = require('./get-config-path');
|
const getConfigPath = require('./get-config-path');
|
||||||
const reportDiagnostics = require('./report-diagnostics');
|
const reportDiagnostics = require('./report-diagnostics');
|
||||||
const resolveConfigOptions = require('./resolve-config-options');
|
const resolveConfigOptions = require('./resolve-config-options');
|
||||||
const copyResources = require('./copy-resources');
|
|
||||||
const formatHost = require('./format-host');
|
const formatHost = require('./format-host');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -14,6 +13,5 @@ module.exports = {
|
|||||||
getConfigPath,
|
getConfigPath,
|
||||||
reportDiagnostics,
|
reportDiagnostics,
|
||||||
resolveConfigOptions,
|
resolveConfigOptions,
|
||||||
copyResources,
|
|
||||||
formatHost,
|
formatHost,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user