grunt-contrib-compressを使用して展開パッケージを圧縮しています。私は次の設定を持っています:
// Zip up the distribution folder and give it a build name. The folder can then be uploaded to the Chrome Web Store.
grunt.registerTask('compress-extension', 'compress the files which are ready to be uploaded to the Chrome Web Store into a .zip', function () {
// There's no need to cleanup any old version because this will overwrite if it exists.
grunt.config.set('compress', {
dist: {
options: {
archive: 'Streamus v' + grunt.option('version') + '.zip'
},
files: [{
src: ['dist/**'],
dest: '',
}]
}
});
grunt.task.run('compress');
});
これにより、回避したいディレクトリ構造のレベルが 1 つ追加されます。圧縮後、構造は次のようになります。
'Streamus v0.xxx.zip' -> 'dist' -> '[sub directories]'
そして私はちょうど望んでいます:
'Streamus v0.xxx.zip' -> '[sub directories]'
これを行うための最も簡単な方法は何ですか? 圧縮の「ファイル」構成セクションでその欲求を表現できますか? 多分平らにしますか?