Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove: react config template file flow #273

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions react-template/.gitignore

This file was deleted.

38 changes: 0 additions & 38 deletions react-template/config.json

This file was deleted.

25 changes: 5 additions & 20 deletions src/lib/Theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@ export default class Theme {
pull-config
*/
static TEMPLATE_DIRECTORY = path.join(__dirname, '..', '..', 'template');
static REACT_TEMPLATE_DIRECTORY = path.join(
__dirname,
'..',
'..',
'react-template',
);
static TEMP_REACT_TEMPLATE_DIRECTORY = path.join(
__dirname,
'..',
Expand Down Expand Up @@ -484,8 +478,8 @@ export default class Theme {
try {
Logger.info('Copying template files');
await Theme.copyTemplateFiles(
Theme.TEMP_REACT_TEMPLATE_DIRECTORY,
targetDirectory,
Theme.TEMP_REACT_TEMPLATE_DIRECTORY,
true,
);
Logger.info('Copied template files');
Expand Down Expand Up @@ -616,18 +610,9 @@ export default class Theme {

Logger.info('Copying template config files');
shouldDelete = true;
if (themeData.theme_type === THEME_TYPE.react) {
await Theme.copyTemplateFiles(
Theme.REACT_TEMPLATE_DIRECTORY,
targetDirectory,
true,
);
} else {
await Theme.copyTemplateFiles(
Theme.TEMPLATE_DIRECTORY,
targetDirectory,
);
}
await Theme.copyTemplateFiles(
targetDirectory,
);

let context: any = {
name: themeName + '-' + Env.getEnvValue(),
Expand Down Expand Up @@ -1277,8 +1262,8 @@ export default class Theme {
};
// private methods
private static async copyTemplateFiles(
templateDirectory,
targetDirectory,
templateDirectory?,
isReactTheme?,
) {
try {
Expand Down
Loading