diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..6acf711 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +# EditorConfig is awesome: http://EditorConfig.org +root = true + +[*] +charset = utf-8 + +indent_style = space +indent_size = 2 + +quote_type = single + +curly_bracket_next_line = false +spaces_around_operators = true +spaces_around_brackets = false + +[*.md] +max_line_length = 80 diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..7c14c6b --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,28 @@ +{ + "env": { + "browser": true, + "es6": true, + "node": true, + "mocha": true + }, + "extends": "eslint:recommended", + "rules": { + "indent": [ + "error", + 2, + { "SwitchCase": 1 } + ], + "linebreak-style": [ + "error", + "unix" + ], + "quotes": [ + "error", + "single" + ], + "semi": [ + "error", + "always" + ] + } +} diff --git a/.gitignore b/.gitignore index cebd31b..37a20fc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,7 @@ *.log *~ - -node_modules -vendor - +.env +build docs -tmp - -config.json -_vimrc_local.vim - -www/build -www/v*-* -www/manifest.appcache -www/robots.txt -www/sitemap.xml -www/*.html +node_modules +screenshots diff --git a/.jshintrc b/.jshintrc index 6504c56..c801cc7 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,25 +1,7 @@ { - "camelcase": true, - "curly": false, - "eqeqeq": false, - "immed": true, - "latedef": true, - "newcap": true, - "noarg": true, - "noempty": true, - "nonew": true, - "quotmark": true, - "undef": true, - "unused": true, - "strict": true, - "trailing": true, - "boss": true, - "eqnull": true, - "smarttabs": true, - "sub": true, - "browser": true, "node": true, + "esnext": true, "globals": { "describe": false, @@ -27,6 +9,9 @@ "before": false, "after": false, "beforeEach": false, - "afterEach": false + "afterEach": false, + "$": false, + "$$": false, + "browser": false } } diff --git a/.travis.yml b/.travis.yml index b90f603..224fca4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,22 @@ language: node_js -node_js: - - 0.10 -before_script: - - npm install -g grunt-cli +node_js: 6.5.0 +cache: node_modules +addons: + browserstack: + username: + secure: K4GIFsHq0q718Ya89GB67HYQDUtOBRvLqrTZzbCp/jtWCi+aF37lAaQVCeGDm+VzqQ9+W1Ws8DJzpx3BVv/tSdU6VswMGAQzwS/YEhq5B7YXzAK96NiGEBkppR1HfxNYd3T9mXC8EdcLVPvGJ/PBw4T7nCQI/uk5kHoQB1Ci4nGcfLhDFFYzb3cdSrLmhgTUPc6vyfv1Z6S188niIPNpfaRU2euEjH2nTNQOwERtB3hmcfny1nY4eg/EX2h7xZpcgzy33wXhmHff5XghbUrFZynYYtWybimQuXjKx41pC1kR66FFSm5SJcAjQUveccCyteMY4iR6W6SC9s0fHyJauDyb1uuAfLTEjntPryDsF6mRI8NEuQ4I/lcd/CwTO5hDRvD2BR6HPnL9rykn7R2xinb84bdf/XliRNF10YUj/2FE5EAZK/sNZJlQUAwmrh5CFFqaNPO/qz4Wklsd5wqN9iH1N75tzl+IbNNVjeDvR4SUEQJ1Mt/PBIFPwUc0rUbeell9ZWzzonfjbOMYY6H2dRWkLjkLVGCXFjFaFEtkNYwx9H1jauhf/SZRjiHEIy0wJp7qSOAJA5dElInq6THLnF6wKcUINMqXPyzRrjhs1VpfFDR1ZaF3Adho9+S30uz2hWSHUKIxtRunwMOOkOEaMS1eSEkRDG6qkr24xJkZSuI= + access_key: + secure: cevxKW1auEmjDq9D0jl+XyMEQh0iXYNDsDEnpbG5n5e8xT3hR7atkhKM+GXhHxduHI9JC+Z2gG8IqSh7vQRuz7SJ18fctQNJckVzKohYL1YmxEA+zc/Y+Jzh5p8bAwqEl6CGWDirYWzXGOVke/qtouqXmyi1KZb+tf1t6ngOcZkvWxxF9O815D8eXirnhORnjFE7YW+SiwSY1mmgihlDiT+9ZF6gZrW+c35CR1TdTx5U1rTgEp7WqGE9R6xTE1MnvgjHYeDsIPIQ1/Am3M7c/j2l3LZrsmC5nYgjfDop0gNSFPFn02MVuAMeLjWW5xWVv+k2PF3QyA1J3lH4u9cajy7MImemaE70dTMDt/gDKLSaadkhzzQ8VDYp0t3A89mRsMz9rLxmpgIg92sYLZBDmorMUwIcNG5MnOG3F8w1uaafRsO41kVED5VrB5wKs1d3zC9hapyzRJhv4Dr5B0yRmNPlLY9jICf10Q9JckjxXfJRbDzzh+YnxgndS9sGnyH21dVsAQbc3rSgjHb8g5B9Ss2+sLvbCeecAip7D2k0//W9HX+8gUxt8NHRuKThaEmW+XgLLWapVQKdSjc1XVu47TjQ2OaDM69XaC920gPHS2noslIiQfzKwvplVvelozlzc6hlRRKnJxeAhdch1w7tOnFLo3q/0UITt6pXKw7sUs4= +env: + global: + - secure: JsIUny4wOmLQWk6LNbwu/U9YHCEi38JB32M5JmoGsxBQMiU8LpBliK6TzOhJRni/GLwktaJw1C1Yn0dtca8Uce+XwPvBu+HQzmAtXNVSiDFWYuL6DPOlHmWcYTFnA3D5/3pjXe8ikT932zfbOjsgVwFgKNWrNZ68dF9plRLQTTTH5yp5VCgxXiDAi+Mvi4jOPI5vSJx/g684G3PQfUPiIgJDdpzuRry1v8xDMiYvAqYqyDyL/yabTuVapsxiNvZuNa7PgClH7CKbWXd6GEsGEutuaWsJn0vr6UfzRrjoUzff5EbWvr6sCliXJKJKTPGbC6w50aC4xVpTpdxBWJNk9Rs2hcamZU/gTE+ZmJcqkJGPuWVzoJ3x8m1fIgPcDFLbS+zj5LukVUWipuCThEdWUVYQUUCqYxPVh+wqrp0VVU7FrnAg/FmtgWDSVgG7ifv8FafhnA+hHjsaPISjRXKDPqI2HTvlhGKARD4uvVVYRKkiKRw/92OnIxWbZPjIhH9/kmj4JawllnAUaLQWtCSIwLaTuMVZm2anDVTAI+aPCp+k9li+cHW7HN29DZYdf5J5MeCwc2AWXrtpyGDq1fstBvb9iU0qakznIvxjEKNI07muRuvdV4jf5fONBcrt/XqtbK+/WK504nvSJmM6lp0TwLkCIwkUBDdWf1d0awXusVI= + - secure: r0ESTewzBdPVKZSnHaAeKbk63aEiOCumUi/i1+cYmpstDkiUIwuakR+JnfgHaH+KXk8ulKLZ4FKa4l092UsJVicNmyP1PckltESQ4RvHMSv4yXpMu5PGhHwIa7ssYHKqwuMeo9ooAqzzGWXDmQT/ZrbeJ8tkDJa+PGb2s9B8uTopgygN8EBqWSgtVxTS6vdp+5/pdut3fAwuBY3t5x+oy1tgPbTFT64/6tzfuugij5Tq8bp0kTAw3egwYGwUFCHs5a1xS3DZKckAKjcETVaDr/MMbSTRwZN4KwOHy3raDejIsC9STJTysXx3+bLZnvqUNfpP3XxKCjkj8IgRAnj0Cf+eD/M6mv9rGQUNi+sBJrj9t/X9xKmlSCgiE8s0JOKrHhjKvNiWhUyPp67iCWqhrqQ5MLtBU7bJtbebZOhfq4LO2pPbFlJvb45xsQo95TQUz09+a7ghKyMlIVgvlGmOt0gjMlS2Ot4+NmgNQSB/POnsWe7Ato9vwv9x4NHirDoV+zNMmUF9OsADaQBvijBIc5wyYfFLzEjsGR6I8A2MoA6fdWlwdYx6GfFrs21iylA3iBXLinlW7VLhuwbniQA23qFdCUalwQI5bSluaKzyvwCR9ZvhyYC8nCNBjHXg2t3lBNWt8Z81la213OaDiLKYVGpj8wqRTH++V9FAl7gyU48= +deploy: + provider: releases + api_key: + secure: Br5dv5lqX5gpVyG8oV3bibvU2bGyl6TBuxCyPV+5bG5cjBdjO75iFOGb6XYiiCAA6NWegEdd+rmgzFcA+hqjcANJx/pNTKKLscaJ7ZSotCmjAHp09CLEkWRiGWKVHo/Rgv8BbWB4vgw4ueQJ5/lexeMFIqOhgJMAe5ddk9B4n5C2VLjsoaGTU55zGH0HNmmIJzvTWsOu4MZfWBfmG/5Yak6P6tOfuGVe+BodYUsd6meH0VX8Nr6CGCsIyIyhzx264BosuTq7ppNxcMdt11FhFnyL0aI9zPWdck0P1aR6vpQaV6AaYE4LKGoWnVrtv+Lt3mpOiEvrlAQOFJ8drC0BpFVL3G69NZrnXh1ckpNmZXwu8b2Z8dLIXKcDFmvK8rrXIg+dgsgYpiIx01c+QvZ1+2d5V3hbF9ys3o4Y7P7g1Z04bQzM7QxKxfed5gJlwyh0kUXwsnWqZ1azpa+BqEI2zaqnhVuAHltea55trjl4JGhRTSNbXlvQ7i/AYugQACu6Ig9F1ktU2njPG+RvYQzt9Ocj9MFuYIpjgkRXq7bvLnLnOuut7HvB6Jt9/QQFqQJcwTHK7mqUG0Qc1JMgj1HXpF1Ti095D4FObSXMI/1FtVVfgU8yS0QCeN6h1Hpy8cTpTv97WW519PFqIv/DyQrw7bjoQgO2zCmB92X5kEBdnIU= + file_glob: true + file: build/* + skip_cleanup: true + on: + tags: true diff --git a/.vimrc_local.vim b/.vimrc_local.vim deleted file mode 100644 index d78c8d3..0000000 --- a/.vimrc_local.vim +++ /dev/null @@ -1,45 +0,0 @@ -" See https://github.com/chameleoid/style for more information about this file -" -" To use this file: -" -" Install https://code.google.com/p/lh-vim/source/browse/misc/trunk/plugin/local_vimrc.vim -" which loads `_vimrc_local.vim` files, as well as adding the following lines -" to your `~/.vimrc`: -" " Use .vimrc_local.vim instead of _vimrc_local.vim -" let g:local_vimrc = '.vimrc_local.vim' -" -" -" Or, for those who don't wish to set `g:local_vimrc`, you can symlink it to -" `_vimrc_local.vim`: -" ln -s .vimrc_local.vim _vimrc_local.vim` -" -" -" Note: `_vimrc_local.vim` is ignored in our `.gitignore`, so there shouldn't -" be any issues with you using it - -setl smarttab -setl noexpandtab - -if bufname("%") =~? '\.jshintrc$' - setl filetype=javascript -endif - -if bufname("%") =~? '\.md$' - setl filetype=markdown -endif - -if &filetype == 'yaml' - setl expandtab - setl shiftwidth=8 tabstop=8 -endif - -if &filetype == 'markdown' - setl expandtab - setl shiftwidth=2 tabstop=2 - setl linebreak textwidth=80 - setl foldmethod=marker -endif - -if &filetype == 'html' - setl filetype=htmldjango -endif diff --git a/.wdio.conf.js b/.wdio.conf.js new file mode 100644 index 0000000..bb7ea1a --- /dev/null +++ b/.wdio.conf.js @@ -0,0 +1,55 @@ +exports.config = Object.assign( + { + specs: [ './test/**/*.js' ], + exclude: [ ], + + sync: true, + logLevel: 'silent', + coloredLogs: true, + bail: 0, + + screenshotPath: 'screenshots', + baseUrl: 'http://localhost:3000', + + framework: 'mocha', + + mochaOpts: { + ui: 'bdd', + }, + + reporters: [ 'spec' ], + + waitforTimeout: 60000, + connectionRetryTimeout: 90000, + connectionRetryCount: 3, + }, + + (process.env.CI && process.env.BROWSERSTACK_USER) ? { + services: [ 'browserstack' ], + + maxInstances: 1, + + capabilities: [ + { + browserName: 'chrome', + project: 'telepathy-web', + 'browserstack.local': true, + build: process.env.TRAVIS_BUILD_NUMBER || `local-${Math.random()}` + }, + ], + + browserstackLocal: true, + + user: process.env.BROWSERSTACK_USER, + key: process.env.BROWSERSTACK_PASS, + } : { + services: [ 'phantomjs' ], + + maxInstances: 10, + + capabilities: [{ + maxInstances: 10, + browserName: 'phantomjs', + }], + } +); diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 01d0ae0..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,255 +0,0 @@ -module.exports = function(grunt) { - 'use strict'; - - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - - connect: { - test: { - options: { - port: 8000, - base: 'tmp', - }, - }, - - server: { - options: { - hostname: '*', - base: 'www', - keepalive: true, - livereload: true, - }, - }, - }, - - watch: { - packagejson: { - files: '<%= jshint.packagejson %>', - tasks: ['jshint:packagejson', 'pkgreload', 'swig', 'htmlmin', 'shell:link'], - }, - - gruntfile: { - files: '<%= jshint.gruntfile %>', - tasks: ['jshint:gruntfile'], - }, - - js: { - files: '<%= jshint.dist %>', - tasks: ['jshint:dist', 'browserify:dist', 'karma:unit:run'], - }, - - test: { - files: ['<%= jshint.test %>'], - tasks: ['jshint:test', 'karma:unit:run'], - }, - - css: { - files: 'css/**/*.{less,css}', - tasks: ['less'], - }, - - html: { - files: 'html/**/*.{swig,html}', - tasks: ['swig', 'htmlmin', 'karma:unit:run'], - }, - - ln: { - files: 'www/build/**/*', - tasks: ['shell:link'], - }, - - livereload: { - files: [ - 'www/**/*', - '!www/build/**/*', - '!www/img/**/*', - '!www/font/**/*', - '!www/robots.txt', - '!www/sitemap.xml', - ], - - options: { - livereload: true, - }, - }, - }, - - browserify: { - test: { - src: 'js/telepathy.js', - dest: 'tmp/build/js/telepathy.js', - }, - - dist: { - src: 'js/telepathy.js', - dest: 'www/build/js/telepathy.js', - }, - }, - - jshint: { - packagejson: 'package.json', - gruntfile: 'Gruntfile.js', - dist: 'js/**/*.{js,json}', - test: 'test/**/*.{js,json}', - - options: { - jshintrc: '.jshintrc', - }, - }, - - manifest: { - dist: { - src: [ - 'v<%= pkg.version %>/css/*.css', - 'v<%= pkg.version %>/js/*.js', - 'v<%= pkg.version %>/img/*.png', - 'v<%= pkg.version %>/font/font-awesome/*', - 'v<%= pkg.version %>/font/*.woff', - 'index.html', - ], - - dest: 'www/manifest.appcache', - - options: { - basePath: 'www/', - preferOnline: true, - verbose: true, - timestamp: true, - - exclude: [ - 'v<%= pkg.version %>/img/icon-114x114.png', - 'v<%= pkg.version %>/img/startup-320x480.png', - 'v<%= pkg.version %>/img/startup-640x920.png', - 'v<%= pkg.version %>/img/startup-640x1096.png', - ], - }, - }, - }, - - less: { - dist: { - files: { - 'www/build/css/telepathy.css': 'css/telepathy.less', - }, - - options: { - paths: ['css'], - }, - }, - }, - - shell: { - link: { - command: 'rm www/v*-*; ln -s build www/v<%= pkg.version %>', - }, - }, - - swig: { - test: { - dest: 'tmp/', - cwd: 'html', - src: 'index.html', - version: '<%= pkg.version %>', - generateSitemap: false, - generateRobotstxt: false, - init: { root: 'html' }, - }, - - index: { - dest: 'www/', - cwd: 'html', - src: 'index.html', - version: '<%= pkg.version %>', - init: { root: 'html' }, - }, - }, - - uglify: { - dist: { - files: { - 'www/build/js/telepathy.js': 'www/build/js/telepathy.js', - }, - }, - }, - - htmlmin: { - dist: { - files: { - 'www/index.html': 'www/index.html' - }, - - options: { - removeAttributeQuotes: true, - collapseWhitespace: true, - removeComments: true, - }, - }, - }, - - cssmin: { - dist: { - files: { - 'www/build/css/telepathy.css': 'www/build/css/telepathy.css', - }, - }, - }, - - karma: { - unit: { - hostname: '0.0.0.0', - browsers: ['Firefox', 'Chrome', 'PhantomJS'], - }, - - phantom: { - singleRun: true, - browsers: ['PhantomJS'], - }, - - options: { - reporters: 'dots', - frameworks: ['mocha', 'browserify'], - - files: [ - 'tmp/**/*.html', - 'www/**/*.html', - 'test/**/*.html', - 'test/**/*_test.js', - ], - - browserify: { - watch: true, - }, - - preprocessors: { - 'test/**/*.js': ['browserify'], - 'test/**/*.html': ['html2js'], - 'www/**/*.html': ['html2js'], - 'tmp/**/*.html': ['html2js'], - }, - }, - }, - }); - - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-contrib-watch'); - grunt.loadNpmTasks('grunt-browserify'); - grunt.loadNpmTasks('grunt-manifest'); - grunt.loadNpmTasks('grunt-contrib-less'); - grunt.loadNpmTasks('grunt-shell'); - grunt.loadNpmTasks('grunt-swig'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-htmlmin'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-karma'); - - grunt.registerTask('default', ['test', 'build', 'minify']); - grunt.registerTask('test', ['jshint', 'browserify:test', 'swig:test', 'connect:test', 'karma:phantom']); - grunt.registerTask('build', ['browserify:dist', 'less', 'shell:link', 'swig:index', 'manifest']); - grunt.registerTask('minify', ['htmlmin', 'cssmin']); - - grunt.registerTask('pkgreload', 'Reload package.json', function() { - grunt.log.writeln('Reloading package.json'); - grunt.config.data.pkg = grunt.file.readJSON('package.json'); - }); -}; diff --git a/README.md b/README.md deleted file mode 100644 index 199294a..0000000 --- a/README.md +++ /dev/null @@ -1,25 +0,0 @@ -Telepathy Web [![Builds][]][travis] [![Deps][]][gemnasium] [![Donations][]][gittip] -============= -A telepathic password manager for browsers. - -[Builds]: http://img.shields.io/travis-ci/rummik/telepathy-web.png "Build Status" -[travis]: https://travis-ci.org/rummik/telepathy-web -[Deps]: https://gemnasium.com/rummik/telepathy-web.png "Dependency Status" -[gemnasium]: https://gemnasium.com/rummik/telepathy-web -[Donations]: http://img.shields.io/gittip/rummik.png -[gittip]: https://www.gittip.com/rummik/ - - -## Contributing -Please see the [Chameleoid Styleguide][] before contributing. - -Take care to maintain the existing coding style. Add unit tests for any new or -changed functionality. Lint and test your code using [Grunt][]. - -[Chameleoid Styleguide]: https://github.com/chameleoid/style -[Grunt]: http://gruntjs.com/ - - -## License -Copyright (c) 2013 -Licensed under the MPL license. diff --git a/authors b/authors new file mode 100644 index 0000000..0d2dd2c --- /dev/null +++ b/authors @@ -0,0 +1 @@ +Kimberly Zick (https://zick.kim) diff --git a/CONTRIBUTING.md b/contributing.md similarity index 100% rename from CONTRIBUTING.md rename to contributing.md diff --git a/css/font-awesome b/css/font-awesome deleted file mode 120000 index 4e88e4a..0000000 --- a/css/font-awesome +++ /dev/null @@ -1 +0,0 @@ -../node_modules/font-awesome/less/ \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..b5f6ec6 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,146 @@ +'use strict'; + +require('dotenv').config(); + +const browserify = require('browserify'); +const gulp = require('gulp'); +const path = require('path'); +const pkg = require('./package.json'); + +const plug = require('gulp-load-plugins')({ + pattern: [ 'vinyl-*', 'run-sequence' ], + overridePattern: false, + + rename: { + 'gulp-cached': 'cache', + 'gulp-clean-css': 'cleanCSS', + 'vinyl-buffer': 'buffer', + 'vinyl-source-stream': 'source', + }, +}); + +let server; + + +// Destination paths for builds +let dist = 'build'; +let dest = { + css: `${dist}/css`, + font: `${dist}/font`, + html: dist, + ico: dist, + img: `${dist}/img`, + js: `${dist}/js`, +}; + +// Locations of source files +let src = { + css: 'src/css/**/*.{less,css}', + entry: 'src/js/telepathy.js', + font: 'src/font/{,font-awesome/}*.*', + html: 'src/html/**/*.html', + ico: 'src/img/favicon.ico', + img: 'src/img/*.png', + js: 'src/js/*.js', + less: 'src/css/telepathy.less', + swig: 'src/html/index.html', + test: 'src/test/**.{js,json}', +}; + +// Data to be included in Swig templates +let data = { + version: pkg.version, +}; + + +// Task aliases +gulp.task('default', cb => plug.runSequence('build', 'server', 'test', 'server:stop', cb)); + +gulp.task('build', [ 'ico', 'img', 'font', 'css', 'js', 'html' ]); +gulp.task('test', [ 'lint', 'wdio' ]); + +gulp.task('lint', [ 'eslint' ]); +gulp.task('html', [ 'swig' ]); +gulp.task('css', [ 'less' ]); + + +// Tasks +gulp.task('mocha', () => + gulp.src(src.test, { read: false }) + .pipe(plug.mocha({ reporter: 'spec' })) +); + +gulp.task('eslint', () => + gulp.src([ src.js, src.test ]) + .pipe(plug.cache('lint')) + .pipe(plug.eslint()) + .pipe(plug.remember('lint')) + .pipe(plug.eslint.format()) + .pipe(plug.eslint.failAfterError()) +); + +gulp.task('js', () => + browserify(src.entry) + .bundle() + .pipe(plug.source('telepathy.js')) + .pipe(plug.buffer()) + .pipe(gulp.dest(dest.js)) +); + +gulp.task('less', () => + gulp.src(src.less) + .pipe(plug.less()) + .pipe(plug.cleanCSS()) + .pipe(gulp.dest(dest.css)) +); + +gulp.task('swig', () => + gulp.src(src.swig) + .pipe(plug.swig({ + defaults: { cache: false }, + data, + })) + .pipe(gulp.dest(dest.html)) +); + +gulp.task('img', () => + gulp.src(src.img) + .pipe(gulp.dest(dest.img)) +); + +gulp.task('ico', () => + gulp.src(src.ico) + .pipe(gulp.dest(dest.ico)) +); + +gulp.task('font', () => + gulp.src(src.font) + .pipe(gulp.dest(dest.font)) +); + +gulp.task('server', () => { + server = plug.liveServer.static(dist); + server.start(); +}); + +gulp.task('server:stop', () => { + server.stop(); +}); + +gulp.task('wdio', () => + gulp.src(`.wdio.conf.js`) + .pipe(plug.ignoreErrors()) + .pipe(plug.wdio({ wdio: {} })) +); + +gulp.task('watch', () => plug.runSequence('build', 'server', () => { + gulp.watch(src.js, () => plug.runSequence('eslint', 'js')); + gulp.watch(src.css, [ 'css' ]); + gulp.watch(src.html, [ 'html' ]); + gulp.watch(src.img, [ 'img' ]); + gulp.watch(src.font, [ 'font' ]); + + gulp.watch(`${dist}/**/*`, file => + server.notify(file) + ); +})); diff --git a/html/fragments/ios-icons.html b/html/fragments/ios-icons.html deleted file mode 100644 index 977f562..0000000 --- a/html/fragments/ios-icons.html +++ /dev/null @@ -1,4 +0,0 @@ - - - diff --git a/js/ios-standalone.js b/js/ios-standalone.js deleted file mode 100644 index 7ffeffa..0000000 --- a/js/ios-standalone.js +++ /dev/null @@ -1,16 +0,0 @@ -(function() { - 'use strict'; - - var $ = require('zepto-browserify').Zepto; - - // Disable scroll if iOS standalone is happening - if (window.navigator.standalone) { - $(document).on('touchmove', function(event) { - if ($('.modal').hasClass('open')) - return; - - event.preventDefault(); - return false; - }); - } -})(); diff --git a/js/modals.js b/js/modals.js deleted file mode 100644 index cc57b34..0000000 --- a/js/modals.js +++ /dev/null @@ -1,9 +0,0 @@ -(function() { - 'use strict'; - - var $ = require('zepto-browserify').Zepto; - - $('.modal-close').on('click', function() { - $(this).parents('.modal').removeClass('open'); - }); -})(); diff --git a/js/settings.js b/js/settings.js deleted file mode 100644 index 752846a..0000000 --- a/js/settings.js +++ /dev/null @@ -1,34 +0,0 @@ -(function() { - 'use strict'; - - var $ = require('zepto-browserify').Zepto; - var UI = require('./ui.js'); - - $('#open-settings').on('click', function(event) { - event.preventDefault(); - $('#settings').addClass('open'); - }); - - $('#settings input, #settings select').each(function() { - var $this = $(this); - - $this.on('change', function() { - if (!$this.prop('name')) - return; - - UI.settings[$this.prop('name')] = $this.val(); - }); - }); - - $('.save-settings').on('click', function() { - UI.save(); - UI.load(); - }); - - $('.reset-settings').on('click', function() { - UI.load(); - }); - - if (!UI.settings['shared-secret'].length) - $('#settings').addClass('open'); -})(); diff --git a/js/telepathy.js b/js/telepathy.js deleted file mode 100644 index 6c908bd..0000000 --- a/js/telepathy.js +++ /dev/null @@ -1,56 +0,0 @@ -(function() { - 'use strict'; - - var $ = require('zepto-browserify').Zepto; - var _ = require('underscore')._; - var Telepathy = require('telepathy'); - var telepathy = new Telepathy(); - var UI = require('./ui.js'); - - require('./modals'); - require('./settings'); - require('./ios-standalone'); - - $('#domain').on('keydown', _.debounce(function() { - var domain = this.value.replace(/^\s+|\s+$/g, ''); - - if (!domain.length) { - $('#password').val(''); - return; - } - - $('#password').val(telepathy.password({ - domain: domain, - algorithm: UI.settings['algorithm'], - user: UI.settings['default-username'], - secret: UI.settings['shared-secret'], - length: (+$('#length').val()) || UI.settings['default-length'], - index: (+$('#index').val()) || UI.settings['default-index'], - - alphabet: $('input[name=lax]:checked').val() == 'yes' ? - Telepathy.alphabet.base62 : - Telepathy.alphabet.base94, - })); - })); - - $('#password').on('focus click', _.debounce(function() { - this.select(); - })); - - $('.modal-close, input[name=lax], #index, #length').on('click change keydown', function() { - $('#domain').trigger('keydown'); - }); - - $(window).on('blur focus keydown load', _.debounce(function(event) { - // do nothing if we have an open modal - if ($('.modal.open').length) - return; - - // escape key - if (event.type == 'keydown' && event.keyCode != 27) - return; - - $('#domain, #password').val(''); - $('#domain').focus(); - })); -})(); diff --git a/js/ui.js b/js/ui.js deleted file mode 100644 index 2034d44..0000000 --- a/js/ui.js +++ /dev/null @@ -1,74 +0,0 @@ -(function() { - 'use strict'; - - var $ = require('zepto-browserify').Zepto; - var _ = require('underscore')._; - - // Populate values for index/length select boxes - var i; - for (i=4; i<=100; i+=(i<30?1:(i<50?5:10))) - $('#length,#default-length').append(''); - - for (i=0; i<=50; i++) - $('#index,#default-index').append(''); - - var UI = { - settings: {}, - - _settings: { - 'default-username': '', - 'shared-secret': '', - 'save-secret': 'no', - 'algorithm': 'SHA256', - 'default-length': 10, - 'default-index': 0, - }, - - save: function() { - var omit = this.settings['save-secret'] == 'no' ? 'shared-secret' : ''; - var settings = _.omit(this.settings, omit); - - localStorage.telepathyWeb = JSON.stringify({ - settings: settings - }); - - this._settings = this.settings; - }, - - load: function() { - var data = JSON.parse(localStorage.telepathyWeb || '{}'); - var that = this; - - if (!data) return; - - _.each(_.keys(that._settings), function(key) { - if (data.settings && _.has(data.settings, key)) - that._settings[key] = data.settings[key]; - - that.settings[key] = that._settings[key]; - - var $option = $('#settings [name=' + key + ']'); - - switch ($option.prop('type')) { - case 'radio': - $option.each(function() { - var $this = $(this); - $this.prop('checked', $this.val() == that.settings[key]); - }); - break; - - default: - $option.val(that.settings[key]); - break; - } - }); - - $('#index').val(this.settings['default-index']); - $('#length').val(this.settings['default-length']); - }, - }; - - UI.load(); - - module.exports = UI; -})(); diff --git a/LICENSE.md b/license.md similarity index 100% rename from LICENSE.md rename to license.md diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json deleted file mode 100644 index e8bc4e3..0000000 --- a/npm-shrinkwrap.json +++ /dev/null @@ -1,2135 +0,0 @@ -{ - "name": "telepathy-web", - "version": "0.2.12-0.3.3", - "dependencies": { - "font-awesome": { - "version": "4.0.3", - "from": "https://github.com/FortAwesome/Font-Awesome/tarball/v4.0.3", - "resolved": "https://github.com/FortAwesome/Font-Awesome/tarball/v4.0.3", - "dependencies": { - "less": { - "version": "1.4.2", - "from": "less@1.4.2", - "resolved": "https://registry.npmjs.org/less/-/less-1.4.2.tgz", - "dependencies": { - "mime": { - "version": "1.2.11", - "from": "mime@1.2.x" - }, - "request": { - "version": "2.27.0", - "from": "request@>=2.12.0", - "dependencies": { - "qs": { - "version": "0.6.5", - "from": "qs@~0.6.0" - }, - "json-stringify-safe": { - "version": "5.0.0", - "from": "json-stringify-safe@~5.0.0" - }, - "forever-agent": { - "version": "0.5.0", - "from": "forever-agent@~0.5.0", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.5.0.tgz" - }, - "tunnel-agent": { - "version": "0.3.0", - "from": "tunnel-agent@~0.3.0" - }, - "http-signature": { - "version": "0.10.0", - "from": "http-signature@~0.10.0", - "dependencies": { - "assert-plus": { - "version": "0.1.2", - "from": "assert-plus@0.1.2", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz" - }, - "asn1": { - "version": "0.1.11", - "from": "asn1@0.1.11", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" - }, - "ctype": { - "version": "0.5.2", - "from": "ctype@0.5.2", - "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz" - } - } - }, - "hawk": { - "version": "1.0.0", - "from": "hawk@~1.0.0", - "dependencies": { - "hoek": { - "version": "0.9.1", - "from": "hoek@0.9.x" - }, - "boom": { - "version": "0.4.2", - "from": "boom@0.4.x" - }, - "cryptiles": { - "version": "0.2.2", - "from": "cryptiles@0.2.x" - }, - "sntp": { - "version": "0.2.4", - "from": "sntp@0.2.x" - } - } - }, - "aws-sign": { - "version": "0.3.0", - "from": "aws-sign@~0.3.0" - }, - "oauth-sign": { - "version": "0.3.0", - "from": "oauth-sign@~0.3.0" - }, - "cookie-jar": { - "version": "0.3.0", - "from": "cookie-jar@~0.3.0" - }, - "node-uuid": { - "version": "1.4.1", - "from": "node-uuid@~1.4.0" - }, - "form-data": { - "version": "0.1.2", - "from": "form-data@~0.1.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-0.1.2.tgz", - "dependencies": { - "combined-stream": { - "version": "0.0.4", - "from": "combined-stream@~0.0.4", - "dependencies": { - "delayed-stream": { - "version": "0.0.5", - "from": "delayed-stream@0.0.5" - } - } - }, - "async": { - "version": "0.2.9", - "from": "async@~0.2.9" - } - } - } - } - }, - "mkdirp": { - "version": "0.3.5", - "from": "mkdirp@~0.3.4" - }, - "ycssmin": { - "version": "1.0.1", - "from": "ycssmin@>=1.0.1" - } - } - } - } - }, - "grunt": { - "version": "0.4.1", - "from": "grunt@~0.4.1", - "dependencies": { - "async": { - "version": "0.1.22", - "from": "async@~0.1.22" - }, - "coffee-script": { - "version": "1.3.3", - "from": "coffee-script@~1.3.3", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz" - }, - "colors": { - "version": "0.6.2", - "from": "colors@~0.6.0-1" - }, - "dateformat": { - "version": "1.0.2-1.2.3", - "from": "dateformat@1.0.2-1.2.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz" - }, - "eventemitter2": { - "version": "0.4.13", - "from": "eventemitter2@~0.4.9" - }, - "findup-sync": { - "version": "0.1.2", - "from": "findup-sync@~0.1.0", - "dependencies": { - "lodash": { - "version": "1.0.1", - "from": "lodash@~1.0.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.1.tgz" - } - } - }, - "glob": { - "version": "3.1.21", - "from": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "dependencies": { - "graceful-fs": { - "version": "1.2.3", - "from": "graceful-fs@~1.2.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" - }, - "inherits": { - "version": "1.0.0", - "from": "inherits@1" - } - } - }, - "hooker": { - "version": "0.2.3", - "from": "hooker@~0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz" - }, - "iconv-lite": { - "version": "0.2.11", - "from": "iconv-lite@~0.2.5", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.2.11.tgz" - }, - "minimatch": { - "version": "0.2.12", - "from": "minimatch@~0.2", - "dependencies": { - "lru-cache": { - "version": "2.3.1", - "from": "lru-cache@2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz" - }, - "sigmund": { - "version": "1.0.0", - "from": "sigmund@~1.0.0" - } - } - }, - "nopt": { - "version": "1.0.10", - "from": "nopt@~1.0.10", - "dependencies": { - "abbrev": { - "version": "1.0.4", - "from": "abbrev@1" - } - } - }, - "rimraf": { - "version": "2.0.3", - "from": "rimraf@~2.0.2", - "dependencies": { - "graceful-fs": { - "version": "1.1.14", - "from": "graceful-fs@~1.1" - } - } - }, - "lodash": { - "version": "0.9.2", - "from": "lodash@~0.9.0" - }, - "underscore.string": { - "version": "2.2.1", - "from": "underscore.string@~2.2.0rc" - }, - "which": { - "version": "1.0.5", - "from": "which@~1.0.5" - }, - "js-yaml": { - "version": "2.0.5", - "from": "js-yaml@~2.0.2", - "dependencies": { - "argparse": { - "version": "0.1.15", - "from": "argparse@~ 0.1.11", - "dependencies": { - "underscore": { - "version": "1.4.4", - "from": "underscore@~1.4.3" - }, - "underscore.string": { - "version": "2.3.3", - "from": "underscore.string@~2.3.1" - } - } - }, - "esprima": { - "version": "1.0.4", - "from": "esprima@~ 1.0.2" - } - } - } - } - }, - "grunt-browserify": { - "version": "1.2.5", - "from": "grunt-browserify@~1.2.4", - "resolved": "https://registry.npmjs.org/grunt-browserify/-/grunt-browserify-1.2.5.tgz", - "dependencies": { - "browserify": { - "version": "2.27.1", - "from": "browserify@~2.27.0", - "dependencies": { - "module-deps": { - "version": "1.0.2", - "from": "module-deps@~1.0.2", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-1.0.2.tgz", - "dependencies": { - "resolve": { - "version": "0.4.3", - "from": "resolve@~0.4.0" - }, - "detective": { - "version": "2.1.2", - "from": "detective@~2.1.2", - "dependencies": { - "esprima": { - "version": "1.0.2", - "from": "esprima@1.0.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.2.tgz" - }, - "escodegen": { - "version": "0.0.15", - "from": "escodegen@0.0.15", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.15.tgz", - "dependencies": { - "source-map": { - "version": "0.1.29", - "from": "source-map@>= 0.1.2", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz", - "dependencies": { - "amdefine": { - "version": "0.0.8", - "from": "amdefine@>=0.0.4" - } - } - } - } - } - } - }, - "minimist": { - "version": "0.0.5", - "from": "minimist@~0.0.1", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz" - } - } - }, - "browser-pack": { - "version": "0.10.2", - "from": "browser-pack@~0.10.0", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-0.10.2.tgz", - "dependencies": { - "combine-source-map": { - "version": "0.1.3", - "from": "combine-source-map@~0.1.1", - "dependencies": { - "convert-source-map": { - "version": "0.2.6", - "from": "convert-source-map@~0.2.3" - }, - "parse-base64vlq-mappings": { - "version": "0.1.4", - "from": "parse-base64vlq-mappings@~0.1.1" - }, - "inline-source-map": { - "version": "0.2.5", - "from": "inline-source-map@~0.2.1", - "dependencies": { - "source-map": { - "version": "0.1.29", - "from": "source-map@~0.1.25", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz", - "dependencies": { - "amdefine": { - "version": "0.0.8", - "from": "amdefine@>=0.0.4" - } - } - } - } - } - } - } - } - }, - "deps-sort": { - "version": "0.1.1", - "from": "deps-sort@~0.1.1", - "dependencies": { - "minimist": { - "version": "0.0.5", - "from": "minimist@~0.0.1", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz" - } - } - }, - "shell-quote": { - "version": "0.0.1", - "from": "shell-quote@~0.0.1" - }, - "through": { - "version": "2.3.4", - "from": "through@~2.3.4" - }, - "duplexer": { - "version": "0.1.1", - "from": "duplexer@~0.1.1" - }, - "event-stream": { - "version": "3.0.16", - "from": "event-stream@~3.0.15", - "dependencies": { - "duplexer": { - "version": "0.0.4", - "from": "duplexer@~0.0.2" - }, - "from": { - "version": "0.1.3", - "from": "from@~0" - }, - "map-stream": { - "version": "0.0.2", - "from": "map-stream@0.0.2", - "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.2.tgz" - }, - "pause-stream": { - "version": "0.0.10", - "from": "pause-stream@0.0.10", - "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.10.tgz" - }, - "split": { - "version": "0.2.10", - "from": "split@0.2", - "resolved": "https://registry.npmjs.org/split/-/split-0.2.10.tgz" - }, - "stream-combiner": { - "version": "0.0.0", - "from": "stream-combiner@0.0.0", - "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.0.tgz", - "dependencies": { - "duplexer": { - "version": "0.0.2", - "from": "duplexer@0.0.2", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.0.2.tgz" - } - } - } - } - }, - "concat-stream": { - "version": "1.0.1", - "from": "concat-stream@~1.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.0.1.tgz", - "dependencies": { - "bops": { - "version": "0.0.6", - "from": "bops@0.0.6", - "resolved": "https://registry.npmjs.org/bops/-/bops-0.0.6.tgz", - "dependencies": { - "base64-js": { - "version": "0.0.2", - "from": "base64-js@0.0.2", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz" - }, - "to-utf8": { - "version": "0.0.1", - "from": "to-utf8@0.0.1", - "resolved": "https://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz" - } - } - } - } - }, - "insert-module-globals": { - "version": "1.2.1", - "from": "insert-module-globals@~1.2.0", - "dependencies": { - "commondir": { - "version": "0.0.1", - "from": "commondir@~0.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz" - }, - "lexical-scope": { - "version": "0.0.14", - "from": "lexical-scope@~0.0.5", - "dependencies": { - "astw": { - "version": "0.0.0", - "from": "astw@~0.0.0", - "dependencies": { - "esprima": { - "version": "1.0.2", - "from": "esprima@1.0.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.2.tgz" - } - } - } - } - }, - "process": { - "version": "0.5.1", - "from": "process@~0.5.1" - }, - "through": { - "version": "2.2.7", - "from": "through@~2.2.7", - "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz" - }, - "duplexer": { - "version": "0.0.4", - "from": "duplexer@~0.0.3", - "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.0.4.tgz" - }, - "JSONStream": { - "version": "0.4.4", - "from": "JSONStream@~0.4.3", - "dependencies": { - "jsonparse": { - "version": "0.0.5", - "from": "jsonparse@0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz" - } - } - } - } - }, - "syntax-error": { - "version": "0.0.1", - "from": "syntax-error@~0.0.0", - "dependencies": { - "esprima": { - "version": "0.9.9", - "from": "esprima@~0.9.9" - } - } - }, - "browser-resolve": { - "version": "1.1.4", - "from": "browser-resolve@~1.1.0", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.1.4.tgz", - "dependencies": { - "resolve": { - "version": "0.5.1", - "from": "resolve@0.5.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.5.1.tgz" - } - } - }, - "browser-builtins": { - "version": "1.0.7", - "from": "browser-builtins@~1.0.1", - "dependencies": { - "resolve": { - "version": "0.3.1", - "from": "resolve@0.3.x" - }, - "punycode": { - "version": "1.2.3", - "from": "punycode@1.2.x" - }, - "console-browserify": { - "version": "0.1.6", - "from": "console-browserify@0.1.x" - }, - "vm-browserify": { - "version": "0.0.1", - "from": "vm-browserify@0.0.x" - }, - "crypto-browserify": { - "version": "1.0.3", - "from": "crypto-browserify@1.0.x", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.3.tgz" - }, - "http-browserify": { - "version": "0.1.13", - "from": "http-browserify@0.1.x", - "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-0.1.13.tgz", - "dependencies": { - "Base64": { - "version": "0.1.3", - "from": "Base64@~0.1.2" - } - } - }, - "buffer-browserify": { - "version": "0.1.0", - "from": "buffer-browserify@0.1.x", - "resolved": "https://registry.npmjs.org/buffer-browserify/-/buffer-browserify-0.1.0.tgz", - "dependencies": { - "base64-js": { - "version": "0.0.2", - "from": "base64-js@0.0.2", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz" - } - } - }, - "zlib-browserify": { - "version": "0.0.1", - "from": "zlib-browserify@0.0.x", - "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz" - }, - "constants-browserify": { - "version": "0.0.1", - "from": "constants-browserify@0.0.x" - } - } - }, - "inherits": { - "version": "1.0.0", - "from": "inherits@1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz" - }, - "optimist": { - "version": "0.5.2", - "from": "optimist@~0.5.1", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" - } - } - }, - "JSONStream": { - "version": "0.6.4", - "from": "JSONStream@~0.6.4", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.6.4.tgz", - "dependencies": { - "jsonparse": { - "version": "0.0.5", - "from": "jsonparse@0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz" - }, - "through": { - "version": "2.2.7", - "from": "through@~2.2.7", - "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz" - } - } - }, - "umd": { - "version": "1.1.1", - "from": "umd@~1.1.0", - "resolved": "https://registry.npmjs.org/umd/-/umd-1.1.1.tgz", - "dependencies": { - "rfile": { - "version": "1.0.0", - "from": "rfile@~1.0.0", - "resolved": "https://registry.npmjs.org/rfile/-/rfile-1.0.0.tgz", - "dependencies": { - "callsite": { - "version": "1.0.0", - "from": "callsite@~1.0.0" - }, - "resolve": { - "version": "0.3.1", - "from": "resolve@~0.3.0" - } - } - }, - "ruglify": { - "version": "1.0.0", - "from": "ruglify@~1.0.0", - "resolved": "https://registry.npmjs.org/ruglify/-/ruglify-1.0.0.tgz" - }, - "uglify-js": { - "version": "2.2.5", - "from": "uglify-js@~2.2.5", - "dependencies": { - "source-map": { - "version": "0.1.29", - "from": "source-map@~0.1.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz", - "dependencies": { - "amdefine": { - "version": "0.0.8", - "from": "amdefine@>=0.0.4" - } - } - }, - "optimist": { - "version": "0.3.7", - "from": "optimist@~0.3.5", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz" - } - } - } - } - } - } - }, - "parents": { - "version": "0.0.1", - "from": "parents@~0.0.1" - } - } - }, - "browserify-shim": { - "version": "2.0.8", - "from": "browserify-shim@~2.0.8", - "dependencies": { - "through": { - "version": "2.3.4", - "from": "through@~2.3.4" - } - } - } - } - }, - "grunt-contrib-connect": { - "version": "0.5.0", - "from": "grunt-contrib-connect@~0.5.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-0.5.0.tgz", - "dependencies": { - "connect": { - "version": "2.7.11", - "from": "connect@~2.7.11", - "resolved": "https://registry.npmjs.org/connect/-/connect-2.7.11.tgz", - "dependencies": { - "qs": { - "version": "0.6.5", - "from": "qs@0.6.5", - "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.5.tgz" - }, - "formidable": { - "version": "1.0.14", - "from": "formidable@1.0.14", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz" - }, - "cookie-signature": { - "version": "1.0.1", - "from": "cookie-signature@1.0.1", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz" - }, - "buffer-crc32": { - "version": "0.2.1", - "from": "buffer-crc32@0.2.1", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz" - }, - "cookie": { - "version": "0.0.5", - "from": "cookie@0.0.5", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.0.5.tgz" - }, - "send": { - "version": "0.1.1", - "from": "send@0.1.1", - "resolved": "https://registry.npmjs.org/send/-/send-0.1.1.tgz", - "dependencies": { - "mime": { - "version": "1.2.11", - "from": "mime@~1.2.9" - }, - "range-parser": { - "version": "0.0.4", - "from": "range-parser@0.0.4", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz" - } - } - }, - "bytes": { - "version": "0.2.0", - "from": "bytes@0.2.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz" - }, - "fresh": { - "version": "0.1.0", - "from": "fresh@0.1.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz" - }, - "pause": { - "version": "0.0.1", - "from": "pause@0.0.1", - "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz" - }, - "debug": { - "version": "0.7.2", - "from": "debug@*" - } - } - }, - "connect-livereload": { - "version": "0.2.0", - "from": "connect-livereload@~0.2.0" - }, - "open": { - "version": "0.0.4", - "from": "open@0.0.4", - "resolved": "https://registry.npmjs.org/open/-/open-0.0.4.tgz" - } - } - }, - "grunt-contrib-cssmin": { - "version": "0.6.2", - "from": "grunt-contrib-cssmin@~0.6.1", - "resolved": "https://registry.npmjs.org/grunt-contrib-cssmin/-/grunt-contrib-cssmin-0.6.2.tgz", - "dependencies": { - "clean-css": { - "version": "1.1.2", - "from": "clean-css@~1.1.1", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-1.1.2.tgz", - "dependencies": { - "commander": { - "version": "2.0.0", - "from": "commander@2.0.x", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.0.0.tgz" - } - } - }, - "grunt-lib-contrib": { - "version": "0.6.1", - "from": "grunt-lib-contrib@~0.6.0", - "resolved": "https://registry.npmjs.org/grunt-lib-contrib/-/grunt-lib-contrib-0.6.1.tgz", - "dependencies": { - "zlib-browserify": { - "version": "0.0.1", - "from": "zlib-browserify@0.0.1", - "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz" - } - } - } - } - }, - "grunt-contrib-htmlmin": { - "version": "0.1.3", - "from": "grunt-contrib-htmlmin@~0.1.3", - "resolved": "https://registry.npmjs.org/grunt-contrib-htmlmin/-/grunt-contrib-htmlmin-0.1.3.tgz", - "dependencies": { - "html-minifier": { - "version": "0.5.4", - "from": "html-minifier@~0.5.0" - }, - "grunt-lib-contrib": { - "version": "0.6.1", - "from": "grunt-lib-contrib@~0.6.1", - "dependencies": { - "zlib-browserify": { - "version": "0.0.1", - "from": "zlib-browserify@0.0.1", - "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz" - } - } - } - } - }, - "grunt-contrib-jshint": { - "version": "0.6.4", - "from": "grunt-contrib-jshint@~0.6.4", - "dependencies": { - "jshint": { - "version": "2.1.11", - "from": "jshint@~2.1.10", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.1.11.tgz", - "dependencies": { - "shelljs": { - "version": "0.1.4", - "from": "shelljs@0.1.x" - }, - "underscore": { - "version": "1.4.4", - "from": "underscore@1.4.x" - }, - "cli": { - "version": "0.4.5", - "from": "cli@0.4.x", - "dependencies": { - "glob": { - "version": "3.2.6", - "from": "glob@>= 3.1.4", - "dependencies": { - "inherits": { - "version": "2.0.1", - "from": "inherits@2" - } - } - } - } - }, - "minimatch": { - "version": "0.2.12", - "from": "minimatch@0.x.x", - "dependencies": { - "lru-cache": { - "version": "2.3.1", - "from": "lru-cache@2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz" - }, - "sigmund": { - "version": "1.0.0", - "from": "sigmund@~1.0.0" - } - } - }, - "console-browserify": { - "version": "0.1.6", - "from": "console-browserify@0.1.x" - } - } - } - } - }, - "grunt-contrib-less": { - "version": "0.7.0", - "from": "grunt-contrib-less@~0.7.0", - "dependencies": { - "less": { - "version": "1.4.2", - "from": "less@~1.4.0", - "dependencies": { - "mime": { - "version": "1.2.11", - "from": "mime@1.2.x", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz" - }, - "request": { - "version": "2.27.0", - "from": "request@>=2.12.0", - "dependencies": { - "qs": { - "version": "0.6.5", - "from": "qs@~0.6.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.5.tgz" - }, - "json-stringify-safe": { - "version": "5.0.0", - "from": "json-stringify-safe@~5.0.0" - }, - "forever-agent": { - "version": "0.5.0", - "from": "forever-agent@~0.5.0" - }, - "tunnel-agent": { - "version": "0.3.0", - "from": "tunnel-agent@~0.3.0" - }, - "http-signature": { - "version": "0.10.0", - "from": "http-signature@~0.10.0", - "dependencies": { - "assert-plus": { - "version": "0.1.2", - "from": "assert-plus@0.1.2", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-0.1.2.tgz" - }, - "asn1": { - "version": "0.1.11", - "from": "asn1@0.1.11", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.1.11.tgz" - }, - "ctype": { - "version": "0.5.2", - "from": "ctype@0.5.2", - "resolved": "https://registry.npmjs.org/ctype/-/ctype-0.5.2.tgz" - } - } - }, - "hawk": { - "version": "1.0.0", - "from": "hawk@~1.0.0", - "dependencies": { - "hoek": { - "version": "0.9.1", - "from": "hoek@0.9.x" - }, - "boom": { - "version": "0.4.2", - "from": "boom@0.4.x" - }, - "cryptiles": { - "version": "0.2.2", - "from": "cryptiles@0.2.x" - }, - "sntp": { - "version": "0.2.4", - "from": "sntp@0.2.x" - } - } - }, - "aws-sign": { - "version": "0.3.0", - "from": "aws-sign@~0.3.0" - }, - "oauth-sign": { - "version": "0.3.0", - "from": "oauth-sign@~0.3.0" - }, - "cookie-jar": { - "version": "0.3.0", - "from": "cookie-jar@~0.3.0" - }, - "node-uuid": { - "version": "1.4.1", - "from": "node-uuid@~1.4.0" - }, - "form-data": { - "version": "0.1.1", - "from": "form-data@~0.1.0", - "dependencies": { - "combined-stream": { - "version": "0.0.4", - "from": "combined-stream@~0.0.4", - "dependencies": { - "delayed-stream": { - "version": "0.0.5", - "from": "delayed-stream@0.0.5", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-0.0.5.tgz" - } - } - }, - "async": { - "version": "0.2.9", - "from": "async@~0.2.9" - } - } - } - } - }, - "mkdirp": { - "version": "0.3.5", - "from": "mkdirp@~0.3.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" - }, - "ycssmin": { - "version": "1.0.1", - "from": "ycssmin@>=1.0.1" - } - } - }, - "grunt-lib-contrib": { - "version": "0.6.1", - "from": "grunt-lib-contrib@~0.6.0", - "resolved": "https://registry.npmjs.org/grunt-lib-contrib/-/grunt-lib-contrib-0.6.1.tgz", - "dependencies": { - "zlib-browserify": { - "version": "0.0.1", - "from": "zlib-browserify@0.0.1", - "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz" - } - } - } - } - }, - "grunt-contrib-uglify": { - "version": "0.2.4", - "from": "grunt-contrib-uglify@~0.2.4", - "dependencies": { - "uglify-js": { - "version": "2.4.0", - "from": "uglify-js@~2.4.0", - "dependencies": { - "async": { - "version": "0.2.9", - "from": "async@~0.2.6" - }, - "source-map": { - "version": "0.1.29", - "from": "source-map@~0.1.7", - "dependencies": { - "amdefine": { - "version": "0.0.8", - "from": "amdefine@>=0.0.4" - } - } - }, - "optimist": { - "version": "0.3.7", - "from": "optimist@~0.3.5", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2" - } - } - }, - "uglify-to-browserify": { - "version": "1.0.1", - "from": "uglify-to-browserify@~1.0.0" - } - } - }, - "grunt-lib-contrib": { - "version": "0.6.1", - "from": "grunt-lib-contrib@~0.6.1", - "dependencies": { - "zlib-browserify": { - "version": "0.0.1", - "from": "zlib-browserify@0.0.1", - "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz" - } - } - } - } - }, - "grunt-contrib-watch": { - "version": "0.5.3", - "from": "grunt-contrib-watch@~0.5.3", - "dependencies": { - "gaze": { - "version": "0.4.2", - "from": "gaze@~0.4.0", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.4.2.tgz", - "dependencies": { - "globule": { - "version": "0.1.0", - "from": "globule@~0.1.0", - "dependencies": { - "lodash": { - "version": "1.0.1", - "from": "lodash@~1.0.1", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.1.tgz" - }, - "glob": { - "version": "3.1.21", - "from": "glob@~3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "dependencies": { - "graceful-fs": { - "version": "1.2.3", - "from": "graceful-fs@~1.2.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" - }, - "inherits": { - "version": "1.0.0", - "from": "inherits@1" - } - } - }, - "minimatch": { - "version": "0.2.12", - "from": "minimatch@~0.2", - "dependencies": { - "lru-cache": { - "version": "2.3.1", - "from": "lru-cache@2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz" - }, - "sigmund": { - "version": "1.0.0", - "from": "sigmund@~1.0.0" - } - } - } - } - } - } - }, - "tiny-lr": { - "version": "0.0.4", - "from": "tiny-lr@0.0.4", - "resolved": "https://registry.npmjs.org/tiny-lr/-/tiny-lr-0.0.4.tgz", - "dependencies": { - "qs": { - "version": "0.5.6", - "from": "qs@~0.5.2" - }, - "faye-websocket": { - "version": "0.4.4", - "from": "faye-websocket@~0.4.3" - }, - "noptify": { - "version": "0.0.3", - "from": "noptify@latest", - "dependencies": { - "nopt": { - "version": "2.0.0", - "from": "nopt@~2.0.0", - "dependencies": { - "abbrev": { - "version": "1.0.4", - "from": "abbrev@1" - } - } - } - } - }, - "debug": { - "version": "0.7.2", - "from": "debug@~0.7.0" - } - } - } - } - }, - "grunt-karma": { - "version": "0.6.2", - "from": "grunt-karma@~0.6.2", - "resolved": "https://registry.npmjs.org/grunt-karma/-/grunt-karma-0.6.2.tgz", - "dependencies": { - "optimist": { - "version": "0.6.0", - "from": "optimist@~0.6.0", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2" - }, - "minimist": { - "version": "0.0.5", - "from": "minimist@~0.0.1", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz" - } - } - } - } - }, - "grunt-manifest": { - "version": "0.4.0", - "from": "grunt-manifest@~0.4.0" - }, - "grunt-shell": { - "version": "0.3.1", - "from": "grunt-shell@~0.3.1", - "dependencies": { - "stripcolorcodes": { - "version": "0.1.0", - "from": "stripcolorcodes@~0.1.0" - } - } - }, - "grunt-swig": { - "version": "0.1.2", - "from": "grunt-swig@~0.1.0", - "resolved": "https://registry.npmjs.org/grunt-swig/-/grunt-swig-0.1.2.tgz", - "dependencies": { - "swig": { - "version": "0.13.5", - "from": "swig@~> 0.13.2" - } - } - }, - "karma": { - "version": "0.10.2", - "from": "karma@~0.10.0", - "dependencies": { - "di": { - "version": "0.0.1", - "from": "di@~0.0.1" - }, - "socket.io": { - "version": "0.9.16", - "from": "socket.io@~0.9.13", - "dependencies": { - "socket.io-client": { - "version": "0.9.16", - "from": "socket.io-client@0.9.16", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz", - "dependencies": { - "uglify-js": { - "version": "1.2.5", - "from": "uglify-js@1.2.5", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz" - }, - "ws": { - "version": "0.4.31", - "from": "ws@0.4.x", - "resolved": "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz", - "dependencies": { - "commander": { - "version": "0.6.1", - "from": "commander@~0.6.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz" - }, - "nan": { - "version": "0.3.2", - "from": "nan@~0.3.0" - }, - "tinycolor": { - "version": "0.0.1", - "from": "tinycolor@0.x" - }, - "options": { - "version": "0.0.5", - "from": "options@>=0.0.5", - "resolved": "https://registry.npmjs.org/options/-/options-0.0.5.tgz" - } - } - }, - "xmlhttprequest": { - "version": "1.4.2", - "from": "xmlhttprequest@1.4.2", - "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz" - }, - "active-x-obfuscator": { - "version": "0.0.1", - "from": "active-x-obfuscator@0.0.1", - "dependencies": { - "zeparser": { - "version": "0.0.5", - "from": "zeparser@0.0.5" - } - } - } - } - }, - "policyfile": { - "version": "0.0.4", - "from": "policyfile@0.0.4" - }, - "base64id": { - "version": "0.1.0", - "from": "base64id@0.1.0", - "resolved": "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz" - }, - "redis": { - "version": "0.7.3", - "from": "redis@0.7.3", - "resolved": "https://registry.npmjs.org/redis/-/redis-0.7.3.tgz" - } - } - }, - "chokidar": { - "version": "0.6.3", - "from": "chokidar@~0.6", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-0.6.3.tgz" - }, - "glob": { - "version": "3.1.21", - "from": "glob@~3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "dependencies": { - "inherits": { - "version": "1.0.0", - "from": "inherits@1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz" - } - } - }, - "minimatch": { - "version": "0.2.12", - "from": "minimatch@~0.2.11", - "dependencies": { - "lru-cache": { - "version": "2.3.1", - "from": "lru-cache@2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz" - }, - "sigmund": { - "version": "1.0.0", - "from": "sigmund@~1.0.0" - } - } - }, - "http-proxy": { - "version": "0.10.3", - "from": "http-proxy@~0.10", - "dependencies": { - "pkginfo": { - "version": "0.2.3", - "from": "pkginfo@0.2.x" - }, - "utile": { - "version": "0.1.7", - "from": "utile@~0.1.7", - "dependencies": { - "async": { - "version": "0.1.22", - "from": "async@0.1.x" - }, - "deep-equal": { - "version": "0.0.0", - "from": "deep-equal@*" - }, - "i": { - "version": "0.3.2", - "from": "i@0.3.x" - }, - "mkdirp": { - "version": "0.3.5", - "from": "mkdirp@0.x.x", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" - }, - "ncp": { - "version": "0.2.7", - "from": "ncp@0.2.x", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.2.7.tgz" - }, - "rimraf": { - "version": "1.0.9", - "from": "rimraf@1.x.x", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-1.0.9.tgz" - } - } - } - } - }, - "optimist": { - "version": "0.3.7", - "from": "optimist@~0.3.5", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2" - } - } - }, - "coffee-script": { - "version": "1.6.3", - "from": "coffee-script@~1.6", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.3.tgz" - }, - "rimraf": { - "version": "2.1.4", - "from": "rimraf@~2.1", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.1.4.tgz" - }, - "q": { - "version": "0.9.7", - "from": "q@~0.9" - }, - "colors": { - "version": "0.6.0-1", - "from": "colors@0.6.0-1", - "resolved": "https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz" - }, - "lodash": { - "version": "1.1.1", - "from": "lodash@~1.1" - }, - "mime": { - "version": "1.2.11", - "from": "mime@~1.2" - }, - "log4js": { - "version": "0.6.9", - "from": "log4js@~0.6.3", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.9.tgz", - "dependencies": { - "async": { - "version": "0.1.15", - "from": "async@0.1.15", - "resolved": "https://registry.npmjs.org/async/-/async-0.1.15.tgz" - }, - "semver": { - "version": "1.1.4", - "from": "semver@~1.1.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-1.1.4.tgz" - }, - "readable-stream": { - "version": "1.0.17", - "from": "readable-stream@~1.0.2" - } - } - }, - "useragent": { - "version": "2.0.7", - "from": "useragent@~2.0.4", - "dependencies": { - "lru-cache": { - "version": "2.2.4", - "from": "lru-cache@2.2.x" - } - } - }, - "graceful-fs": { - "version": "1.2.3", - "from": "graceful-fs@~1.2.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz" - }, - "connect": { - "version": "2.8.8", - "from": "connect@~2.8.4", - "dependencies": { - "qs": { - "version": "0.6.5", - "from": "qs@0.6.5", - "resolved": "https://registry.npmjs.org/qs/-/qs-0.6.5.tgz" - }, - "formidable": { - "version": "1.0.14", - "from": "formidable@1.0.14", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.0.14.tgz" - }, - "cookie-signature": { - "version": "1.0.1", - "from": "cookie-signature@1.0.1", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.1.tgz" - }, - "buffer-crc32": { - "version": "0.2.1", - "from": "buffer-crc32@0.2.1", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz" - }, - "cookie": { - "version": "0.1.0", - "from": "cookie@0.1.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz" - }, - "send": { - "version": "0.1.4", - "from": "send@0.1.4", - "resolved": "https://registry.npmjs.org/send/-/send-0.1.4.tgz", - "dependencies": { - "range-parser": { - "version": "0.0.4", - "from": "range-parser@0.0.4", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz" - } - } - }, - "bytes": { - "version": "0.2.0", - "from": "bytes@0.2.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-0.2.0.tgz" - }, - "fresh": { - "version": "0.2.0", - "from": "fresh@0.2.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.2.0.tgz" - }, - "pause": { - "version": "0.0.1", - "from": "pause@0.0.1", - "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz" - }, - "uid2": { - "version": "0.0.2", - "from": "uid2@0.0.2", - "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.2.tgz" - }, - "debug": { - "version": "0.7.2", - "from": "debug@*" - }, - "methods": { - "version": "0.0.1", - "from": "methods@0.0.1", - "resolved": "https://registry.npmjs.org/methods/-/methods-0.0.1.tgz" - } - } - } - } - }, - "karma-browserify": { - "version": "0.0.4", - "from": "karma-browserify@~0.0.4", - "dependencies": { - "browserify": { - "version": "2.18.1", - "from": "browserify@~2.18.1", - "dependencies": { - "module-deps": { - "version": "0.10.3", - "from": "module-deps@~0.10.3", - "dependencies": { - "resolve": { - "version": "0.4.3", - "from": "resolve@~0.4.0" - }, - "detective": { - "version": "2.1.2", - "from": "detective@~2.1.2", - "dependencies": { - "esprima": { - "version": "1.0.2", - "from": "esprima@1.0.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.2.tgz" - }, - "escodegen": { - "version": "0.0.15", - "from": "escodegen@0.0.15", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.15.tgz", - "dependencies": { - "source-map": { - "version": "0.1.29", - "from": "source-map@>= 0.1.2", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz", - "dependencies": { - "amdefine": { - "version": "0.0.8", - "from": "amdefine@>=0.0.4" - } - } - } - } - } - } - }, - "concat-stream": { - "version": "1.0.1", - "from": "concat-stream@~1.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.0.1.tgz", - "dependencies": { - "bops": { - "version": "0.0.6", - "from": "bops@0.0.6", - "resolved": "https://registry.npmjs.org/bops/-/bops-0.0.6.tgz", - "dependencies": { - "base64-js": { - "version": "0.0.2", - "from": "base64-js@0.0.2", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz" - }, - "to-utf8": { - "version": "0.0.1", - "from": "to-utf8@0.0.1", - "resolved": "https://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz" - } - } - } - } - } - } - }, - "browser-pack": { - "version": "0.9.4", - "from": "browser-pack@~0.9.2", - "dependencies": { - "combine-source-map": { - "version": "0.1.3", - "from": "combine-source-map@~0.1.1", - "dependencies": { - "convert-source-map": { - "version": "0.2.6", - "from": "convert-source-map@~0.2.3" - }, - "parse-base64vlq-mappings": { - "version": "0.1.4", - "from": "parse-base64vlq-mappings@~0.1.1" - }, - "inline-source-map": { - "version": "0.2.5", - "from": "inline-source-map@~0.2.1", - "dependencies": { - "source-map": { - "version": "0.1.29", - "from": "source-map@~0.1.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz", - "dependencies": { - "amdefine": { - "version": "0.0.8", - "from": "amdefine@>=0.0.4" - } - } - } - } - } - } - } - } - }, - "shell-quote": { - "version": "0.0.1", - "from": "shell-quote@~0.0.1" - }, - "duplexer": { - "version": "0.0.4", - "from": "duplexer@~0.0.2" - }, - "concat-stream": { - "version": "0.1.1", - "from": "concat-stream@~0.1.1" - }, - "insert-module-globals": { - "version": "0.2.1", - "from": "insert-module-globals@~0.2.0", - "dependencies": { - "commondir": { - "version": "0.0.1", - "from": "commondir@~0.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz" - }, - "lexical-scope": { - "version": "0.0.14", - "from": "lexical-scope@~0.0.5", - "dependencies": { - "astw": { - "version": "0.0.0", - "from": "astw@~0.0.0", - "dependencies": { - "esprima": { - "version": "1.0.2", - "from": "esprima@1.0.2", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.2.tgz" - } - } - } - } - }, - "process": { - "version": "0.5.1", - "from": "process@~0.5.1" - }, - "through": { - "version": "2.2.7", - "from": "through@~2.2.7", - "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz" - }, - "JSONStream": { - "version": "0.4.4", - "from": "JSONStream@~0.4.3", - "dependencies": { - "jsonparse": { - "version": "0.0.5", - "from": "jsonparse@0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz" - } - } - } - } - }, - "syntax-error": { - "version": "0.0.1", - "from": "syntax-error@~0.0.0", - "dependencies": { - "esprima": { - "version": "0.9.9", - "from": "esprima@~0.9.9" - } - } - }, - "browser-resolve": { - "version": "1.0.1", - "from": "browser-resolve@git://github.com/substack/node-browser-resolve.git#dir-replace", - "resolved": "git://github.com/substack/node-browser-resolve.git#2bf4edad2205a05ebfe8fe1b836401120081ebc5", - "dependencies": { - "resolve": { - "version": "0.4.0", - "from": "resolve@0.4.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.4.0.tgz" - } - } - }, - "browser-builtins": { - "version": "1.0.7", - "from": "browser-builtins@~1.0.1", - "dependencies": { - "resolve": { - "version": "0.3.1", - "from": "resolve@~0.3.0" - }, - "punycode": { - "version": "1.2.3", - "from": "punycode@1.2.x" - }, - "console-browserify": { - "version": "0.1.6", - "from": "console-browserify@0.1.x" - }, - "vm-browserify": { - "version": "0.0.1", - "from": "vm-browserify@0.0.x" - }, - "crypto-browserify": { - "version": "1.0.3", - "from": "crypto-browserify@1.0.x", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.3.tgz" - }, - "http-browserify": { - "version": "0.1.13", - "from": "http-browserify@0.1.x", - "resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-0.1.13.tgz", - "dependencies": { - "concat-stream": { - "version": "1.0.1", - "from": "concat-stream@~1.0.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.0.1.tgz", - "dependencies": { - "bops": { - "version": "0.0.6", - "from": "bops@0.0.6", - "resolved": "https://registry.npmjs.org/bops/-/bops-0.0.6.tgz", - "dependencies": { - "base64-js": { - "version": "0.0.2", - "from": "base64-js@0.0.2", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz" - }, - "to-utf8": { - "version": "0.0.1", - "from": "to-utf8@0.0.1", - "resolved": "https://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz" - } - } - } - } - }, - "Base64": { - "version": "0.1.3", - "from": "Base64@~0.1.2" - } - } - }, - "buffer-browserify": { - "version": "0.1.0", - "from": "buffer-browserify@0.1.x", - "dependencies": { - "base64-js": { - "version": "0.0.2", - "from": "base64-js@0.0.2", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.2.tgz" - } - } - }, - "zlib-browserify": { - "version": "0.0.1", - "from": "zlib-browserify@0.0.x", - "resolved": "https://registry.npmjs.org/zlib-browserify/-/zlib-browserify-0.0.1.tgz" - }, - "constants-browserify": { - "version": "0.0.1", - "from": "constants-browserify@0.0.x" - } - } - }, - "inherits": { - "version": "1.0.0", - "from": "inherits@~1.0.0" - }, - "optimist": { - "version": "0.5.2", - "from": "optimist@~0.5.1", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2" - } - } - }, - "JSONStream": { - "version": "0.6.4", - "from": "JSONStream@~0.6.4", - "dependencies": { - "jsonparse": { - "version": "0.0.5", - "from": "jsonparse@0.0.5", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-0.0.5.tgz" - }, - "through": { - "version": "2.2.7", - "from": "through@~2.2.7", - "resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz" - } - } - }, - "umd": { - "version": "1.1.1", - "from": "umd@~1.1.0", - "resolved": "https://registry.npmjs.org/umd/-/umd-1.1.1.tgz", - "dependencies": { - "rfile": { - "version": "1.0.0", - "from": "rfile@~1.0.0", - "dependencies": { - "callsite": { - "version": "1.0.0", - "from": "callsite@~1.0.0" - }, - "resolve": { - "version": "0.3.1", - "from": "resolve@~0.3.0" - } - } - }, - "ruglify": { - "version": "1.0.0", - "from": "ruglify@~1.0.0" - }, - "uglify-js": { - "version": "2.2.5", - "from": "uglify-js@~2.2.5", - "dependencies": { - "source-map": { - "version": "0.1.29", - "from": "source-map@~0.1.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.29.tgz", - "dependencies": { - "amdefine": { - "version": "0.0.8", - "from": "amdefine@>=0.0.4" - } - } - }, - "optimist": { - "version": "0.3.7", - "from": "optimist@~0.3.5", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2" - } - } - } - } - } - } - } - } - }, - "through": { - "version": "2.3.4", - "from": "through@~2.3.4" - }, - "chokidar": { - "version": "0.6.3", - "from": "chokidar@~0.6.2" - } - } - }, - "karma-chrome-launcher": { - "version": "0.1.0", - "from": "karma-chrome-launcher@*" - }, - "karma-coffee-preprocessor": { - "version": "0.1.0", - "from": "karma-coffee-preprocessor@*", - "dependencies": { - "coffee-script": { - "version": "1.6.3", - "from": "coffee-script@1.6.3", - "resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.6.3.tgz" - } - } - }, - "karma-firefox-launcher": { - "version": "0.1.0", - "from": "karma-firefox-launcher@*" - }, - "karma-html2js-preprocessor": { - "version": "0.1.0", - "from": "karma-html2js-preprocessor@*" - }, - "karma-jasmine": { - "version": "0.1.3", - "from": "karma-jasmine@*" - }, - "karma-mocha": { - "version": "0.1.0", - "from": "karma-mocha@~0.1.0" - }, - "karma-phantomjs-launcher": { - "version": "0.1.0", - "from": "karma-phantomjs-launcher@*", - "dependencies": { - "phantomjs": { - "version": "1.9.2-1", - "from": "phantomjs@~1.9", - "resolved": "https://registry.npmjs.org/phantomjs/-/phantomjs-1.9.2-1.tgz", - "dependencies": { - "adm-zip": { - "version": "0.2.1", - "from": "adm-zip@0.2.1", - "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.2.1.tgz" - }, - "kew": { - "version": "0.1.7", - "from": "kew@~0.1.7" - }, - "ncp": { - "version": "0.4.2", - "from": "ncp@0.4.2", - "resolved": "https://registry.npmjs.org/ncp/-/ncp-0.4.2.tgz" - }, - "npmconf": { - "version": "0.0.24", - "from": "npmconf@0.0.24", - "resolved": "https://registry.npmjs.org/npmconf/-/npmconf-0.0.24.tgz", - "dependencies": { - "config-chain": { - "version": "1.1.8", - "from": "config-chain@~1.1.1", - "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.8.tgz", - "dependencies": { - "proto-list": { - "version": "1.2.2", - "from": "proto-list@~1.2.1" - } - } - }, - "inherits": { - "version": "1.0.0", - "from": "inherits@~1.0.0", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz" - }, - "once": { - "version": "1.1.1", - "from": "once@~1.1.1", - "resolved": "https://registry.npmjs.org/once/-/once-1.1.1.tgz" - }, - "osenv": { - "version": "0.0.3", - "from": "osenv@0.0.3", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.0.3.tgz" - }, - "nopt": { - "version": "2.1.2", - "from": "nopt@2", - "dependencies": { - "abbrev": { - "version": "1.0.4", - "from": "abbrev@1" - } - } - }, - "semver": { - "version": "1.1.4", - "from": "semver@~1.1.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-1.1.4.tgz" - }, - "ini": { - "version": "1.1.0", - "from": "ini@~1.1.0" - } - } - }, - "mkdirp": { - "version": "0.3.5", - "from": "mkdirp@0.3.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" - }, - "rimraf": { - "version": "2.0.3", - "from": "rimraf@~2.0.2", - "dependencies": { - "graceful-fs": { - "version": "1.1.14", - "from": "graceful-fs@~1.1" - } - } - }, - "which": { - "version": "1.0.5", - "from": "which@~1.0.5" - } - } - } - } - }, - "karma-requirejs": { - "version": "0.1.0", - "from": "karma-requirejs@*" - }, - "karma-script-launcher": { - "version": "0.1.0", - "from": "karma-script-launcher@*" - }, - "mocha": { - "version": "1.13.0", - "from": "mocha@*", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-1.13.0.tgz", - "dependencies": { - "commander": { - "version": "0.6.1", - "from": "commander@0.6.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz" - }, - "growl": { - "version": "1.7.0", - "from": "growl@1.7.x" - }, - "jade": { - "version": "0.26.3", - "from": "jade@0.26.3", - "resolved": "https://registry.npmjs.org/jade/-/jade-0.26.3.tgz", - "dependencies": { - "mkdirp": { - "version": "0.3.0", - "from": "mkdirp@0.3.0", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.0.tgz" - } - } - }, - "diff": { - "version": "1.0.7", - "from": "diff@1.0.7", - "resolved": "https://registry.npmjs.org/diff/-/diff-1.0.7.tgz" - }, - "debug": { - "version": "0.7.2", - "from": "debug@*" - }, - "mkdirp": { - "version": "0.3.5", - "from": "mkdirp@0.3.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz" - }, - "glob": { - "version": "3.2.3", - "from": "glob@3.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.3.tgz", - "dependencies": { - "minimatch": { - "version": "0.2.12", - "from": "minimatch@~0.2.11", - "dependencies": { - "lru-cache": { - "version": "2.3.1", - "from": "lru-cache@2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.3.1.tgz" - }, - "sigmund": { - "version": "1.0.0", - "from": "sigmund@~1.0.0" - } - } - }, - "graceful-fs": { - "version": "2.0.1", - "from": "graceful-fs@~2.0.0", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-2.0.1.tgz" - }, - "inherits": { - "version": "2.0.1", - "from": "inherits@2" - } - } - } - } - }, - "should": { - "version": "1.3.0", - "from": "should@~1.3.0", - "resolved": "https://registry.npmjs.org/should/-/should-1.3.0.tgz" - }, - "telepathy": { - "version": "0.3.3-alpha", - "from": "telepathy@~0.3.3", - "resolved": "https://registry.npmjs.org/telepathy/-/telepathy-0.3.3-alpha.tgz", - "dependencies": { - "bigdecimal": { - "version": "0.6.1", - "from": "bigdecimal@*" - }, - "optimist": { - "version": "0.6.0", - "from": "optimist@*", - "dependencies": { - "wordwrap": { - "version": "0.0.2", - "from": "wordwrap@~0.0.2" - }, - "minimist": { - "version": "0.0.5", - "from": "minimist@~0.0.1" - } - } - }, - "crypto-js": { - "version": "3.1.2-1", - "from": "crypto-js@*" - } - } - }, - "underscore": { - "version": "1.5.2", - "from": "underscore@~1.5.1" - }, - "zepto-browserify": { - "version": "1.0.0", - "from": "zepto-browserify@~1.0.0" - } - } -} diff --git a/package.json b/package.json index 9ac3c4d..34ca23a 100644 --- a/package.json +++ b/package.json @@ -1,56 +1,64 @@ { "name": "telepathy-web", "description": "A telepathic password manager for browsers", - "version": "0.2.12-0.3.3", + "version": "0.2.13-0.4.1", "private": true, - "homepage": "https://github.com/rummik/telepathy-web", - "author": { - "name": "rummik", - "email": "r@9k1.us", - "url": "http://www.rummik.com/" - }, + "homepage": "https://github.com/chameleoid/telepathy-web", "repository": { "type": "git", - "url": "git://github.com/rummik/telepathy-web.git" + "url": "git://github.com/chameleoid/telepathy-web.git" }, "bugs": { - "url": "https://github.com/rummik/telepathy-web/issues" + "url": "https://github.com/chameleoid/telepathy-web/issues" }, "licenses": [ { "type": "MPL", - "url": "https://github.com/rummik/telepathy-web/blob/master/LICENSE.md" + "url": "https://github.com/chameleoid/telepathy-web/blob/master/license.md" } ], "engines": { - "node": ">= 0.8.0" + "node": ">= 6.5.0" }, "scripts": { - "test": "grunt test" + "test": "gulp" }, "dependencies": { - "telepathy": "~0.3.3", - "zepto-browserify": "~1.0.0", - "underscore": "~1.5.1", + "telepathy": "^0.4.1-alpha", + "zepto-browserify": "^1.1.6-1", + "underscore": "^1.8.3", "font-awesome": "https://github.com/FortAwesome/Font-Awesome/tarball/v4.0.3" }, "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-jshint": "~0.6.4", - "grunt-contrib-connect": "~0.5.0", - "grunt-contrib-watch": "~0.5.3", - "grunt-browserify": "~1.2.4", - "grunt-manifest": "~0.4.0", - "grunt-contrib-less": "~0.7.0", - "grunt-shell": "~0.3.1", - "grunt-swig": "~0.1.0", - "grunt-contrib-uglify": "~0.2.4", - "grunt-contrib-htmlmin": "~0.1.3", - "grunt-contrib-cssmin": "~0.6.1", - "grunt-karma": "~0.6.2", - "karma-browserify": "~0.0.4", - "karma-mocha": "~0.1.0", - "should": "~1.3.0" + "browserify": "^14.5.0", + "dotenv": "^4.0.0", + "gulp": "^3.9.1", + "gulp-cached": "^1.1.1", + "gulp-clean-css": "^3.9.0", + "gulp-data": "^1.2.1", + "gulp-eslint": "^4.0.0", + "gulp-htmlclean": "^2.7.15", + "gulp-ignore-errors": "0.0.4", + "gulp-less": "^3.3.2", + "gulp-live-server": "0.0.31", + "gulp-load-plugins": "^1.5.0", + "gulp-mocha": "^4.3.1", + "gulp-remember": "^0.3.1", + "gulp-sourcemaps": "^2.6.1", + "gulp-swig": "^0.8.0", + "gulp-uglify": "^3.0.0", + "gulp-wdio": "^1.0.8", + "less": "^2.7.2", + "mocha": "^4.0.1", + "run-sequence": "^2.2.0", + "should": "^13.1.2", + "vinyl-buffer": "^1.0.0", + "vinyl-source-stream": "^1.1.0", + "wdio-browserstack-service": "^0.1.13", + "wdio-junit-reporter": "^0.3.1", + "wdio-mocha-framework": "^0.5.11", + "wdio-phantomjs-service": "^0.2.2", + "wdio-spec-reporter": "^0.1.2" }, "keywords": [ "telepathic", diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..0eda2ff --- /dev/null +++ b/readme.md @@ -0,0 +1,25 @@ +Telepathy Web [![Builds][]][travis] [![Deps][]][gemnasium] [![Browsers][]][browserstack] +============= +A telepathic password manager for browsers. + +[Builds]: http://img.shields.io/travis-ci/chameleoid/telepathy-web.png "Build Status" +[travis]: https://travis-ci.org/chameleoid/telepathy-web +[Deps]: https://img.shields.io/gemnasium/chameleoid/telepathy-web.png "Dependency Status" +[gemnasium]: https://gemnasium.com/chameleoid/telepathy-web +[Browsers]: https://www.browserstack.com/automate/badge.svg?badge_key=blEzN0RpcGFPeDJJZjZlZDd4bnpJTWN2QU5Md2F6OWovUS9xbGd5aWhPVT0tLUVzTUUwcEVBR05oTDA4QzBRMlNDbHc9PQ==--743532cf005d5b574d9e307e32053aa45b6c5c5f "BrowserStack Status" +[browserstack]: https://www.browserstack.com/automate/public-build/blEzN0RpcGFPeDJJZjZlZDd4bnpJTWN2QU5Md2F6OWovUS9xbGd5aWhPVT0tLUVzTUUwcEVBR05oTDA4QzBRMlNDbHc9PQ==--743532cf005d5b574d9e307e32053aa45b6c5c5f + + +## Contributing +Please see the [Chameleoid Styleguide][] before contributing. + +Take care to maintain the existing coding style. Add unit tests for any new or +changed functionality. Lint and test your code using [Gulp][]. + +[Chameleoid Styleguide]: https://github.com/chameleoid/style +[Gulp]: http://gulpjs.com/ + + +## License +Copyright (c) 2012-2017 Chameleoid and Kimberly Zick (rummik) +Licensed under the MPL. diff --git a/css/content.less b/src/css/content.less similarity index 100% rename from css/content.less rename to src/css/content.less diff --git a/css/elements.less b/src/css/elements.less similarity index 100% rename from css/elements.less rename to src/css/elements.less diff --git a/src/css/font-awesome b/src/css/font-awesome new file mode 120000 index 0000000..78aa215 --- /dev/null +++ b/src/css/font-awesome @@ -0,0 +1 @@ +../../node_modules/font-awesome/less \ No newline at end of file diff --git a/css/fonts.less b/src/css/fonts.less similarity index 100% rename from css/fonts.less rename to src/css/fonts.less diff --git a/css/modal.less b/src/css/modal.less similarity index 100% rename from css/modal.less rename to src/css/modal.less diff --git a/css/responsive.less b/src/css/responsive.less similarity index 100% rename from css/responsive.less rename to src/css/responsive.less diff --git a/css/telepathy.less b/src/css/telepathy.less similarity index 100% rename from css/telepathy.less rename to src/css/telepathy.less diff --git a/www/font/Exo-ExtraLight.ttf b/src/font/Exo-ExtraLight.ttf similarity index 100% rename from www/font/Exo-ExtraLight.ttf rename to src/font/Exo-ExtraLight.ttf diff --git a/www/font/Exo-ExtraLight.woff b/src/font/Exo-ExtraLight.woff similarity index 100% rename from www/font/Exo-ExtraLight.woff rename to src/font/Exo-ExtraLight.woff diff --git a/www/font/Exo-ExtraLightItalic.ttf b/src/font/Exo-ExtraLightItalic.ttf similarity index 100% rename from www/font/Exo-ExtraLightItalic.ttf rename to src/font/Exo-ExtraLightItalic.ttf diff --git a/www/font/Exo.LICENSE.txt b/src/font/Exo.LICENSE.txt similarity index 100% rename from www/font/Exo.LICENSE.txt rename to src/font/Exo.LICENSE.txt diff --git a/www/font/UbuntuMono.LICENSE.txt b/src/font/UbuntuMono.LICENSE.txt similarity index 100% rename from www/font/UbuntuMono.LICENSE.txt rename to src/font/UbuntuMono.LICENSE.txt diff --git a/www/font/UbuntuMono.woff b/src/font/UbuntuMono.woff similarity index 100% rename from www/font/UbuntuMono.woff rename to src/font/UbuntuMono.woff diff --git a/www/font/font-awesome b/src/font/font-awesome similarity index 100% rename from www/font/font-awesome rename to src/font/font-awesome diff --git a/src/html/fragments/ios-icons.html b/src/html/fragments/ios-icons.html new file mode 100644 index 0000000..75cff12 --- /dev/null +++ b/src/html/fragments/ios-icons.html @@ -0,0 +1,4 @@ + + + diff --git a/html/fragments/ios-startup-images.html b/src/html/fragments/ios-startup-images.html similarity index 75% rename from html/fragments/ios-startup-images.html rename to src/html/fragments/ios-startup-images.html index 0a68bd7..91bb3cc 100644 --- a/html/fragments/ios-startup-images.html +++ b/src/html/fragments/ios-startup-images.html @@ -1,14 +1,14 @@ - - - diff --git a/html/index.html b/src/html/index.html similarity index 84% rename from html/index.html rename to src/html/index.html index 71b369b..7642b78 100644 --- a/html/index.html +++ b/src/html/index.html @@ -1,5 +1,5 @@ - + Telepathy @@ -14,7 +14,7 @@ {% include "fragments/ios-icons.html" %} {% include "fragments/ios-startup-images.html" %} - + @@ -108,18 +108,11 @@

