diff --git a/.gitignore b/.gitignore index 718a0cc8a..a41408fa0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,7 @@ dist node_modules npm-debug.log src/.nyc_output -coverage +src/coverage src/e2e-test-screenshots -app/report.html -app/*.map *.sw[pon] app/app.js diff --git a/Jenkinsfile b/Jenkinsfile index 3148fe9bd..4786858a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ pipeline { BUILD_ID=dontKillMe ~/start_lisk.sh # Build nano - cd $WORKSPACE + cd $WORKSPACE/src npm install # Add coveralls config file diff --git a/README.md b/README.md index 283c2941b..7f8b81d4a 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ git clone https://github.com/LiskHQ/lisk-nano.git cd lisk-nano npm install +cd src +npm install npm run dev ``` @@ -88,6 +90,7 @@ Make sure that the Lisk version of the node matches version in https://github.co Start the development version of lisk-nano: ``` +cd src npm run dev ``` @@ -120,7 +123,7 @@ You should have received a copy of the [GNU General Public License](https://gith This program also incorporates work previously released with lisk-nano `0.1.2` (and earlier) versions under the [MIT License](https://opensource.org/licenses/MIT). To comply with the requirements of that license, the following permission notice, applicable to those parts of the code only, is included below: -Copyright © 2016-2017 Lisk Foundation +Copyright © 2016-2017 Lisk Foundation Copyright © 2015 Crypti Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/app/index.html b/app/index.html new file mode 100644 index 000000000..9cfd80e88 --- /dev/null +++ b/app/index.html @@ -0,0 +1 @@ +Lisk Nano
SendLogout
\ No newline at end of file diff --git a/app/main.js b/app/main.js index b03c616d6..8bd9ff699 100644 --- a/app/main.js +++ b/app/main.js @@ -135,7 +135,7 @@ function createWindow() { const menu = Menu.buildFromTemplate(template); Menu.setApplicationMenu(menu); - win.loadURL(`file://${__dirname}/dist/index.html`); + win.loadURL(`file://${__dirname}/index.html`); win.on('closed', () => win = null); diff --git a/package.json b/package.json index f49509fa9..a3ffdf313 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,6 @@ "bugs": "https://github.com/LiskHQ/lisk-nano/issues", "main": "main.js", "scripts": { - "build": "webpack --profile --progress --display-modules --display-exclude --display-chunks --display-cached --display-cached-assets", - "dev": "webpack-dev-server --host 0.0.0.0 --profile --progress", - "e2e-test": "protractor e2e-test/conf.js", - "test": "grunt eslint && export NODE_ENV=test && karma start", - "test-live": "export NODE_ENV=test && export LIVE=true && karma start", "start": "electron app", "dist:win": "build --win", "dist:mac": "build --mac", @@ -22,103 +17,9 @@ "type": "git", "url": "https://github.com/LiskHQ/lisk-nano" }, - "dependencies": { - "angular": "=1.5.8", - "angular-animate": "=1.5.8", - "angular-aria": "=1.5.8", - "angular-cookies": "=1.5.8", - "angular-material": "=1.1.1", - "angular-material-data-table": "=0.10.9", - "angular-messages": "=1.5.8", - "angular-ui-router": "=1.0.0-rc.1", - "angular-svg-round-progressbar": "=0.4.8", - "babel-polyfill": "=6.9.1", - "bignumber.js": "=4.0.0", - "bitcore-mnemonic": "=1.1.1", - "debug": "=2.2.0", - "jquery": "=2.2.4", - "lisk-js": "=0.4.1", - "lodash": "=4.16.4", - "moment": "=2.15.1", - "ng-infinite-scroll": "=1.3.0", - "numeral": "=1.5.3", - "jasmine-spec-reporter": "=3.3.0" - }, "devDependencies": { - "angular-mocks": "=1.5.8", - "babel-core": "=6.9.1", - "babel-loader": "=6.2.4", - "babel-plugin-istanbul": "=4.0.0", - "babel-plugin-syntax-trailing-function-commas": "=6.22.0", - "babel-preset-es2015": "=6.9.0", - "chai": "=3.5.0", - "clean-webpack-plugin": "=0.1.9", - "css-loader": "=0.23.1", "electron": "=1.6.2", - "electron-builder": "=16.8.3", - "eslint-config-airbnb": "=14.1.0", - "eslint-config-google": "^0.7.1", - "eslint-plugin-html": "^2.0.3", - "eslint-plugin-import": "=2.2.0", - "exports-loader": "=0.6.3", - "extract-text-webpack-plugin": "=1.0.1", - "file-loader": "=0.9.0", - "grunt": "=1.0.1", - "grunt-eslint": "=19.0.0", - "grunt-newer": "=1.2.0", - "html-webpack-plugin": "=2.19.0", - "imports-loader": "=0.6.5", - "jit-grunt": "=0.10.0", - "json-loader": "=0.5.4", - "karma": "=1.4.1", - "karma-babel-preprocessor": "=6.0.1", - "karma-chai": "=0.1.0", - "karma-chrome-launcher": "=2.0.0", - "karma-coverage": "=1.1.1", - "karma-coveralls": "=1.1.2", - "karma-jenkins-reporter": "0.0.2", - "karma-mocha": "=1.3.0", - "karma-mocha-reporter": "=2.2.2", - "karma-ng-html2js-preprocessor": "=1.0.0", - "karma-phantomjs-launcher": "=1.0.4", - "karma-verbose-reporter": "=0.0.6", - "karma-webpack": "=2.0.2", - "less": "=2.7.1", - "less-loader": "=2.2.3", - "mocha": "=3.2.0", - "nyc": "=10.1.2", - "phantomjs": "=2.1.7", - "phantomjs-prebuilt": "=2.1.14", - "protractor": "=5.1.1", - "pug": "=2.0.0-beta11", - "pug-cli": "=1.0.0-alpha6", - "pug-loader": "=2.3.0", - "raw-loader": "=0.5.1", - "should": "=11.2.0", - "sinon": "=2.0.0", - "sinon-chai": "=2.8.0", - "style-loader": "=0.13.1", - "url-loader": "=0.5.7", - "webpack": "=1.13.1", - "webpack-bundle-analyzer": "=2.4.0", - "webpack-dev-server": "=1.14.1", - "webpack-merge": "=0.14.1", - "webpack-validator": "=2.2.6" - }, - "babel": { - "presets": [ - "es2015" - ], - "plugins": [ - "syntax-trailing-function-commas" - ], - "env": { - "test": { - "plugins": [ - "istanbul" - ] - } - } + "electron-builder": "=16.8.3" }, "build": { "appId": "io.lisk.nano", @@ -126,5 +27,6 @@ "win": { "target": "nsis" } - } + }, + "license": "GPL-3.0" } diff --git a/.eslintrc.json b/src/.eslintrc.json similarity index 100% rename from .eslintrc.json rename to src/.eslintrc.json diff --git a/Gruntfile.js b/src/Gruntfile.js similarity index 89% rename from Gruntfile.js rename to src/Gruntfile.js index 44219649f..1d6e14479 100644 --- a/Gruntfile.js +++ b/src/Gruntfile.js @@ -9,7 +9,7 @@ module.exports = function (grunt) { fix: false, }, all: { - src: ['src/**/*.js', 'e2e-test/**/*.js', 'test/**/*.js', '*.js'], + src: ['app/**/*.js', 'spec/**/*.js', 'test/**/*.js', '*.js'], }, }, }); diff --git a/src/app.js b/src/app/app.js similarity index 100% rename from src/app.js rename to src/app/app.js diff --git a/src/assets/fonts/material-design-icons/MaterialIcons-Regular.eot b/src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.eot similarity index 100% rename from src/assets/fonts/material-design-icons/MaterialIcons-Regular.eot rename to src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.eot diff --git a/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap b/src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap similarity index 100% rename from src/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap rename to src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.ijmap diff --git a/src/assets/fonts/material-design-icons/MaterialIcons-Regular.svg b/src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.svg similarity index 100% rename from src/assets/fonts/material-design-icons/MaterialIcons-Regular.svg rename to src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.svg diff --git a/src/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf b/src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf similarity index 100% rename from src/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf rename to src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.ttf diff --git a/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff b/src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.woff similarity index 100% rename from src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff rename to src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.woff diff --git a/src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 b/src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 similarity index 100% rename from src/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 rename to src/app/assets/fonts/material-design-icons/MaterialIcons-Regular.woff2 diff --git a/src/assets/fonts/material-design-icons/style.less b/src/app/assets/fonts/material-design-icons/style.less similarity index 100% rename from src/assets/fonts/material-design-icons/style.less rename to src/app/assets/fonts/material-design-icons/style.less diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.eot b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.eot similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.eot rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.eot diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.svg b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.svg similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.svg rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.svg diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.ttf b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.ttf similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.ttf rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.ttf diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff2 b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff2 similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff2 rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-500.woff2 diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.eot b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.eot similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.eot rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.eot diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.svg b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.svg similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.svg rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.svg diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.ttf b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.ttf similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.ttf rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.ttf diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff2 b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff2 similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff2 rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-700.woff2 diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.eot b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.eot similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.eot rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.eot diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.svg b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.svg similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.svg rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.svg diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.ttf b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.ttf similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.ttf rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.ttf diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff diff --git a/src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff2 b/src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff2 similarity index 100% rename from src/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff2 rename to src/app/assets/fonts/roboto-mono/roboto-mono-v4-latin-regular.woff2 diff --git a/src/assets/fonts/roboto-mono/style.less b/src/app/assets/fonts/roboto-mono/style.less similarity index 100% rename from src/assets/fonts/roboto-mono/style.less rename to src/app/assets/fonts/roboto-mono/style.less diff --git a/src/assets/fonts/roboto/roboto-v15-latin-500.eot b/src/app/assets/fonts/roboto/roboto-v15-latin-500.eot similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-500.eot rename to src/app/assets/fonts/roboto/roboto-v15-latin-500.eot diff --git a/src/assets/fonts/roboto/roboto-v15-latin-500.svg b/src/app/assets/fonts/roboto/roboto-v15-latin-500.svg similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-500.svg rename to src/app/assets/fonts/roboto/roboto-v15-latin-500.svg diff --git a/src/assets/fonts/roboto/roboto-v15-latin-500.ttf b/src/app/assets/fonts/roboto/roboto-v15-latin-500.ttf similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-500.ttf rename to src/app/assets/fonts/roboto/roboto-v15-latin-500.ttf diff --git a/src/assets/fonts/roboto/roboto-v15-latin-500.woff b/src/app/assets/fonts/roboto/roboto-v15-latin-500.woff similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-500.woff rename to src/app/assets/fonts/roboto/roboto-v15-latin-500.woff diff --git a/src/assets/fonts/roboto/roboto-v15-latin-500.woff2 b/src/app/assets/fonts/roboto/roboto-v15-latin-500.woff2 similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-500.woff2 rename to src/app/assets/fonts/roboto/roboto-v15-latin-500.woff2 diff --git a/src/assets/fonts/roboto/roboto-v15-latin-700.eot b/src/app/assets/fonts/roboto/roboto-v15-latin-700.eot similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-700.eot rename to src/app/assets/fonts/roboto/roboto-v15-latin-700.eot diff --git a/src/assets/fonts/roboto/roboto-v15-latin-700.svg b/src/app/assets/fonts/roboto/roboto-v15-latin-700.svg similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-700.svg rename to src/app/assets/fonts/roboto/roboto-v15-latin-700.svg diff --git a/src/assets/fonts/roboto/roboto-v15-latin-700.ttf b/src/app/assets/fonts/roboto/roboto-v15-latin-700.ttf similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-700.ttf rename to src/app/assets/fonts/roboto/roboto-v15-latin-700.ttf diff --git a/src/assets/fonts/roboto/roboto-v15-latin-700.woff b/src/app/assets/fonts/roboto/roboto-v15-latin-700.woff similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-700.woff rename to src/app/assets/fonts/roboto/roboto-v15-latin-700.woff diff --git a/src/assets/fonts/roboto/roboto-v15-latin-700.woff2 b/src/app/assets/fonts/roboto/roboto-v15-latin-700.woff2 similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-700.woff2 rename to src/app/assets/fonts/roboto/roboto-v15-latin-700.woff2 diff --git a/src/assets/fonts/roboto/roboto-v15-latin-regular.eot b/src/app/assets/fonts/roboto/roboto-v15-latin-regular.eot similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-regular.eot rename to src/app/assets/fonts/roboto/roboto-v15-latin-regular.eot diff --git a/src/assets/fonts/roboto/roboto-v15-latin-regular.svg b/src/app/assets/fonts/roboto/roboto-v15-latin-regular.svg similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-regular.svg rename to src/app/assets/fonts/roboto/roboto-v15-latin-regular.svg diff --git a/src/assets/fonts/roboto/roboto-v15-latin-regular.ttf b/src/app/assets/fonts/roboto/roboto-v15-latin-regular.ttf similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-regular.ttf rename to src/app/assets/fonts/roboto/roboto-v15-latin-regular.ttf diff --git a/src/assets/fonts/roboto/roboto-v15-latin-regular.woff b/src/app/assets/fonts/roboto/roboto-v15-latin-regular.woff similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-regular.woff rename to src/app/assets/fonts/roboto/roboto-v15-latin-regular.woff diff --git a/src/assets/fonts/roboto/roboto-v15-latin-regular.woff2 b/src/app/assets/fonts/roboto/roboto-v15-latin-regular.woff2 similarity index 100% rename from src/assets/fonts/roboto/roboto-v15-latin-regular.woff2 rename to src/app/assets/fonts/roboto/roboto-v15-latin-regular.woff2 diff --git a/src/assets/fonts/roboto/style.less b/src/app/assets/fonts/roboto/style.less similarity index 100% rename from src/assets/fonts/roboto/style.less rename to src/app/assets/fonts/roboto/style.less diff --git a/src/assets/images/LISK-alt.svg b/src/app/assets/images/LISK-alt.svg similarity index 100% rename from src/assets/images/LISK-alt.svg rename to src/app/assets/images/LISK-alt.svg diff --git a/src/assets/images/LISK-nano.png b/src/app/assets/images/LISK-nano.png similarity index 100% rename from src/assets/images/LISK-nano.png rename to src/app/assets/images/LISK-nano.png diff --git a/src/assets/images/LISK.png b/src/app/assets/images/LISK.png similarity index 100% rename from src/assets/images/LISK.png rename to src/app/assets/images/LISK.png diff --git a/src/assets/images/LISK.svg b/src/app/assets/images/LISK.svg similarity index 100% rename from src/assets/images/LISK.svg rename to src/app/assets/images/LISK.svg diff --git a/src/components/delegateRegistration/delegateRegistration.js b/src/app/components/delegate-registration/delegateRegistration.js similarity index 100% rename from src/components/delegateRegistration/delegateRegistration.js rename to src/app/components/delegate-registration/delegateRegistration.js diff --git a/src/components/delegateRegistration/delegateRegistration.less b/src/app/components/delegate-registration/delegateRegistration.less similarity index 100% rename from src/components/delegateRegistration/delegateRegistration.less rename to src/app/components/delegate-registration/delegateRegistration.less diff --git a/src/components/delegateRegistration/delegateRegistration.pug b/src/app/components/delegate-registration/delegateRegistration.pug similarity index 98% rename from src/components/delegateRegistration/delegateRegistration.pug rename to src/app/components/delegate-registration/delegateRegistration.pug index d39db6fc9..40f07a72d 100644 --- a/src/components/delegateRegistration/delegateRegistration.pug +++ b/src/app/components/delegate-registration/delegateRegistration.pug @@ -18,7 +18,7 @@ div.dialog-delegate-registration(aria-label='Vote for delegates') div.fee Fee: {{$ctrl.form.fee}} LSK md-divider div(layout='row') - p.info-icon-wrapper + p.info-icon-wrapper i.material-icons info p span Becoming a delegate requires registration. You may choose your own delegate name, which can be used to promote your delegate. Only the top 101 delegates are eligible to forge. All fees are shared equally between the top 101 delegates. diff --git a/src/components/delegates/delegates.js b/src/app/components/delegates/delegates.js similarity index 100% rename from src/components/delegates/delegates.js rename to src/app/components/delegates/delegates.js diff --git a/src/components/delegates/delegates.less b/src/app/components/delegates/delegates.less similarity index 100% rename from src/components/delegates/delegates.less rename to src/app/components/delegates/delegates.less diff --git a/src/components/delegates/delegates.pug b/src/app/components/delegates/delegates.pug similarity index 100% rename from src/components/delegates/delegates.pug rename to src/app/components/delegates/delegates.pug diff --git a/src/components/delegates/vote.js b/src/app/components/delegates/vote.js similarity index 100% rename from src/components/delegates/vote.js rename to src/app/components/delegates/vote.js diff --git a/src/components/delegates/vote.less b/src/app/components/delegates/vote.less similarity index 100% rename from src/components/delegates/vote.less rename to src/app/components/delegates/vote.less diff --git a/src/components/delegates/vote.pug b/src/app/components/delegates/vote.pug similarity index 100% rename from src/components/delegates/vote.pug rename to src/app/components/delegates/vote.pug diff --git a/src/components/forging/forging.js b/src/app/components/forging/forging.js similarity index 100% rename from src/components/forging/forging.js rename to src/app/components/forging/forging.js diff --git a/src/components/forging/forging.less b/src/app/components/forging/forging.less similarity index 100% rename from src/components/forging/forging.less rename to src/app/components/forging/forging.less diff --git a/src/components/forging/forging.pug b/src/app/components/forging/forging.pug similarity index 100% rename from src/components/forging/forging.pug rename to src/app/components/forging/forging.pug diff --git a/src/components/header/header.js b/src/app/components/header/header.js similarity index 100% rename from src/components/header/header.js rename to src/app/components/header/header.js diff --git a/src/components/header/header.less b/src/app/components/header/header.less similarity index 100% rename from src/components/header/header.less rename to src/app/components/header/header.less diff --git a/src/components/header/header.pug b/src/app/components/header/header.pug similarity index 100% rename from src/components/header/header.pug rename to src/app/components/header/header.pug diff --git a/src/components/login/login.js b/src/app/components/login/login.js similarity index 100% rename from src/components/login/login.js rename to src/app/components/login/login.js diff --git a/src/components/login/login.less b/src/app/components/login/login.less similarity index 100% rename from src/components/login/login.less rename to src/app/components/login/login.less diff --git a/src/components/login/login.pug b/src/app/components/login/login.pug similarity index 100% rename from src/components/login/login.pug rename to src/app/components/login/login.pug diff --git a/src/components/login/passphrase.js b/src/app/components/login/passphrase.js similarity index 100% rename from src/components/login/passphrase.js rename to src/app/components/login/passphrase.js diff --git a/src/components/login/passphrase.less b/src/app/components/login/passphrase.less similarity index 100% rename from src/components/login/passphrase.less rename to src/app/components/login/passphrase.less diff --git a/src/components/login/passphrase.pug b/src/app/components/login/passphrase.pug similarity index 100% rename from src/components/login/passphrase.pug rename to src/app/components/login/passphrase.pug diff --git a/src/components/login/save.less b/src/app/components/login/save.less similarity index 100% rename from src/components/login/save.less rename to src/app/components/login/save.less diff --git a/src/components/login/save.pug b/src/app/components/login/save.pug similarity index 100% rename from src/components/login/save.pug rename to src/app/components/login/save.pug diff --git a/src/components/lsk/lsk.js b/src/app/components/lsk/lsk.js similarity index 100% rename from src/components/lsk/lsk.js rename to src/app/components/lsk/lsk.js diff --git a/src/components/lsk/lsk.less b/src/app/components/lsk/lsk.less similarity index 100% rename from src/components/lsk/lsk.less rename to src/app/components/lsk/lsk.less diff --git a/src/components/lsk/lsk.pug b/src/app/components/lsk/lsk.pug similarity index 100% rename from src/components/lsk/lsk.pug rename to src/app/components/lsk/lsk.pug diff --git a/src/components/main/main.js b/src/app/components/main/main.js similarity index 100% rename from src/components/main/main.js rename to src/app/components/main/main.js diff --git a/src/components/main/main.less b/src/app/components/main/main.less similarity index 100% rename from src/components/main/main.less rename to src/app/components/main/main.less diff --git a/src/components/main/main.pug b/src/app/components/main/main.pug similarity index 100% rename from src/components/main/main.pug rename to src/app/components/main/main.pug diff --git a/src/components/main/secondPass.less b/src/app/components/main/secondPass.less similarity index 100% rename from src/components/main/secondPass.less rename to src/app/components/main/secondPass.less diff --git a/src/components/main/secondPass.pug b/src/app/components/main/secondPass.pug similarity index 100% rename from src/components/main/secondPass.pug rename to src/app/components/main/secondPass.pug diff --git a/src/components/main/setSecondPassDirective.js b/src/app/components/main/setSecondPassDirective.js similarity index 100% rename from src/components/main/setSecondPassDirective.js rename to src/app/components/main/setSecondPassDirective.js diff --git a/src/components/main/setSecondPassService.js b/src/app/components/main/setSecondPassService.js similarity index 100% rename from src/components/main/setSecondPassService.js rename to src/app/components/main/setSecondPassService.js diff --git a/src/components/signVerify/signMessage.js b/src/app/components/sign-verify/sign-message.js similarity index 91% rename from src/components/signVerify/signMessage.js rename to src/app/components/sign-verify/sign-message.js index 585202750..dd9a86d85 100644 --- a/src/components/signVerify/signMessage.js +++ b/src/app/components/sign-verify/sign-message.js @@ -1,7 +1,7 @@ import lisk from 'lisk-js'; app.component('signMessage', { - template: require('./signMessage.pug')(), + template: require('./sign-message.pug')(), controller: class signMessage { constructor($mdDialog, Account) { this.$mdDialog = $mdDialog; diff --git a/src/components/signVerify/signMessage.pug b/src/app/components/sign-verify/sign-message.pug similarity index 100% rename from src/components/signVerify/signMessage.pug rename to src/app/components/sign-verify/sign-message.pug diff --git a/src/components/signVerify/verifyMessage.js b/src/app/components/sign-verify/verify-message.js similarity index 95% rename from src/components/signVerify/verifyMessage.js rename to src/app/components/sign-verify/verify-message.js index 3a7a9f739..9e963b301 100644 --- a/src/components/signVerify/verifyMessage.js +++ b/src/app/components/sign-verify/verify-message.js @@ -1,7 +1,7 @@ import lisk from 'lisk-js'; app.component('verifyMessage', { - template: require('./verifyMessage.pug')(), + template: require('./verify-message.pug')(), controllerAs: '$ctrl', controller: class verifyMessage { constructor($mdDialog, Account) { diff --git a/src/components/signVerify/verifyMessage.pug b/src/app/components/sign-verify/verify-message.pug similarity index 100% rename from src/components/signVerify/verifyMessage.pug rename to src/app/components/sign-verify/verify-message.pug diff --git a/src/components/timestamp/timestamp.js b/src/app/components/timestamp/timestamp.js similarity index 100% rename from src/components/timestamp/timestamp.js rename to src/app/components/timestamp/timestamp.js diff --git a/src/components/timestamp/timestamp.less b/src/app/components/timestamp/timestamp.less similarity index 100% rename from src/components/timestamp/timestamp.less rename to src/app/components/timestamp/timestamp.less diff --git a/src/components/timestamp/timestamp.pug b/src/app/components/timestamp/timestamp.pug similarity index 100% rename from src/components/timestamp/timestamp.pug rename to src/app/components/timestamp/timestamp.pug diff --git a/src/components/top/top.js b/src/app/components/top/top.js similarity index 100% rename from src/components/top/top.js rename to src/app/components/top/top.js diff --git a/src/components/top/top.less b/src/app/components/top/top.less similarity index 100% rename from src/components/top/top.less rename to src/app/components/top/top.less diff --git a/src/components/top/top.pug b/src/app/components/top/top.pug similarity index 100% rename from src/components/top/top.pug rename to src/app/components/top/top.pug diff --git a/src/components/transactions/transactions.js b/src/app/components/transactions/transactions.js similarity index 100% rename from src/components/transactions/transactions.js rename to src/app/components/transactions/transactions.js diff --git a/src/components/transactions/transactions.less b/src/app/components/transactions/transactions.less similarity index 100% rename from src/components/transactions/transactions.less rename to src/app/components/transactions/transactions.less diff --git a/src/components/transactions/transactions.pug b/src/app/components/transactions/transactions.pug similarity index 100% rename from src/components/transactions/transactions.pug rename to src/app/components/transactions/transactions.pug diff --git a/src/components/transfer/second.pug b/src/app/components/transfer/second.pug similarity index 100% rename from src/components/transfer/second.pug rename to src/app/components/transfer/second.pug diff --git a/src/components/transfer/transfer.js b/src/app/components/transfer/transfer.js similarity index 100% rename from src/components/transfer/transfer.js rename to src/app/components/transfer/transfer.js diff --git a/src/components/transfer/transfer.less b/src/app/components/transfer/transfer.less similarity index 100% rename from src/components/transfer/transfer.less rename to src/app/components/transfer/transfer.less diff --git a/src/components/transfer/transfer.pug b/src/app/components/transfer/transfer.pug similarity index 100% rename from src/components/transfer/transfer.pug rename to src/app/components/transfer/transfer.pug diff --git a/src/components/transfer/transferModalDirective.js b/src/app/components/transfer/transferModalDirective.js similarity index 100% rename from src/components/transfer/transferModalDirective.js rename to src/app/components/transfer/transferModalDirective.js diff --git a/src/components/transfer/transferModalService.js b/src/app/components/transfer/transferModalService.js similarity index 100% rename from src/components/transfer/transferModalService.js rename to src/app/components/transfer/transferModalService.js diff --git a/src/filters/lsk.js b/src/app/filters/lsk.js similarity index 100% rename from src/filters/lsk.js rename to src/app/filters/lsk.js diff --git a/src/index.js b/src/app/index.js similarity index 82% rename from src/index.js rename to src/app/index.js index 1ca3000a9..9dcc296c5 100644 --- a/src/index.js +++ b/src/app/index.js @@ -1,5 +1,5 @@ import './libs'; -import './liskNano'; +import './lisk-nano'; angular.element(document).ready(() => { angular.bootstrap(document, ['app']); diff --git a/src/index.less b/src/app/index.less similarity index 100% rename from src/index.less rename to src/app/index.less diff --git a/src/index.pug b/src/app/index.pug similarity index 96% rename from src/index.pug rename to src/app/index.pug index bfc84c9bf..7bcae57c8 100644 --- a/src/index.pug +++ b/src/app/index.pug @@ -3,6 +3,7 @@ html head meta(name="viewport" content="width=device-width, user-scalable=no") title Lisk Nano + base(href='/') style(type='text/css'). body { background-color: #eee !important; diff --git a/src/libs.js b/src/app/libs.js similarity index 100% rename from src/libs.js rename to src/app/libs.js diff --git a/src/liskNano.js b/src/app/lisk-nano.js similarity index 84% rename from src/liskNano.js rename to src/app/lisk-nano.js index 7a14ffb81..c6e28d899 100644 --- a/src/liskNano.js +++ b/src/app/lisk-nano.js @@ -18,15 +18,15 @@ import './components/lsk/lsk'; import './components/forging/forging'; import './components/delegates/delegates'; import './components/delegates/vote'; -import './components/signVerify/signMessage'; -import './components/signVerify/verifyMessage'; -import './components/delegateRegistration/delegateRegistration'; +import './components/sign-verify/sign-message'; +import './components/sign-verify/verify-message'; +import './components/delegate-registration/delegateRegistration'; import './services/api/peers'; import './services/lsk'; import './services/dialog'; import './services/passphrase'; -import './services/signVerify'; +import './services/sign-verify'; import './services/account'; import './services/api/delegateApi'; import './services/api/forgingApi'; diff --git a/src/run.js b/src/app/run.js similarity index 100% rename from src/run.js rename to src/app/run.js diff --git a/src/services/account.js b/src/app/services/account.js similarity index 100% rename from src/services/account.js rename to src/app/services/account.js diff --git a/src/services/api/accountApi.js b/src/app/services/api/accountApi.js similarity index 100% rename from src/services/api/accountApi.js rename to src/app/services/api/accountApi.js diff --git a/src/services/api/delegateApi.js b/src/app/services/api/delegateApi.js similarity index 100% rename from src/services/api/delegateApi.js rename to src/app/services/api/delegateApi.js diff --git a/src/services/api/forgingApi.js b/src/app/services/api/forgingApi.js similarity index 100% rename from src/services/api/forgingApi.js rename to src/app/services/api/forgingApi.js diff --git a/src/services/api/peers.js b/src/app/services/api/peers.js similarity index 100% rename from src/services/api/peers.js rename to src/app/services/api/peers.js diff --git a/src/services/dialog.js b/src/app/services/dialog.js similarity index 100% rename from src/services/dialog.js rename to src/app/services/dialog.js diff --git a/src/services/lsk.js b/src/app/services/lsk.js similarity index 100% rename from src/services/lsk.js rename to src/app/services/lsk.js diff --git a/src/services/passphrase.js b/src/app/services/passphrase.js similarity index 100% rename from src/services/passphrase.js rename to src/app/services/passphrase.js diff --git a/src/services/signVerify.js b/src/app/services/sign-verify.js similarity index 100% rename from src/services/signVerify.js rename to src/app/services/sign-verify.js diff --git a/src/states.js b/src/app/states.js similarity index 100% rename from src/states.js rename to src/app/states.js diff --git a/src/theme/theme.js b/src/app/theme/theme.js similarity index 100% rename from src/theme/theme.js rename to src/app/theme/theme.js diff --git a/src/util/animateOnChange/animateOnChange.js b/src/app/util/animateOnChange/animateOnChange.js similarity index 100% rename from src/util/animateOnChange/animateOnChange.js rename to src/app/util/animateOnChange/animateOnChange.js diff --git a/karma.conf.js b/src/karma.conf.js similarity index 96% rename from karma.conf.js rename to src/karma.conf.js index 1d68bebf6..d41bd107c 100644 --- a/karma.conf.js +++ b/src/karma.conf.js @@ -5,8 +5,8 @@ const webpackConfig = require('./webpack.config.babel'); const preprocessors = {}; // preprocessors[entry] = ['webpack']; preprocessors['**/*.html'] = ['ng-html2js']; -const libs = path.join(__dirname, 'src', 'libs.js'); -const app = path.join(__dirname, 'src', 'liskNano.js'); +const libs = path.join(__dirname, 'app', 'libs.js'); +const app = path.join(__dirname, 'app', 'lisk-nano.js'); const testLibs = path.join(__dirname, 'test', 'libs.js'); const test = path.join(__dirname, 'test', 'test.js'); preprocessors[libs] = ['webpack']; diff --git a/src/package.json b/src/package.json new file mode 100644 index 000000000..7389f5c45 --- /dev/null +++ b/src/package.json @@ -0,0 +1,108 @@ +{ + "name": "lisk-nano", + "version": "0.2.1", + "description": "Lisk Nano", + "scripts": { + "build": "webpack --profile --progress --display-modules --display-exclude --display-chunks --display-cached --display-cached-assets", + "dev": "webpack-dev-server --host 0.0.0.0 --profile --progress", + "e2e-test": "protractor spec/conf.js", + "test": "grunt eslint && export NODE_ENV=test && karma start", + "test-live": "export NODE_ENV=test && export LIVE=true && karma start" + }, + "author": "Lisk Foundation , lightcurve GmbH ", + "license": "GPL-3.0", + "dependencies": { + "angular": "=1.5.8", + "angular-animate": "=1.5.8", + "angular-aria": "=1.5.8", + "angular-cookies": "=1.5.8", + "angular-material": "=1.1.1", + "angular-material-data-table": "=0.10.9", + "angular-messages": "=1.5.8", + "angular-ui-router": "=1.0.0-rc.1", + "angular-svg-round-progressbar": "=0.4.8", + "babel-polyfill": "=6.9.1", + "bignumber.js": "=4.0.0", + "bitcore-mnemonic": "=1.1.1", + "debug": "=2.2.0", + "jquery": "=2.2.4", + "lisk-js": "=0.4.1", + "lodash": "=4.16.4", + "moment": "=2.15.1", + "ng-infinite-scroll": "=1.3.0", + "numeral": "=1.5.3" + }, + "devDependencies": { + "angular-mocks": "=1.5.8", + "babel-core": "=6.9.1", + "babel-loader": "=6.2.4", + "babel-plugin-istanbul": "=4.0.0", + "babel-plugin-syntax-trailing-function-commas": "=6.22.0", + "babel-preset-es2015": "=6.9.0", + "chai": "=3.5.0", + "clean-webpack-plugin": "=0.1.9", + "css-loader": "=0.23.1", + "eslint-config-airbnb": "=14.1.0", + "eslint-plugin-import": "=2.2.0", + "exports-loader": "=0.6.3", + "extract-text-webpack-plugin": "=1.0.1", + "file-loader": "=0.9.0", + "grunt": "=1.0.1", + "grunt-eslint": "=19.0.0", + "grunt-newer": "=1.2.0", + "html-webpack-plugin": "=2.19.0", + "imports-loader": "=0.6.5", + "jasmine-spec-reporter": "=3.3.0", + "jit-grunt": "=0.10.0", + "json-loader": "=0.5.4", + "karma": "=1.4.1", + "karma-babel-preprocessor": "=6.0.1", + "karma-chai": "=0.1.0", + "karma-chrome-launcher": "=2.0.0", + "karma-coverage": "=1.1.1", + "karma-coveralls": "=1.1.2", + "karma-jenkins-reporter": "0.0.2", + "karma-mocha": "=1.3.0", + "karma-mocha-reporter": "=2.2.2", + "karma-ng-html2js-preprocessor": "=1.0.0", + "karma-phantomjs-launcher": "=1.0.4", + "karma-verbose-reporter": "=0.0.6", + "karma-webpack": "=2.0.2", + "less": "=2.7.1", + "less-loader": "=2.2.3", + "mocha": "=3.2.0", + "nyc": "=10.1.2", + "phantomjs": "=2.1.7", + "phantomjs-prebuilt": "=2.1.14", + "protractor": "=5.1.1", + "pug": "=2.0.0-beta11", + "pug-cli": "=1.0.0-alpha6", + "pug-loader": "=2.3.0", + "raw-loader": "=0.5.1", + "should": "=11.2.0", + "sinon": "=2.0.0", + "sinon-chai": "=2.8.0", + "style-loader": "=0.13.1", + "url-loader": "=0.5.7", + "webpack": "=1.13.1", + "webpack-bundle-analyzer": "=2.4.0", + "webpack-dev-server": "=1.14.1", + "webpack-merge": "=0.14.1", + "webpack-validator": "=2.2.6" + }, + "babel": { + "presets": [ + "es2015" + ], + "plugins": [ + "syntax-trailing-function-commas" + ], + "env": { + "test": { + "plugins": [ + "istanbul" + ] + } + } + } +} diff --git a/e2e-test/.eslintrc.json b/src/spec/.eslintrc.json similarity index 100% rename from e2e-test/.eslintrc.json rename to src/spec/.eslintrc.json diff --git a/e2e-test/conf.js b/src/spec/conf.js similarity index 100% rename from e2e-test/conf.js rename to src/spec/conf.js diff --git a/e2e-test/setup.sh b/src/spec/setup.sh similarity index 100% rename from e2e-test/setup.sh rename to src/spec/setup.sh diff --git a/e2e-test/spec.js b/src/spec/spec.js similarity index 100% rename from e2e-test/spec.js rename to src/spec/spec.js diff --git a/test/.eslintrc.json b/src/test/.eslintrc.json similarity index 100% rename from test/.eslintrc.json rename to src/test/.eslintrc.json diff --git a/test/components/delegateRegistration/delegateRegistration.spec.js b/src/test/components/delegate-registration/delegateRegistration.spec.js similarity index 100% rename from test/components/delegateRegistration/delegateRegistration.spec.js rename to src/test/components/delegate-registration/delegateRegistration.spec.js diff --git a/test/components/delegates/delegates.spec.js b/src/test/components/delegates/delegates.spec.js similarity index 100% rename from test/components/delegates/delegates.spec.js rename to src/test/components/delegates/delegates.spec.js diff --git a/test/components/delegates/vote.spec.js b/src/test/components/delegates/vote.spec.js similarity index 100% rename from test/components/delegates/vote.spec.js rename to src/test/components/delegates/vote.spec.js diff --git a/test/components/forging/forging.spec.js b/src/test/components/forging/forging.spec.js similarity index 100% rename from test/components/forging/forging.spec.js rename to src/test/components/forging/forging.spec.js diff --git a/test/components/header/header.spec.js b/src/test/components/header/header.spec.js similarity index 100% rename from test/components/header/header.spec.js rename to src/test/components/header/header.spec.js diff --git a/test/components/login/login.spec.js b/src/test/components/login/login.spec.js similarity index 100% rename from test/components/login/login.spec.js rename to src/test/components/login/login.spec.js diff --git a/test/components/login/passphrase.spec.js b/src/test/components/login/passphrase.spec.js similarity index 100% rename from test/components/login/passphrase.spec.js rename to src/test/components/login/passphrase.spec.js diff --git a/test/components/main/main.spec.js b/src/test/components/main/main.spec.js similarity index 100% rename from test/components/main/main.spec.js rename to src/test/components/main/main.spec.js diff --git a/test/components/main/setSecondPassDirective.spec.js b/src/test/components/main/setSecondPassDirective.spec.js similarity index 100% rename from test/components/main/setSecondPassDirective.spec.js rename to src/test/components/main/setSecondPassDirective.spec.js diff --git a/test/components/main/setSecondPassService.spec.js b/src/test/components/main/setSecondPassService.spec.js similarity index 100% rename from test/components/main/setSecondPassService.spec.js rename to src/test/components/main/setSecondPassService.spec.js diff --git a/test/components/signVerify/signMessage.spec.js b/src/test/components/sign-verify/sign-message.spec.js similarity index 100% rename from test/components/signVerify/signMessage.spec.js rename to src/test/components/sign-verify/sign-message.spec.js diff --git a/test/components/signVerify/verifyMessage.spec.js b/src/test/components/sign-verify/verify-message.spec.js similarity index 100% rename from test/components/signVerify/verifyMessage.spec.js rename to src/test/components/sign-verify/verify-message.spec.js diff --git a/test/components/timestamp/timestamp.spec.js b/src/test/components/timestamp/timestamp.spec.js similarity index 100% rename from test/components/timestamp/timestamp.spec.js rename to src/test/components/timestamp/timestamp.spec.js diff --git a/test/components/top/top.spec.js b/src/test/components/top/top.spec.js similarity index 100% rename from test/components/top/top.spec.js rename to src/test/components/top/top.spec.js diff --git a/test/components/transactions/transactions.spec.js b/src/test/components/transactions/transactions.spec.js similarity index 100% rename from test/components/transactions/transactions.spec.js rename to src/test/components/transactions/transactions.spec.js diff --git a/test/components/transfer/transfer.spec.js b/src/test/components/transfer/transfer.spec.js similarity index 100% rename from test/components/transfer/transfer.spec.js rename to src/test/components/transfer/transfer.spec.js diff --git a/test/components/transfer/transferModalDirective.spec.js b/src/test/components/transfer/transferModalDirective.spec.js similarity index 100% rename from test/components/transfer/transferModalDirective.spec.js rename to src/test/components/transfer/transferModalDirective.spec.js diff --git a/test/libs.js b/src/test/libs.js similarity index 100% rename from test/libs.js rename to src/test/libs.js diff --git a/test/run.spec.js b/src/test/run.spec.js similarity index 100% rename from test/run.spec.js rename to src/test/run.spec.js diff --git a/test/services/account.spec.js b/src/test/services/account.spec.js similarity index 100% rename from test/services/account.spec.js rename to src/test/services/account.spec.js diff --git a/test/services/api/accountApi.spec.js b/src/test/services/api/accountApi.spec.js similarity index 100% rename from test/services/api/accountApi.spec.js rename to src/test/services/api/accountApi.spec.js diff --git a/test/services/api/delegateApi.spec.js b/src/test/services/api/delegateApi.spec.js similarity index 100% rename from test/services/api/delegateApi.spec.js rename to src/test/services/api/delegateApi.spec.js diff --git a/test/services/api/forgingApi.spec.js b/src/test/services/api/forgingApi.spec.js similarity index 100% rename from test/services/api/forgingApi.spec.js rename to src/test/services/api/forgingApi.spec.js diff --git a/test/services/api/peers.spec.js b/src/test/services/api/peers.spec.js similarity index 100% rename from test/services/api/peers.spec.js rename to src/test/services/api/peers.spec.js diff --git a/test/services/lsk.spec.js b/src/test/services/lsk.spec.js similarity index 100% rename from test/services/lsk.spec.js rename to src/test/services/lsk.spec.js diff --git a/test/services/passphrase.spec.js b/src/test/services/passphrase.spec.js similarity index 100% rename from test/services/passphrase.spec.js rename to src/test/services/passphrase.spec.js diff --git a/test/services/signVerify.spec.js b/src/test/services/sign-verify.spec.js similarity index 100% rename from test/services/signVerify.spec.js rename to src/test/services/sign-verify.spec.js diff --git a/test/test.js b/src/test/test.js similarity index 82% rename from test/test.js rename to src/test/test.js index 9c5cfbe58..d2f3a458b 100644 --- a/test/test.js +++ b/src/test/test.js @@ -12,12 +12,12 @@ require('./components/transfer/transferModalDirective.spec'); require('./components/top/top.spec'); require('./components/timestamp/timestamp.spec'); require('./components/transactions/transactions.spec'); -require('./components/signVerify/signMessage.spec'); -require('./components/signVerify/verifyMessage.spec'); -require('./components/delegateRegistration/delegateRegistration.spec.js'); +require('./components/sign-verify/sign-message.spec'); +require('./components/sign-verify/verify-message.spec'); +require('./components/delegate-registration/delegateRegistration.spec.js'); require('./services/passphrase.spec'); -require('./services/signVerify.spec'); +require('./services/sign-verify.spec'); require('./services/lsk.spec'); require('./services/api/peers.spec'); require('./services/api/delegateApi.spec'); diff --git a/test/util/animateOnChange/animateOnChange.spec.js b/src/test/util/animateOnChange/animateOnChange.spec.js similarity index 100% rename from test/util/animateOnChange/animateOnChange.spec.js rename to src/test/util/animateOnChange/animateOnChange.spec.js diff --git a/webpack.config.babel.js b/src/webpack.config.babel.js similarity index 88% rename from webpack.config.babel.js rename to src/webpack.config.babel.js index f232dd13e..328b1e4fd 100644 --- a/webpack.config.babel.js +++ b/src/webpack.config.babel.js @@ -10,9 +10,9 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl const nodeEnvironment = process.env.NODE_ENV; const PATHS = { - app: path.join(__dirname, 'src'), - build: path.resolve(__dirname, 'app'), - spec: path.join(__dirname, 'e2e-test'), + app: path.join(__dirname, 'app'), + build: path.resolve(__dirname, '..', 'app'), + spec: path.join(__dirname, 'spec'), test: path.join(__dirname, 'test'), }; @@ -22,7 +22,7 @@ const common = { app: PATHS.app, }, output: { - path: path.join(PATHS.build, 'dist'), + path: PATHS.build, filename: 'app.js', }, node: { @@ -47,7 +47,7 @@ const html = () => ({ plugins: [ new HtmlWebpackPlugin({ filename: 'index.html', - template: path.resolve(PATHS.app, 'index.pug'), + template: 'app/index.pug', minify: { collapseWhitespace: true, minifyCSS: true, @@ -169,7 +169,7 @@ let config; switch (process.env.npm_lifecycle_event) { case 'build': - config = merge(common, clean(path.join(PATHS.build, 'dist')), html(), provide(), babel(), pug(), less(), css(), json(), png(), fonts(), bundleAnalyzer()); + config = merge(common, clean(path.join(PATHS.build, '*')), html(), provide(), babel(), pug(), less(), css(), json(), png(), fonts(), bundleAnalyzer()); break; default: config = merge(common, devServer(), { devtool: 'eval-source-map' }, html(), provide(), babel(), pug(), less(), css(), json(), png(), fonts());