Skip to content

Commit b05a87e

Browse files
committed
build(script): fix scripts minification and market publication to handle firebase hosting source path
1 parent ce4a148 commit b05a87e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

scripts/market-publication.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ app.store_app = storeApp
2626
}
2727
})
2828

29-
const dirPublic = path.resolve(__dirname, '../functions/public')
30-
if (fs.existsSync(path.resolve(dirPublic, 'icon.png'))) {
29+
const dirHosting = path.resolve(__dirname, '../hosting')
30+
if (fs.existsSync(path.resolve(dirHosting, 'icon.png'))) {
3131
app.icon = `${baseUri}icon.png`
3232
}
3333
try {
34-
app.description = fs.readFileSync(path.resolve(dirPublic, 'description.md'), 'utf8')
34+
app.description = fs.readFileSync(path.resolve(dirHosting, 'description.md'), 'utf8')
3535
} catch (e) {
3636
app.description = `
3737
# ${app.title}

scripts/scripts-minification.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ const path = require('path')
22
const fs = require('fs')
33
const uglifyJS = require('uglify-js')
44

5-
const publicPath = path.resolve(__dirname, '../functions/public')
6-
fs.readdirSync(publicPath).forEach(file => {
5+
const hostingPath = path.resolve(__dirname, '../hosting')
6+
fs.readdirSync(hostingPath).forEach(file => {
77
if (file.endsWith('.js') && !file.endsWith('.min.js')) {
8-
const filePath = path.resolve(publicPath, file)
8+
const filePath = path.resolve(hostingPath, file)
99
if (filePath) {
1010
const minify = uglifyJS.minify(fs.readFileSync(filePath, 'utf8'))
1111
if (minify.code) {

0 commit comments

Comments
 (0)