-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ffize to make Firefox version (#100)
`npm run ff` will build and then make a `public-ff` tree you can load as a temporary extension in Firefox Quantum. Also removed old files we no longer need.
- Loading branch information
Chris White
committed
Dec 26, 2018
1 parent
2deb068
commit fdecec3
Showing
6 changed files
with
67 additions
and
82 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 |
---|---|---|
|
@@ -27,7 +27,7 @@ tags | |
foo.* | ||
|
||
# Output directories | ||
/public | ||
/public* | ||
/build* | ||
/doc/ | ||
/dist/ | ||
|
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,25 @@ | ||
// ffize.js: Make a Firefox manifest from the built Chrome manifest | ||
// cxw42, 2018. | ||
|
||
var fs = require('fs-extra'); | ||
|
||
// Copy the whole `public` tree into a fresh `public-ff`. | ||
fs.removeSync('public-ff'); | ||
fs.copySync('public','public-ff'); | ||
|
||
// Read the Chrome manifest | ||
var manifest = require('./public/manifest.json'); | ||
|
||
// Munge | ||
delete manifest['version_name']; | ||
delete manifest['offline_enabled']; | ||
delete manifest['options_page']; | ||
delete manifest['background']['persistent']; | ||
|
||
var idx = manifest['permissions'].indexOf('chrome://favicon/'); | ||
if(idx > -1) { | ||
manifest['permissions'].splice(idx,1); | ||
} | ||
|
||
// Write it back out | ||
fs.writeFileSync('./public-ff/manifest.json', JSON.stringify(manifest)); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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