bluedither 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/publish.js +11 -0
- package/package.json +1 -1
package/cli/commands/publish.js
CHANGED
|
@@ -195,6 +195,16 @@ export default async function publish(args) {
|
|
|
195
195
|
console.log('\nStep 8: Publishing theme...');
|
|
196
196
|
const tokens = JSON.parse(readFileSync(resolve(dir, config.tokens), 'utf-8'));
|
|
197
197
|
|
|
198
|
+
// Read template HTML if available
|
|
199
|
+
let templateHtml = null;
|
|
200
|
+
for (const tmplPath of ['template/index.html', 'theme/template/index.html']) {
|
|
201
|
+
const full = resolve(dir, tmplPath);
|
|
202
|
+
if (existsSync(full)) {
|
|
203
|
+
templateHtml = readFileSync(full, 'utf-8');
|
|
204
|
+
break;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
198
208
|
const theme = await publishTheme({
|
|
199
209
|
name: config.name,
|
|
200
210
|
slug,
|
|
@@ -202,6 +212,7 @@ export default async function publish(args) {
|
|
|
202
212
|
tokens_json: tokens,
|
|
203
213
|
package_path: packagePath,
|
|
204
214
|
screenshot_url: screenshotUrl,
|
|
215
|
+
template_html: templateHtml,
|
|
205
216
|
}, creds.access_token);
|
|
206
217
|
|
|
207
218
|
console.log(`
|