Skip to content

Commit

Permalink
Support production env
Browse files Browse the repository at this point in the history
  • Loading branch information
zxdong262 committed Apr 19, 2020
1 parent ba1752f commit ce85c01
Show file tree
Hide file tree
Showing 16 changed files with 2,068 additions and 331 deletions.
34 changes: 34 additions & 0 deletions bin/pack.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/**
* pack dist folders to zip file for release
*/

const {
exec,
rm
} = require('shelljs')
const pack = require('../package.json')

// zip -vr folder.zip folder/ -x "*.DS_Store"
// hubspot-embeddable-ringcentral-phone-google-chrome-1.6.0.zip
// hubspot-embeddable-ringcentral-phone-mozilla-firefox-1.8.4.zip

const config = [
{
name: 'google-chrome',
folder: 'dist'
},
{
name: 'mozilla-firefox',
folder: 'dist-firefox'
}
]

async function run () {
rm('-rf', '*.zip')
for (let v of config) {
let cmd = `zip -vr ${pack.name}-${v.name}-${pack.version}.zip ${v.folder}/ -x "*.DS_Store"`
exec(cmd)
}
}

run()
Loading

0 comments on commit ce85c01

Please sign in to comment.