-
Notifications
You must be signed in to change notification settings - Fork 49
Contributing
Mottie edited this page Sep 30, 2015
·
1 revision
- Please follow the rules set by the
.editorconfigin the root (learn more here) for all code. - Do not edit files outside of the
srcor_localesdirectory as many files in the root and all files in thedistare replaced.
- Adding more language translations in the
_localesdirectory (see the Language page for more information). - Creating a Safari extension. Hopefully, it won't be difficult to convert a Chrome extension into a Safari extension; but it's impossible to do if you don't own a Mac.
- Adding more unit tests & browser testing of extensions using Selenium, or something similar.
- Install Node.js - it includes npm (node package manager).
- Open a command window in the tablesorter root directory.
- Enter
npm installto load all the necessary dependencies into thenode_modulesfolder; this includes grunt. - Enter
npm install -g grunt-clito install the grunt command-line-interface globablly. - Now you are ready to run grunt!
- This file contains class names & default settings.
- The class names added to elements include ones that are injected into the page (preceeded by
_printliminator_) and elements internal to the popup (iframe for bookmarklets) to make modifying these class names easier. - The file also contains the bookmarklet popup iframe height for when the keyboard commands list is open or closed.
- The message options only apply to extensions.
- For now, the build process uses preprocess which allows using directives to include or exclude blocks of code.
- This includes adding settings from the
options.jsonvia/* @echo settings.XXXX */ - When
// @if MODE='EXT'...// @endifblocks are seen, it refers to extension-only code. - When
// @if MODE='BOOKMARKLET'...// @endifblocks are seen, it refers to bookmarklet-only code. - This applies to many of the files in the
srcdirectory, including:src/printliminator.jssrc/printliminator.scsssrc/bookmarklet/iframe.htmlsrc/bookmarklet/iframe.scsssrc/chrome/popup.htmlsrc/chrome/popup.jssrc/chrome/popup.scss
- This was sort of copied from the method used by the author of Octotree which supports multiple browser extensions in one repository.
- If you know of a better or more efficient method and are willing to contribute, pull requests are welcome!
- Either way, I may end up breaking the
printliminator.jsfile into modules specific for the bookmarklet and extension in the near future.
-
If you would like to test any changes that you made to the repository, run
gruntto perform a basic build.- A basic build creates all the folders within the
distfolder for the bookmarklet & chrome; but it does not compress or convert the files - The bookmarklet files in the root:
printliminator.min.js,bookmark.htmlandindex.htmlare all updated. - Unit tests are so far only performed on the DOM traversing code.
- A basic build creates all the folders within the
-
Using
grunt updatewill:- Update version numbers, using
package.jsonas the source, in themanifest.jsonandprintliminator.jsfiles. - Create the
chrome.zipin thedistfolder. - Create the
chrome.crxextension file... but I haven't found a use for it yet since the Chrome web store only acceptschrome.zipthus far. - Create the
opera.nexextension file... again, Opera is so far only accepting thechrome.zipfile.
- Update version numbers, using