File tree Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Expand file tree Collapse file tree 1 file changed +4
-27
lines changed Original file line number Diff line number Diff line change 1010from zipfile import ZipFile , ZIP_STORED , ZIP_DEFLATED
1111
1212resources = [
13- "install.rdf" ,
14- "chrome.manifest" ,
15- "*.xul" ,
16- "locale/*/*.dtd" ,
17- "locale/*/*.properties" ,
18- "defaults/preferences/prefs.js" ,
19- "icon.png" , "icon64.png" ,
13+ "manifest.json" ,
14+ "_locales/*/messages.json" ,
15+ "icon.png" , "icon32.png" , "icon64.png" ,
2016 "LICENSE.txt" ,
21- "content-script .js"
17+ "* .js" , "options.html "
2218 ]
2319destination = "repagination.xpi"
2420
@@ -34,26 +30,7 @@ def Minor():
3430 yield
3531
3632
37- def get_js_requires (scripts ):
38- known = set ()
39- scripts = list (scripts )
40- for script in scripts :
41- with open (script ) as sp :
42- for line in sp :
43- m = re .search (r"(?:r|lazyR)equire\((['\"])(.+?)\1" , line )
44- if not m :
45- continue
46- m = m .group (2 ) + ".js"
47- if m in known :
48- continue
49- known .add (m )
50- scripts += m ,
51- return set (scripts )
52-
53-
5433def get_files (resources ):
55- for r in get_js_requires (("bootstrap.js" , "loader.jsm" )):
56- yield r
5734 for r in resources :
5835 if os .path .isfile (r ):
5936 yield r
You can’t perform that action at this time.
0 commit comments