

Style sheets can be written as CSS or Less, but Less is recommended. Any style sheets in this directory will be loaded and attached to the DOM when your plugin is activated. Style sheets for your plugin should be placed in the styles directory. If you're just subscribing to things on window, you don't need to worry because that's getting torn down anyway. If your plugin is watching any files or holding external resources in any other way, release them here. deactivate(): This optional method is called when the window is shutting down.Use this to do initialization work when your plugin is started (like setting up React Components or binding events). activate(): This optional method is called when your plugin is activated.Your plugin's top-level module can implement the following basic methods: Even if your plugin creates ten different components and appends them to different parts of the DOM, it's all managed from your top-level object. Your plugin's top-level module is a singleton object that manages the lifecycle of your extensions to Inkdrop. If the main key is not in your package.json file, it will look for index.js as the main entry point.
#Inkdrop line return code
The remainder of your code should be placed in the lib directory, and required from your top-level file. In the plugin we just generated, the main package file is lib/wordcount.js. If you want to extend Inkdrop's behavior, your plugin should contain a single top-level module, which you export from whichever file is indicated by the main key in your package.json file. The one generated for you is invalid by design and will prevent you from publishing your package until updated.
#Inkdrop line return update
Warning: Do not forget to update the repository URL. The package.json in the plugin we've just generated looks like this currently: If not specified, mappings in the menus directory are added alphabetically.


If not specified, style sheets in the styles directory are added alphabetically. styles: an Array of Strings identifying the order of the style sheets your plugin needs to load.If this is missing, Inkdrop will default to looking for an index.js. main: the path to the JavaScript file that's the entry point to your package.In addition to some of the regular Node package.json keys available, Inkdrop package.json files have their own additions. This file contains metadata about the plugin, such as the path to its "main" module, library dependencies, and manifests specifying the order in which its resources should be loaded. Similar to Node modules, Inkdrop plugins contain a package.json file in their top-level directory. Let's see what some of these are so we can start messing with them. Not every plugin will have (or need) all of these directories.
