restructure

This commit is contained in:
Florian Dold 2016-02-29 18:03:02 +01:00
parent 30ee3320c7
commit c962e94021
78 changed files with 0 additions and 130 deletions

View File

@ -1,9 +0,0 @@
node_modules/
*.js.map
background/*.js
lib/wallet/*.js
lib/*.js
!lib/module-trampoline.js
popup/*.js
test/tests/*.js
build/

View File

@ -1 +0,0 @@
Settings and project files for IDEs and other tools should be stored here.

View File

@ -1,44 +0,0 @@
<code_scheme name="GNU Taler">
<option name="RIGHT_MARGIN" value="80" />
<option name="WRAP_WHEN_TYPING_REACHES_RIGHT_MARGIN" value="true" />
<TypeScriptCodeStyleSettings>
<option name="SPACE_AFTER_TYPE_COLON" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
</TypeScriptCodeStyleSettings>
<XML>
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
</XML>
<codeStyleSettings language="HTML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="JavaScript">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
<codeStyleSettings language="TypeScript">
<option name="ALIGN_MULTILINE_CHAINED_METHODS" value="true" />
<option name="ALIGN_MULTILINE_PARAMETERS_IN_CALLS" value="true" />
<option name="ALIGN_MULTILINE_ARRAY_INITIALIZER_EXPRESSION" value="true" />
<option name="CALL_PARAMETERS_WRAP" value="5" />
<option name="PREFER_PARAMETERS_WRAP" value="true" />
<option name="METHOD_PARAMETERS_WRAP" value="5" />
<option name="METHOD_CALL_CHAIN_WRAP" value="5" />
<option name="FOR_STATEMENT_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_WRAP" value="5" />
<option name="ARRAY_INITIALIZER_LBRACE_ON_NEXT_LINE" value="true" />
<option name="ARRAY_INITIALIZER_RBRACE_ON_NEXT_LINE" value="true" />
<option name="IF_BRACE_FORCE" value="3" />
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="2" />
<option name="TAB_SIZE" value="2" />
</indentOptions>
</codeStyleSettings>
</code_scheme>

View File

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,11 +0,0 @@
#!/bin/bash
# Start a web server on port 8000 to serve test pages for the wallet extension.
set +x
# directory where our script resides
mydir="$(dirname "$(readlink -f "$0")")"
cd "$mydir/testpages/"
exec python3 -m http.server 8000

View File

@ -1,49 +0,0 @@
TypeScript style
================
Basics:
- Indent with 2 spaces.
- Keep a maximum line length of 120 characters.
- Prefer "double quotes" for strings.
- Never omit optional semicolons.
- Do not put opening braces or brackets on a new line.
- Call functions without spaces: foo(bar)
- Use 'let' instead of 'var' whenever possible.
- Declare "use strict;".
- Use rocket (=>) syntax for anonymous functions. If an anonymous function is
too long, make it a named function.
- Use the strict equality operator (===).
- Document functions with JSDoc comments (http://usejsdoc.org).
JavaScript version:
Stick to ES6 features. Do not rely on any vendor-specific extensions (such as
Firefox often offers). ES6 features not yet supported by major browsers are
okay as long as there is a well-supported and reasonable polyfill (such as
babel) available.
Names:
- Use PascalCase for classes/types, camelCase for variables, functions and
properties, UPPER_SNAKE_CASE for constants, kebab-case for event names.
- Only capitalize the first letter of an acronym in identifiers (e.g. HttpResponseCode).
APIs:
- Prefer 'Promise' to one-shot continuations whenever possible.
- Prefer handlebars templates to poking around in the DOM.
Dependency Injection (DI):
DI is a useful pattern when components need to be replaced by mocks or have
multiple co-existing implementations. But DI also makes code overly generic,
bureaucratic and less readble. Only use DI if there is a definite need for it,
do not use it by default. Inject individual dependencies via class
constructors and avoid service locators.
Misc:
- Do not use ES6 template strings for constructing HTML,
use TSX/JSX literals instead.
- For everything not covered here, stick to this style guide:
https://github.com/airbnb/javascript.

View File

@ -1,16 +0,0 @@
<!doctype html>
<script type="text/javascript">
"use strict";
function talerHandshake() {
document.body.addEventListener('taler-wallet-present', function(e) {
var x = document.getElementById('indicator');
x.innerHTML = 'found!';
});
var evt = new Event('taler-checkout-probe');
document.body.dispatchEvent(evt);
}
window.onload = (e) => talerHandshake();
</script>
Waiting for Taler wallet ... <span id='indicator'></span>