This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
89 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
gulpfile.* | ||
tools/**/*.js | ||
tools/**/*.json | ||
src/emojis/emojis.js |
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,46 @@ | ||
const chalk = require('chalk'); | ||
const clog = (color, ...args) => console.log(chalk[color](...args)); | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
if (!process.argv[2]) { | ||
clog('red', 'Please provide a private key file'); | ||
process.exit(); | ||
} | ||
|
||
const privateKeyPath = path.resolve(process.argv[2]); | ||
const extensionPath = path.resolve(__dirname, '../dist'); | ||
const ChromeExtension = require('crx'); | ||
const crx = new ChromeExtension({ | ||
privateKey: fs.readFileSync(privateKeyPath), | ||
}); | ||
|
||
|
||
clog('blue', `Loading extension from ${extensionPath} with key from ${privateKeyPath}`); | ||
|
||
crx.load(extensionPath) | ||
.then((d) => { | ||
clog('blue', 'Loaded', d.manifest.short_name, d.manifest.version); | ||
|
||
return crx.pack().then(buffer => { | ||
fs.writeFile(path.resolve(__dirname, '../packed/', 'better-tweetdeck.crx'), buffer, (err) => { | ||
if (err) { | ||
clog('red', err); | ||
} | ||
|
||
clog('green', 'Saved better-tweetdeck.crx'); | ||
}); | ||
fs.writeFile(path.resolve(__dirname, '../packed/', 'better-tweetdeck.nex'), buffer, (err) => { | ||
if (err) { | ||
clog('red', err); | ||
} | ||
|
||
clog('green', 'Saved better-tweetdeck.nex'); | ||
}); | ||
}); | ||
}, (err) => { | ||
if (err) { | ||
clog('red', err); | ||
clog('blue', 'Try to run `npm run build` before executing this script'); | ||
} | ||
}); |
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