Telepathyv{{ version }} - A telepathic p - + diff --git a/www/img/background.png b/src/img/background.png similarity index 100% rename from www/img/background.png rename to src/img/background.png diff --git a/www/favicon.ico b/src/img/favicon.ico similarity index 100% rename from www/favicon.ico rename to src/img/favicon.ico diff --git a/www/img/icon-114x114.png b/src/img/icon-114x114.png similarity index 100% rename from www/img/icon-114x114.png rename to src/img/icon-114x114.png diff --git a/www/img/startup-320x480.png b/src/img/startup-320x480.png similarity index 100% rename from www/img/startup-320x480.png rename to src/img/startup-320x480.png diff --git a/www/img/startup-640x1096.png b/src/img/startup-640x1096.png similarity index 100% rename from www/img/startup-640x1096.png rename to src/img/startup-640x1096.png diff --git a/www/img/startup-640x920.png b/src/img/startup-640x920.png similarity index 100% rename from www/img/startup-640x920.png rename to src/img/startup-640x920.png diff --git a/src/js/ios-standalone.js b/src/js/ios-standalone.js new file mode 100644 index 0000000..0c07647 --- /dev/null +++ b/src/js/ios-standalone.js @@ -0,0 +1,16 @@ +(function() { + 'use strict'; + + var $ = require('zepto-browserify').Zepto; + + // Disable scroll if iOS standalone is happening + if (window.navigator.standalone) { + $(document).on('touchmove', function(event) { + if ($('.modal').hasClass('open')) + return; + + event.preventDefault(); + return false; + }); + } +})(); diff --git a/src/js/modals.js b/src/js/modals.js new file mode 100644 index 0000000..cfd6703 --- /dev/null +++ b/src/js/modals.js @@ -0,0 +1,9 @@ +(function() { + 'use strict'; + + var $ = require('zepto-browserify').Zepto; + + $('.modal-close').on('click', function() { + $(this).parents('.modal').removeClass('open'); + }); +})(); diff --git a/src/js/settings.js b/src/js/settings.js new file mode 100644 index 0000000..e7218d0 --- /dev/null +++ b/src/js/settings.js @@ -0,0 +1,34 @@ +(function() { + 'use strict'; + + var $ = require('zepto-browserify').Zepto; + var UI = require('./ui.js'); + + $('#open-settings').on('click', function(event) { + event.preventDefault(); + $('#settings').addClass('open'); + }); + + $('#settings input, #settings select').each(function() { + var $this = $(this); + + $this.on('change', function() { + if (!$this.prop('name')) + return; + + UI.settings[$this.prop('name')] = $this.val(); + }); + }); + + $('.save-settings').on('click', function() { + UI.save(); + UI.load(); + }); + + $('.reset-settings').on('click', function() { + UI.load(); + }); + + if (!UI.settings['shared-secret'].length) + $('#settings').addClass('open'); +})(); diff --git a/src/js/telepathy.js b/src/js/telepathy.js new file mode 100644 index 0000000..c48fd0e --- /dev/null +++ b/src/js/telepathy.js @@ -0,0 +1,57 @@ +(function() { + 'use strict'; + + var $ = require('zepto-browserify').Zepto; + var _ = require('underscore')._; + var Telepathy = require('telepathy'); + var telepathy = new Telepathy(); + var UI = require('./ui.js'); + + require('./modals'); + require('./settings'); + require('./ios-standalone'); + + $('#domain').on('keydown input', _.debounce(function() { + var domain = this.value.replace(/^\s+|\s+$/g, ''); + + if (!domain.length) { + $('#password').val(''); + return; + } + + $('#password').val(telepathy.password({ + domain: domain, + algorithm: UI.settings['algorithm'], + user: UI.settings['default-username'], + secret: UI.settings['shared-secret'], + length: (+$('#length').val()) || UI.settings['default-length'], + index: (+$('#index').val()) || UI.settings['default-index'], + + alphabet: + $('input[name=lax]:checked').val() == 'yes' ? + Telepathy.alphabet.base62 : + Telepathy.alphabet.base94, + })); + })); + + $('#password').on('focus click', _.debounce(function() { + this.select(); + })); + + $('.modal-close, input[name=lax], #index, #length').on('click change keydown', function() { + $('#domain').trigger('keydown'); + }); + + $(window).on('blur focus keydown load', _.debounce(function(event) { + // do nothing if we have an open modal + if ($('.modal.open').length) + return; + + // escape key + if (event.type == 'keydown' && event.keyCode != 27) + return; + + $('#domain, #password').val(''); + $('#domain').focus(); + })); +})(); diff --git a/src/js/ui.js b/src/js/ui.js new file mode 100644 index 0000000..5f5e17a --- /dev/null +++ b/src/js/ui.js @@ -0,0 +1,74 @@ +(function() { + 'use strict'; + + var $ = require('zepto-browserify').Zepto; + var _ = require('underscore')._; + + // Populate values for index/length select boxes + var i; + for (i=4; i<=100; i+=(i<30?1:(i<50?5:10))) + $('#length,#default-length').append(''); + + for (i=0; i<=50; i++) + $('#index,#default-index').append(''); + + var UI = { + settings: {}, + + _settings: { + 'default-username': '', + 'shared-secret': '', + 'save-secret': 'no', + 'algorithm': 'SHA256', + 'default-length': 10, + 'default-index': 0, + }, + + save: function() { + var omit = this.settings['save-secret'] == 'no' ? 'shared-secret' : ''; + var settings = _.omit(this.settings, omit); + + localStorage.telepathyWeb = JSON.stringify({ + settings: settings + }); + + this._settings = this.settings; + }, + + load: function() { + var data = JSON.parse(localStorage.telepathyWeb || '{}'); + var that = this; + + if (!data) return; + + _.each(_.keys(that._settings), function(key) { + if (data.settings && _.has(data.settings, key)) + that._settings[key] = data.settings[key]; + + that.settings[key] = that._settings[key]; + + var $option = $('#settings [name=' + key + ']'); + + switch ($option.prop('type')) { + case 'radio': + $option.each(function() { + var $this = $(this); + $this.prop('checked', $this.val() == that.settings[key]); + }); + break; + + default: + $option.val(that.settings[key]); + break; + } + }); + + $('#index').val(this.settings['default-index']); + $('#length').val(this.settings['default-length']); + }, + }; + + UI.load(); + + module.exports = UI; +})(); diff --git a/test/telepathy-web.js b/test/telepathy-web.js new file mode 100644 index 0000000..ac42f6f --- /dev/null +++ b/test/telepathy-web.js @@ -0,0 +1,49 @@ +'use strict'; + +require('should'); + +describe('index.html', () => { + beforeEach(() => { + browser.url('/'); + + // browser.localStorage('DELETE') does not work in PhantomJS + browser.execute(function() { + delete window.localStorage; + window.localStorage = {}; + }); + + $('#default-username').waitForEnabled(); + + $('#default-username').setValue('test'); + $('#shared-secret').setValue('test'); + $('.save-settings').click(); + + $('#domain').waitForEnabled(); + }); + + it('should generate a password', () => { + $('#domain').setValue('example.com'); + + browser.waitUntil(() => + $('#password').getValue() == 'z { + $('#index').selectByVisibleText('1'); + $('#domain').setValue('example.com'); + + browser.waitUntil(() => + $('#password').getValue() == 'g:3WGYj0}~' + ); + }); + + it('should generate a password of a given length', () => { + $('#length').selectByVisibleText('8'); + $('#domain').setValue('example.com'); + + browser.waitUntil(() => + $('#password').getValue() == 'u9N_[c"R' + ); + }); +}); diff --git a/test/telepathy.js b/test/telepathy.js new file mode 100644 index 0000000..dd4cf06 --- /dev/null +++ b/test/telepathy.js @@ -0,0 +1,21 @@ +var Telepathy = require('telepathy'); + +require('should'); + +describe('Telepathy', function() { + 'use strict'; + + describe('#password', function() { + it('should work with no args', function() { + new Telepathy().password().should.equal('jWEepHLxI5'); + }); + + it('accepts an alphabet option', function() { + new Telepathy().password({ alphabet: Telepathy.alphabet.base16 }).should.equal('1b7852b855'); + }); + + it('accepts a length option', function() { + new Telepathy().password({ length: 5 }).should.equal('HLxI5'); + }); + }); +}); diff --git a/test/telepathy_test.js b/test/telepathy_test.js deleted file mode 100644 index 1820b8b..0000000 --- a/test/telepathy_test.js +++ /dev/null @@ -1,21 +0,0 @@ -var Telepathy = require('telepathy'); - -require('should'); - -describe('Telepathy', function() { - 'use strict'; - - describe('#password', function() { - it('should work with no args', function() { - new Telepathy().password().should.equal('jWEepHLxI5'); - }); - - it('accepts an alphabet option', function() { - new Telepathy().password({ alphabet: Telepathy.alphabet.base16 }).should.equal('1b7852b855'); - }); - - it('accepts a length option', function() { - new Telepathy().password({ length: 5 }).should.equal('HLxI5'); - }); - }); -}); diff --git a/test/ui_test.js b/test/ui_test.js deleted file mode 100644 index 8594d2e..0000000 --- a/test/ui_test.js +++ /dev/null @@ -1,66 +0,0 @@ -var $ = require('zepto-browserify').Zepto; -var _ = require('underscore')._; - -require('should'); - -describe('index.html', function() { - 'use strict'; - - beforeEach(function(done) { - // reset localStorage - localStorage.telepathyWeb = '{}'; - - var html = window['__html__']['www/index.html'] || - window['__html__']['tmp/index.html']; - - document.body.innerHTML = html.replace( - /(v\d+\.\d+\.\d+-\d+\.\d+\.\d+\/)/g, - 'http://localhost:8000/$1' - ); - - var script = document.createElement('script'); - script.src = 'http://localhost:8000/build/js/telepathy.js'; - script.onload = function() { - $('#default-username').val('test').trigger('change'); - $('#shared-secret').val('test').trigger('change'); - $('.save-settings').click(); - done(); - }; - document.body.appendChild(script); - }); - - describe('#domain.keydown', function() { - it('should create a password', function(done) { - $('#domain').val('example.com').trigger('keydown'); - - _.defer(function() { - $('#password').val().should.equal('z