Remove connectorTypeSchemaData.js and update build_typeSchemaData.js
We now use zoteroTypeSchemaData.js in the connector, so update the build script to generate that.
This commit is contained in:
parent
2dc08a0dfb
commit
43373b77ec
2 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
import FilePicker from 'zotero/modules/filePicker';
|
||||
|
||||
|
||||
(async function () {
|
||||
// Create schema
|
||||
var schema = {"itemTypes":{}, "creatorTypes":{}, "fields":{}};
|
||||
|
@ -77,11 +77,12 @@ import FilePicker from 'zotero/modules/filePicker';
|
|||
resultElem.innerHTML = '<p>Failed.</p>';
|
||||
} else {
|
||||
let schemaFile = Zotero.File.pathToFile(fp.file);
|
||||
schemaFile.append("connectorTypeSchemaData.js");
|
||||
schemaFile.append("zoteroTypeSchemaData.js");
|
||||
await Zotero.File.putContentsAsync(
|
||||
schemaFile,
|
||||
`Zotero.Connector_Types.schema = ${JSON.stringify(schema)}`
|
||||
`var ZOTERO_TYPE_SCHEMA = ${JSON.stringify(schema)};\n\n`
|
||||
+ "if (typeof module !== 'undefined') {\n\tmodule.exports = ZOTERO_TYPE_SCHEMA;\n}\n"
|
||||
);
|
||||
resultElem.innerHTML = `<p>Wrote ${schemaFile} successfully.</p>`;
|
||||
resultElem.innerHTML = `<p>Wrote ${schemaFile.path} successfully.</p>`;
|
||||
}
|
||||
})();
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue