Wepback dapps
This commit is contained in:
parent
259b91da50
commit
e676f00dfa
25
js/src/dapps/index.js
Normal file
25
js/src/dapps/index.js
Normal file
@ -0,0 +1,25 @@
|
||||
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
||||
// This file is part of Parity.
|
||||
|
||||
// Parity is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// Parity is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
module.exports = [
|
||||
{ name: 'basiccoin', entry: 'basiccoin.js', title: 'Basic Token Deployment' },
|
||||
{ name: 'dappreg', entry: 'dappreg.js', title: 'Dapp Registry' },
|
||||
{ name: 'githubhint', entry: 'githubhint.js', title: 'GitHub Hint', secure: true },
|
||||
{ name: 'localtx', entry: 'localtx.js', title: 'Local transactions Viewer', secure: true },
|
||||
{ name: 'registry', entry: 'registry.js', title: 'Registry' },
|
||||
{ name: 'signaturereg', entry: 'signaturereg.js', title: 'Method Signature Registry' },
|
||||
{ name: 'tokenreg', entry: 'tokenreg.js', title: 'Token Registry' }
|
||||
];
|
@ -26,6 +26,7 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
const Shared = require('./shared');
|
||||
const DAPPS = require('../src/dapps');
|
||||
|
||||
const ENV = process.env.NODE_ENV || 'development';
|
||||
const isProd = ENV === 'production';
|
||||
@ -33,21 +34,8 @@ const DEST = process.env.BUILD_DEST || '.build';
|
||||
|
||||
const FAVICON = path.resolve(__dirname, '../assets/images/parity-logo-black-no-text.png');
|
||||
|
||||
const DAPPS = [
|
||||
{ name: 'basiccoin', entry: './dapps/basiccoin.js', title: 'Basic Token Deployment' },
|
||||
{ name: 'dappreg', entry: './dapps/dappreg.js', title: 'Dapp Registry' },
|
||||
{ name: 'githubhint', entry: './dapps/githubhint.js', title: 'GitHub Hint', secure: true },
|
||||
{ name: 'localtx', entry: './dapps/localtx.js', title: 'Local transactions Viewer', secure: true },
|
||||
{ name: 'registry', entry: './dapps/registry.js', title: 'Registry' },
|
||||
{ name: 'signaturereg', entry: './dapps/signaturereg.js', title: 'Method Signature Registry' },
|
||||
{ name: 'tokenreg', entry: './dapps/tokenreg.js', title: 'Token Registry' }
|
||||
];
|
||||
|
||||
// dapps
|
||||
const entry = DAPPS.reduce((_entry, dapp) => {
|
||||
_entry[dapp.name] = dapp.entry;
|
||||
return _entry;
|
||||
}, {});
|
||||
const entry = Shared.dappsEntry;
|
||||
|
||||
// main UI
|
||||
entry.index = './index.js';
|
||||
|
@ -68,6 +68,15 @@ function getPlugins (_isProd = isProd) {
|
||||
return plugins;
|
||||
}
|
||||
|
||||
function getDappsEntry () {
|
||||
const DAPPS = require('../src/dapps');
|
||||
|
||||
return DAPPS.reduce((_entry, dapp) => {
|
||||
_entry[dapp.name] = './dapps/' + dapp.entry;
|
||||
return _entry;
|
||||
}, {});
|
||||
}
|
||||
|
||||
const proxies = [
|
||||
{
|
||||
context: (pathname, req) => {
|
||||
@ -108,5 +117,6 @@ const proxies = [
|
||||
|
||||
module.exports = {
|
||||
getPlugins: getPlugins,
|
||||
dappsEntry: getDappsEntry(),
|
||||
proxies: proxies
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user