zotero-plugin 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/bin/start.py +6 -2
  2. package/package.json +2 -2
package/bin/start.py CHANGED
@@ -43,6 +43,10 @@ class Config:
43
43
  if self.zotero.log:
44
44
  self.zotero.log = os.path.expanduser(self.zotero.log)
45
45
 
46
+ self.plugin = types.SimpleNamespace(
47
+ source=os.path.abspath(config.get('plugin', 'source', fallback='build'))
48
+ )
49
+
46
50
  if 'preferences' in config:
47
51
  self.preference = { k: self.pref_value(v) for k, v in dict(config['preferences']).items() }
48
52
  else:
@@ -119,10 +123,10 @@ system('npm run build')
119
123
  if config.zotero.db:
120
124
  shutil.copyfile(config.zotero.db, os.path.join(config.profile.path, 'zotero', 'zotero.sqlite'))
121
125
 
122
- for plugin_id in ET.parse(os.path.join('build', 'install.rdf')).getroot().findall('{http://www.w3.org/1999/02/22-rdf-syntax-ns#}Description/{http://www.mozilla.org/2004/em-rdf#}id'):
126
+ for plugin_id in ET.parse(os.path.join(config.plugin.source, 'install.rdf')).getroot().findall('{http://www.w3.org/1999/02/22-rdf-syntax-ns#}Description/{http://www.mozilla.org/2004/em-rdf#}id'):
123
127
  plugin_path = os.path.join(config.profile.path, 'extensions', plugin_id.text)
124
128
  with open(plugin_path, 'w') as f:
125
- sources = os.path.join(os.getcwd(), 'build')
129
+ sources = config.plugin.source
126
130
  if sources[-1] != '/': sources += '/'
127
131
  print(sources, file=f)
128
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zotero-plugin",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "Zotero plugin builder",
5
5
  "homepage": "https://github.com/retorquere/zotero-plugin/wiki",
6
6
  "bin": {
@@ -40,7 +40,7 @@
40
40
  "current-git-branch": "^1.1.0",
41
41
  "dotenv": "^16.0.0",
42
42
  "ejs": "^3.1.6",
43
- "eslint": "^8.8.0",
43
+ "eslint": "^8.9.0",
44
44
  "eslint-plugin-import": "^2.25.4",
45
45
  "eslint-plugin-prefer-arrow": "^1.2.3",
46
46
  "glob": "^7.2.0",