This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from thiagodesouza/master
chore(v4): update travis-ci scripts
- Loading branch information
Showing
9 changed files
with
39 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* NEUTRON JS - RELEASE ASSETS COMPRESS | ||
*/ | ||
const fs = require('fs'); | ||
const tarPack = require('tar-pack'); | ||
|
||
const dirs = { | ||
PACKAGES: `${process.cwd()}/packages`, | ||
TEMP: `${process.cwd()}/temp`, | ||
}; | ||
|
||
const packages = fs.readdirSync(dirs.PACKAGES); | ||
|
||
if (fs.existsSync(dirs.TEMP)) { | ||
console.log('Removing temp dir.') | ||
fs.rmdirSync(dirs.TEMP, { recursive: true }); | ||
} | ||
|
||
console.log('Creating temp dir.') | ||
fs.mkdirSync(dirs.TEMP) | ||
|
||
console.log('Compressing packages: tar.gz') | ||
packages.forEach(package => { | ||
tarPack.pack(`${dirs.PACKAGES}/${package}/`) | ||
.pipe(fs.createWriteStream(`${dirs.TEMP}/${package}.tar.gz`)) | ||
}); | ||
|
||
console.log('Done!') |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters