commit
0233412e5a
3 changed files with 7916 additions and 4622 deletions
12445
package-lock.json
generated
12445
package-lock.json
generated
File diff suppressed because it is too large
Load diff
38
package.json
38
package.json
|
@ -22,33 +22,33 @@
|
|||
},
|
||||
"homepage": "https://github.com/ueokande/vim-vixen",
|
||||
"devDependencies": {
|
||||
"adm-zip": "^0.4.7",
|
||||
"babel-cli": "^6.24.1",
|
||||
"babel-eslint": "^8.0.2",
|
||||
"babel-loader": "^7.1.1",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-eslint": "^8.2.3",
|
||||
"babel-loader": "^7.1.4",
|
||||
"babel-preset-preact": "^1.1.0",
|
||||
"chai": "^4.1.1",
|
||||
"css-loader": "^0.28.10",
|
||||
"eslint": "^4.7.0",
|
||||
"eslint-plugin-react": "^7.4.0",
|
||||
"html-webpack-plugin": "^3.0.6",
|
||||
"karma": "^2.0.0",
|
||||
"karma-firefox-launcher": "^1.0.1",
|
||||
"chai": "^4.1.2",
|
||||
"css-loader": "^0.28.11",
|
||||
"eslint": "^4.19.1",
|
||||
"eslint-plugin-react": "^7.8.2",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"karma": "^2.0.2",
|
||||
"karma-firefox-launcher": "^1.1.0",
|
||||
"karma-html2js-preprocessor": "^1.1.0",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-mocha-reporter": "^2.2.3",
|
||||
"karma-mocha-reporter": "^2.2.5",
|
||||
"karma-sinon": "^1.0.5",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-webpack": "^3.0.0",
|
||||
"mocha": "^5.0.0",
|
||||
"node-sass": "^4.5.3",
|
||||
"preact": "^8.2.6",
|
||||
"mocha": "^5.1.1",
|
||||
"node-firefox-connect": "^1.2.0",
|
||||
"node-sass": "^4.9.0",
|
||||
"preact": "^8.2.9",
|
||||
"sass-loader": "^7.0.1",
|
||||
"sinon-chrome": "^2.3.1",
|
||||
"sinon-chrome": "^2.3.2",
|
||||
"style-loader": "^0.21.0",
|
||||
"web-ext": "github:ueokande/web-ext#patched-2.4.0",
|
||||
"web-ext": "github:ueokande/web-ext#patched-2.6.0",
|
||||
"webextensions-api-fake": "^0.5.1",
|
||||
"webpack": "^4.1.1",
|
||||
"webpack-cli": "^2.0.11"
|
||||
"webpack": "^4.8.3",
|
||||
"webpack-cli": "^2.1.3"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,55 +0,0 @@
|
|||
let path = require('path');
|
||||
let fs = require('fs');
|
||||
let AdmZip = require('adm-zip');
|
||||
let manifest = require('../manifest');
|
||||
|
||||
manifest.iconFiles = function() {
|
||||
return Object.keys(this.icons).map(key => this.icons[key]);
|
||||
};
|
||||
|
||||
manifest.contentScriptFiles = function() {
|
||||
let files = this.content_scripts.map(entry => entry.js);
|
||||
return [].concat.apply([], files);
|
||||
};
|
||||
|
||||
manifest.backgroundScriptFiles = function() {
|
||||
return this.background.scripts;
|
||||
|
||||
};
|
||||
|
||||
manifest.webAccessibleResourceFiles = function() {
|
||||
return this.web_accessible_resources;
|
||||
};
|
||||
|
||||
manifest.optionFiles = function() {
|
||||
let uiFile = this.options_ui.page;
|
||||
let dir = path.dirname(uiFile);
|
||||
let html = fs.readFileSync(uiFile, 'utf-8');
|
||||
|
||||
let files = [uiFile];
|
||||
let regex = /<\s*script\s+src\s*=\s*'(.*)'\s*>/g;
|
||||
let match = regex.exec(html);
|
||||
while (match) {
|
||||
files.push(path.join(dir, match[1]));
|
||||
match = regex.exec(html);
|
||||
}
|
||||
return files;
|
||||
};
|
||||
|
||||
let files = []
|
||||
.concat('manifest.json')
|
||||
.concat(manifest.iconFiles())
|
||||
.concat(manifest.contentScriptFiles())
|
||||
.concat(manifest.backgroundScriptFiles())
|
||||
.concat(manifest.webAccessibleResourceFiles())
|
||||
.concat(manifest.optionFiles());
|
||||
let zip = new AdmZip();
|
||||
let output = `${manifest.version}.zip`;
|
||||
console.log(output);
|
||||
for (let f of files) {
|
||||
let dir = path.dirname(f);
|
||||
zip.addLocalFile(f, dir);
|
||||
console.log('=>', path.join(dir, f));
|
||||
}
|
||||
|
||||
zip.writeZip(output);
|
Reference in a new issue