-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix the chrome build system #98
Comments
Strange this has been working, was there a change that broke it I wonder? We did not need to follow the steps you just said to publish any of the other versions and I've been using this same exact code (at least the code I wrote originally) for two other chrome extensions as well. |
Also to add to this issue, we should drop the |
How exactly did you publish it then? Did you upload the zip or did Google accept pre-packaged |
Good question, it's been over a year since I last published an extension, it's possible they changed something on their end. I vaguely remember uploading both a key and the zip separately. I think the idea was that Google signs the |
Actually, given that the current system drops the key in the zip file (as By the way, here's a diff showing how I think this should work: diff --git a/Gruntfile.coffee b/Gruntfile.coffee
index 9c991bb..9f3d03d 100644
--- a/Gruntfile.coffee
+++ b/Gruntfile.coffee
@@ -23,10 +23,10 @@ module.exports = ->
@registerTask 'chrome-extension', [
'clean:chrome-extension'
- 'compress:chrome-extension'
'copy:chrome-extension'
'stylus:chrome-extension'
'es6:chrome-extension'
+ 'compress:chrome-extension'
'shell:chrome-extension'
]
diff --git a/build/tasks/compress.coffee b/build/tasks/compress.coffee
index a02c5d2..4aee196 100644
--- a/build/tasks/compress.coffee
+++ b/build/tasks/compress.coffee
@@ -8,14 +8,6 @@ module.exports = ->
mode: 'zip'
files: [
- { src: ['node_modules/purecss/*'], dest: '.' }
- { src: ['**/*'], expand: true, cwd: 'shared' }
- {
- src: [
- 'key.pem'
- '_locales/**'
- ]
- expand: true
- cwd: 'chrome-extension'
- }
+ { src: ['key.pem'], cwd: 'chrome-extension/dist' }
+ { src: ['**/*'], expand: true, cwd: 'chrome-extension/dist/tipsy' }
] However, I don't really know grunt so I don't know if this is how one is supposed to do it. The basic idea is that the |
This makes sense to me. I dunno how it could work with compress running before building. |
So, the chrome build system is a bit weird.
npm build chrome
runs the tasks in the following order:Now, the chrome store expects a zip with a
key.pem
so I tried uploading the file produced bycompress:chrome-extension
(which meets both of these requirements). However, that zip file is missing the manifest‽ Worse, it appears to have a slightly different directory structure than the.crx
. At the end of the day, I just extracted the compiled extension (.crx
), put thekey.pem
in place, re-zipped, and uploaded that.As far as I can tell, the correct way to do this is to move the
compress:chrome-extension
task afteres6:chrome-extension
and make sure to build the.crx
and.zip
from the same source.The text was updated successfully, but these errors were encountered: