Skip to content

Commit

Permalink
readme: cleanup old cfx related text
Browse files Browse the repository at this point in the history
  • Loading branch information
feinstaub committed Feb 28, 2016
1 parent f132387 commit 13dec32
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 71 deletions.
37 changes: 10 additions & 27 deletions README.dev.md
@@ -1,42 +1,25 @@
NEXT
----
See https://github.com/feinstaub/firefox_addon_local_filesystem_links/issues?q=is%3Aopen+is%3Aissue+milestone%3Anext


WEB SERVER
----------
Used to verify some features, nodejs is required. See readme in \test\README.md for more information.

Webserver can be started by executing: \test\webserver\start_test_server.cmd

- Q: Why don't we use local html files?
- A: Because they are treated differently (compared to remotely served files) by Firefox


CODING STYLE
------------
We follow w3schools.com's style guide and coding conventions, see http://www.w3schools.com/js/js_conventions.asp.

Additionally all pages are coded in order to conform with strict mode, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode.


DESIGN DECISIONS
----------------

* Options Dialog
** Grid:
- We do not use DataTables because the inline editing capablilities are limited
- Positive: can load JSON / JavaScript arrays

- We use http://www.webismymind.be/editablegrid/ instead.
- Drawback: can only load XML (no JavaScript arrays)


DOCUMENTATION
-------------
We use JSDoc for documentation, see http://code.google.com/p/jsdoc-toolkit/wiki/DocExamples


WEB SERVER
----------
Used to verify some features, nodejs is required. See readme in \test\README.md for more information.

Webserver can be started by executing: \test\webserver\start_test_server.cmd

- Q: Why don't we use local html files?
- A: Because they are treated differently (compared to remotely served files) by Firefox


IDE HINTS
---------
IntelliJ IDEA Community Edition 11
Expand Down
52 changes: 12 additions & 40 deletions README.md
@@ -1,4 +1,3 @@
=======
local-filesystem-links
======================

Expand All @@ -8,10 +7,11 @@ This is the alien-local-filesystem-links add-on for Mozilla Firefox.

It contains:

* program (lib/main.js, data/)
* program (lib/, data/)
* tests (test/)
* documentation (doc/)


Features
--------
- Adds a click event to every link that is including `file://` or `smb://` in `href` tag. (smb not working yet)
Expand All @@ -21,18 +21,20 @@ Features
- Right click context menu that opens a text selection that contains a file link + option to reveal the directory of a directly linked file.
- Whitelist option to enable local links only at a specific url e.g. `*.trello.com`


Screenshots
--------
![Addon at local test server](http://img.ctrlv.in/img/15/11/29/565a4e897bd41.png)
![Context menu](http://img.ctrlv.in/img/15/11/29/565a4f43370b1.png)


License
-------
GPLv3 or later
www.mozilla.org/MPL/ v2 or later


Start developing [LINUX DOES NOT WORK YET, see next section about cxf]
Start developing
----------------
Based on https://developer.mozilla.org/en-US/Add-ons/SDK/Tools/jpm

Expand Down Expand Up @@ -60,7 +62,7 @@ The following instructions are for UNIXoid system which are all summarized by th
```
npm install jpm
```
This will install jpm to node_modules/jpm/bin
This will install jpm locally to node_modules/jpm/bin

Add jpm to PATH:
```
Expand All @@ -72,7 +74,7 @@ export PATH=`pwd`/node_modules/jpm/bin:$PATH
mkdir _pt # once
jpm test -p ./_pt # don't forget the ./
# or see https://github.com/mozilla/jpm/issues/287
jpm -b /usr/lib64/firefox/firefox test -p ./_pt
jpm -b -b $(which firefox) test -p ./_pt
jpm -b ~/dev/share/firefox-42.0a1/firefox test -p ./_pt
```

Expand All @@ -90,35 +92,19 @@ jpm xpi
```

Run:

```
jpm run -b $(which firefox)
```

see also start.sdk.sh

Developing with deprecated cxf [Only Linux]
------------------------------

Download SDK:
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation#Installation_on_OS_X_FreeBSD_Linux
and save it so it can be found by start_sdk.sh (see there).

Init SDK:
```
. start_sdk.sh
# There will be some greeting message
```

Run unit tests with currently installed Firefox:
```
cfx test -p _pt
```

Misc notes
----------
Run unit tests with nightly Firefox:
Download from https://nightly.mozilla.org/ and extract
Run, e.g.:
```
cfx test -p _pt -b ~/dev/share/firefox-42.0a1/firefox
```
Run jpm with -b option (see above)

Run test webserver and run firefox with the addon to do integration tests.
We need node to create a webserver because we cannot test properly with local websites.
Expand All @@ -127,17 +113,3 @@ cd test/webserver # because the node server definition uses relative paths
node test-server.nodejs.js
# show something like:
# Server running at http://127.0.0.1:8125/
```
cfx run -p _pr
# or:
cfx run -p _pr -b ~/dev/share/firefox-42.0a1/firefox
```
# Firefox opens with the addon installed (in the addons page there will even be a Debug button)
# Navigate to the url above.
Create xpi file:
```
cfx xpi
```
Empty file.
6 changes: 2 additions & 4 deletions start_sdk.sh
@@ -1,14 +1,12 @@
#!/bin/bash
#!/bin/bash

# call it with source (.)
# e. g. $ . ./start_sdk.sh
# see README.md

# see start_sdk.cmd

cd ~/dev/share/addon-sdk-1.17/
source bin/activate
cd -
# TODO: update this file to work again (moved from cfx to jpm)

#########################
# cfx run -p _p1
Expand Down

0 comments on commit 13dec32

Please sign in to comment.