-
Notifications
You must be signed in to change notification settings - Fork 48
Contributing
Mottie edited this page Sep 30, 2015
·
1 revision
- Please follow the rules set by the
.editorconfig
in the root (learn more here) for all code. - Do not edit files outside of the
src
or_locales
directory as many files in the root and all files in thedist
are replaced.
- Adding more language translations in the
_locales
directory (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 install
to load all the necessary dependencies into thenode_modules
folder; this includes grunt. - Enter
npm install -g grunt-cli
to 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.json
via/* @echo settings.XXXX */
- When
// @if MODE='EXT'
...// @endif
blocks are seen, it refers to extension-only code. - When
// @if MODE='BOOKMARKLET'
...// @endif
blocks are seen, it refers to bookmarklet-only code. - This applies to many of the files in the
src
directory, including:src/printliminator.js
src/printliminator.scss
src/bookmarklet/iframe.html
src/bookmarklet/iframe.scss
src/chrome/popup.html
src/chrome/popup.js
src/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.js
file 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
grunt
to perform a basic build.- A basic build creates all the folders within the
dist
folder for the bookmarklet & chrome; but it does not compress or convert the files - The bookmarklet files in the root:
printliminator.min.js
,bookmark.html
andindex.html
are 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 update
will:- Update version numbers, using
package.json
as the source, in themanifest.json
andprintliminator.js
files. - Create the
chrome.zip
in thedist
folder. - Create the
chrome.crx
extension file... but I haven't found a use for it yet since the Chrome web store only acceptschrome.zip
thus far. - Create the
opera.nex
extension file... again, Opera is so far only accepting thechrome.zip
file.
- Update version numbers, using