Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
localhost:8888
tls off
root ./website

16 changes: 1 addition & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
default: website/miniLockLib.js website/tests.js website/index.js website/annotated_code.js website/annotated_code

# Create a standalone copy of miniLockLib.js in the website folder for use in web agent windows.
website/miniLockLib.js: library/%.coffee library.compiled/scrypt-async.js
website/miniLockLib.js: library/%.coffee
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thank you.

browserify library.compiled/index.js --standalone miniLockLib > website/miniLockLib.js

# Compile CoffeeScript library files to the library.compiled folder.
library/%.coffee:
coffee --compile --output library.compiled library/*.coffee

# Download scrypt-async.js and save it in the library.compiled folder.
library.compiled/scrypt-async.js:
curl -s https://raw.githubusercontent.com/dchest/scrypt-async-js/master/scrypt-async.js \
> library.compiled/scrypt-async.js

# # Tests

# Compile CoffeeScript tests to the tests.compiled folder.
Expand Down Expand Up @@ -52,15 +47,6 @@ clean:
rm -f website/miniLockLib.js website/tests.js website/annotated_code.js website/index.js
rm -rf website/annotated_code

# Establish a link with [Pow](http://pow.cx/) to serve the `website` folder at `http://minilocklib.dev/`.
pow:
mkdir -p ~/.pow/minilocklib
ln -s $(PWD)/website ~/.pow/minilocklib/public

# Removes files added to your `~/.pow` folder by `make pow`.
unlink_pow:
rm -rf ~/.pow/minilocklib

gh-pages: website/miniLockLib.js website/tests.js website/index.js website/annotated_code.js website/annotated_code
git checkout master
rm -rf gh-pages
Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,28 @@ Pass `data` and `keys` when you `decrypt` a file:

__Digging In__

`brew install node` to install NodeJS and the `npm` package manager.

`brew install caddy` to install [Caddy web server](https://caddyserver.com) for
simple testing.

`git clone https://github.com/45678/miniLockLib.git` to get the source code.

`cd miniLockLib`
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very helpful clarification, thank you.


`npm install -g browserify` which is needed to run `make`.

`npm install -g docco` which is needed to run `make`.

`npm install` to install local packages needed to run `make` tasks.

`make` to compile [CoffeeScript](http://www.coffeescript.org/) files into [ECMAScript](http://www.ecmascript.org/) files in the `library.compiled`, `tests.compiled` and `website` folders.

`make clean` to start over.
`make clean` to remove all generated files and start over.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, good clarification.


Open a new terminal, and `cd miniLockLib` and start Caddy webserver by
running `caddy` which will start server on port `8888`.

`npm run tests` to open the test suite in a web agent `window`.
`npm run test` in the original terminal to run both the NodeJS and Browser test
suites. A new browser window, using your default browser, will be opened and the
NodeJS tests will run in the console.
10 changes: 5 additions & 5 deletions library.compiled/BLAKE2s.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions library.compiled/Blob.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 36 additions & 36 deletions library.compiled/DecryptOperation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion library.compiled/EmailAddress.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 17 additions & 17 deletions library.compiled/EncryptOperation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions library.compiled/ID.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions library.compiled/KeyPairOperation.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading