Fix typo in readme
This commit is contained in:
		
							parent
							
								
									ac15ec5035
								
							
						
					
					
						commit
						5cf4e57228
					
				
							
								
								
									
										27
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								README.md
									
									
									
									
									
								
							@ -162,7 +162,7 @@ This is also how your plugin will be released and used by others.
 | 
			
		||||
  > Be careful to set the addonID and addonRef to avoid confliction.
 | 
			
		||||
 | 
			
		||||
- Run `npm install` to set up the plugin and install dependencies. If you don't have NodeJS installed, please download it [here](https://nodejs.org/en/);
 | 
			
		||||
- Run `npm run build` to build the plugin in production mode. Run `npm run build-dev` to build the plugin in development mode. The xpi for installation and the built code is under `builds` folder.
 | 
			
		||||
- Run `npm run build` to build the plugin in production mode. Run `npm run build-dev` to build the plugin in development mode. The xpi for installation and the built code is under `build` folder.
 | 
			
		||||
 | 
			
		||||
  > What the difference between dev & prod?
 | 
			
		||||
  >
 | 
			
		||||
@ -287,15 +287,15 @@ createElement(document, "button", { namespace: "xul" }); // manually set namespa
 | 
			
		||||
 | 
			
		||||
Use Esbuild to build `.ts` source code to `.js`.
 | 
			
		||||
 | 
			
		||||
Use `replace-in-file` to replace keywords and configurations defined in `package.json` in non-build files (`.xul/xhtml`, `.dtd`, and `.properties`).
 | 
			
		||||
Use `replace-in-file` to replace keywords and configurations defined in `package.json` in non-build files (`xhtml`, `.flt`, et. al.).
 | 
			
		||||
 | 
			
		||||
Steps in `scripts/build.js`:
 | 
			
		||||
Steps in `scripts/build.mjs`:
 | 
			
		||||
 | 
			
		||||
1. Clean `./builds`
 | 
			
		||||
2. Copy `./addon` to `./builds`
 | 
			
		||||
3. Esbuild to `./builds/addon/chrome/content/scripts`
 | 
			
		||||
4. Replace `__buildVersion__` and `__buildTime__` in `./builds/addon`
 | 
			
		||||
5. Zip the `./builds/addon` to `./builds/*.xpi`
 | 
			
		||||
1. Clean `./build`
 | 
			
		||||
2. Copy `./addon` to `./build`
 | 
			
		||||
3. Esbuild to `./build/addon/chrome/content/scripts`
 | 
			
		||||
4. Replace `__buildVersion__` and `__buildTime__` in `./build/addon`
 | 
			
		||||
5. Zip the `./build/addon` to `./build/*.xpi`
 | 
			
		||||
 | 
			
		||||
### About Zotero API
 | 
			
		||||
 | 
			
		||||
@ -305,19 +305,18 @@ Zotero docs are outdated and incomplete. Clone <https://github.com/zotero/zotero
 | 
			
		||||
 | 
			
		||||
A trick for finding the API you want:
 | 
			
		||||
 | 
			
		||||
Search the UI label in `.xul`(`.xhtml`)/`.dtd`/`.properties` files, find the corresponding key in locale file. Then search this keys in `.js`/`.jsx` files.
 | 
			
		||||
Search the UI label in `.xhtml`/`.flt` files, find the corresponding key in locale file. Then search this keys in `.js`/`.jsx` files.
 | 
			
		||||
 | 
			
		||||
### Directory Structure
 | 
			
		||||
 | 
			
		||||
This section shows the directory structure of a template.
 | 
			
		||||
 | 
			
		||||
- All `.js/.ts` code files are in `./src`;
 | 
			
		||||
- Addon config files: `./addon/chrome.manifest`, `./addon/install.rdf`, and `./addon/manifest.json`;
 | 
			
		||||
- Addon config files: `./addon/manifest.json`;
 | 
			
		||||
- UI files: `./addon/chrome/content/*.xhtml`.
 | 
			
		||||
- Locale files: `./addon/chrome/locale/[*.dtd, *.properties]`;
 | 
			
		||||
- Resource files: `./addon/chrome/skin/default/__addonRef__/*.dtd`;
 | 
			
		||||
- Preferences file: `./addon/chrome/defaults/preferences/defaults.js`;
 | 
			
		||||
  > Don't break the lines in the `defaults.js`
 | 
			
		||||
- Locale files: `./addon/locale/**/*.flt`;
 | 
			
		||||
- Preferences file: `./addon/prefs.js`;
 | 
			
		||||
  > Don't break the lines in the `prefs.js`
 | 
			
		||||
 | 
			
		||||
```shell
 | 
			
		||||
.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user