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
1 parent
b9f90d3
commit 2078f82
Showing
47 changed files
with
390 additions
and
235 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 |
---|---|---|
|
@@ -200,4 +200,5 @@ publish | |
# Ignore published packages | ||
*.zip | ||
*.xpi | ||
*.crx | ||
*.crx | ||
package-lock.json |
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,45 @@ | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var JSZip = require('jszip'); | ||
|
||
var support = [ 'chrome', 'firefox', 'edge' ]; | ||
|
||
var manifest_master = JSON.parse(fs.readFileSync('src/manifest.json', 'utf8')); | ||
|
||
manifest_master.version = process.argv[2]; | ||
|
||
support.forEach((browser, index) => { | ||
var zip = new JSZip(); | ||
|
||
if (!fs.existsSync('dist')) fs.mkdirSync('dist'); | ||
|
||
var manifest = manifest_master; | ||
|
||
if (fs.existsSync('src/manifest.' + browser + '.json', 'utf8')) { | ||
var manifest_browser = JSON.parse(fs.readFileSync('src/manifest.' + browser + '.json', 'utf8')); | ||
manifest = { ...manifest, ...manifest_browser }; | ||
} | ||
|
||
zip.file('manifest.json', JSON.stringify(manifest, null, 2)); | ||
|
||
var addFiles = function(filePath) { | ||
var checkPath = path.basename(filePath.toLowerCase()); | ||
|
||
if (checkPath == 'debug') return; | ||
if (checkPath == 'screenshots') return; | ||
if (checkPath.startsWith('manifest.') && checkPath.endsWith('.json')) return; | ||
|
||
if (fs.lstatSync(filePath).isDirectory()) { | ||
files = fs.readdirSync(filePath); | ||
files.forEach(function(file) { addFiles(path.join(filePath, file)) }); | ||
} else { | ||
zip.file(filePath.substr(4), fs.readFileSync(filePath, 'binary'), { binary: true }); | ||
} | ||
} | ||
|
||
addFiles('src'); | ||
|
||
// TODO: Copy Files In | ||
|
||
zip.generateNodeStream({type:'nodebuffer',streamFiles:true}).pipe(fs.createWriteStream('dist/' + manifest.short_name + '-' + browser + '-v' + manifest.version + '.zip')) | ||
}); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "hangarxplor", | ||
"description": "This extension improves the Hangar page on RobertsSpaceIndustries.com", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/dolkensp/HangarXPLOR.git" | ||
}, | ||
"author": "/u/alluran (Peter Dolkens)", | ||
"bugs": { | ||
"url": "https://github.com/dolkensp/HangarXPLOR/issues" | ||
}, | ||
"homepage": "https://github.com/dolkensp/HangarXPLOR#readme", | ||
"dependencies": { | ||
"jszip": "^3.1.5" | ||
} | ||
} |
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
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
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,3 @@ | ||
{ | ||
|
||
} |
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,6 @@ | ||
{ | ||
"-ms-preload": { | ||
"backgroundScript": "vendor/edge/backgroundScriptsAPIBridge.js", | ||
"contentScript": "vendor/edge/contentScriptsAPIBridge.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"applications": { | ||
"gecko": { | ||
"id": "HangarXPLOR@ddrit.com" | ||
} | ||
} | ||
} |
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
File renamed without changes
File renamed without changes
File renamed without changes
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,10 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>HangarXPLOR Settings</title> | ||
<script src="HangarXPLOR.Settings.js"></script> | ||
</head> | ||
<body> | ||
<h1>Settings</h1> | ||
</body> | ||
</html> |
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 @@ | ||
console.log('Hi'); |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.