Skip to content

Commit cd6fedd

Browse files
authored
Merge pull request #13 from uicrooks/dev
v2.1.5
2 parents ddf0ef0 + a944754 commit cd6fedd

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.config/plugins/shopify/theme.init.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,17 @@ const initTheme = async () => {
8787
}
8888
}
8989

90-
await fs.outputFile(path.resolve(__dirname, '../../../shopify/config/settings_data.json'), JSON.stringify(settingsData))
90+
const settingsFilePath = path.resolve(__dirname, '../../../shopify/config/settings_data.json')
91+
92+
// check if settings_data.json already exists and if not then create that file
93+
fs.stat(settingsFilePath, (e) => {
94+
if (e && e.code === 'ENOENT') {
95+
fs.outputFile(settingsFilePath, JSON.stringify(settingsData))
96+
} else if (e) {
97+
console.error(chalk.red(e))
98+
process.exit(1)
99+
}
100+
})
91101
} catch (e) {
92102
console.error(chalk.red(e))
93103
process.exit(1)

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "shopify-theme-lab",
33
"description": "Customizable modular development environment for blazing-fast Shopify theme creation",
44
"author": "Sergej Samsonenko <contact@sergej.codes>",
5-
"version": "2.1.4",
5+
"version": "2.1.5",
66
"license": "MIT",
77
"repository": {
88
"type": "git",

0 commit comments

Comments
 (0)