-
Notifications
You must be signed in to change notification settings - Fork 362
Output ZIP files instead of XPI files (fix #325) #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ describe('build', () => { | |
}) | ||
.then((buildResult) => { | ||
assert.match(buildResult.extensionPath, | ||
/minimal_extension-1\.0\.xpi$/); | ||
/minimal_extension-1\.0\.zip$/); | ||
return buildResult.extensionPath; | ||
}) | ||
.then((extensionPath) => zipFile.open(extensionPath)) | ||
|
@@ -62,12 +62,12 @@ describe('build', () => { | |
}) | ||
.then((buildResult) => { | ||
assert.match(buildResult.extensionPath, | ||
/the_extension-0\.0\.1\.xpi$/); | ||
/the_extension-0\.0\.1\.zip$/); | ||
return buildResult.extensionPath; | ||
}) | ||
)); | ||
|
||
it('asks FileFilter what files to include in the XPI', () => { | ||
it('asks FileFilter what files to include in the ZIP', () => { | ||
let zipFile = new ZipFile(); | ||
let fileFilter = new FileFilter({ | ||
filesToIgnore: ['**/background-script.js'], | ||
|
@@ -99,7 +99,7 @@ describe('build', () => { | |
{manifestData: basicManifest, onSourceChange, fileFilter}) | ||
.then((buildResult) => { | ||
// Make sure we still have a build result. | ||
assert.match(buildResult.extensionPath, /\.xpi$/); | ||
assert.match(buildResult.extensionPath, /\.zip$/); | ||
return buildResult; | ||
}) | ||
.then((buildResult) => { | ||
|
@@ -122,7 +122,7 @@ describe('build', () => { | |
.then(() => args.onChange()); | ||
}) | ||
.then((buildResult) => { | ||
assert.match(buildResult.extensionPath, /\.xpi$/); | ||
assert.match(buildResult.extensionPath, /\.zip$/); | ||
return fs.stat(buildResult.extensionPath); | ||
}) | ||
.then((stat) => { | ||
|
@@ -209,7 +209,7 @@ describe('build', () => { | |
assert.equal(filter.wantFile('some.xpi'), true); | ||
assert.equal(filter.wantFile('manifest.json'), false); | ||
}); | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. heh. I fixed the eslint rule for this in another PR that hasn't landed yet. I was like wut, how did that even get committed? 🎯 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And my editor just deletes trailing whitespace so I didn't even notice I committed it 😄 Should I remove it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no, your change is correct. Thanks. |
||
it('ignores node_modules by default', () => { | ||
assert.equal(defaultFilter.wantFile('path/to/node_modules'), false); | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might as well just make this
${manifestData.name}-${manifestData.version}.zip
-- no need for a variableThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.