Update npm build for new inclusions (#5381)
* Update npm build for new inclusions * Add dummy interface for secp256k1
This commit is contained in:
parent
c3769b8874
commit
2447875b26
19
js/src/api/local/ethkey/dummy.js
Normal file
19
js/src/api/local/ethkey/dummy.js
Normal file
@ -0,0 +1,19 @@
|
||||
// Copyright 2015-2017 Parity Technologies (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/>.
|
||||
|
||||
export default function () {
|
||||
// empty file included while building parity.js (don't include local keygen)
|
||||
}
|
@ -24,9 +24,11 @@ const ENV = process.env.NODE_ENV || 'development';
|
||||
const isProd = ENV === 'production';
|
||||
|
||||
const LIBRARY = process.env.LIBRARY;
|
||||
|
||||
if (!LIBRARY) {
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
const SRC = LIBRARY.toLowerCase();
|
||||
const OUTPUT_PATH = path.join(__dirname, '../.npmjs', SRC);
|
||||
|
||||
@ -63,12 +65,18 @@ module.exports = {
|
||||
'babel-loader?cacheDirectory=true'
|
||||
],
|
||||
exclude: /node_modules/
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
include: /node_modules\/(ethereumjs-tx|@parity\/wordlist)/,
|
||||
use: 'babel-loader'
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
alias: {
|
||||
'secp256k1/js': path.resolve(__dirname, '../src/api/local/ethkey/dummy.js'),
|
||||
'~': path.resolve(__dirname, '../src')
|
||||
},
|
||||
modules: [
|
||||
@ -85,15 +93,12 @@ module.exports = {
|
||||
to: 'package.json',
|
||||
transform: function (content, path) {
|
||||
const json = JSON.parse(content.toString());
|
||||
json.version = packageJson.version;
|
||||
|
||||
// Add tests dependencies to Dev Deps
|
||||
json.devDependencies.chai = packageJson.devDependencies.chai;
|
||||
json.devDependencies.mocha = packageJson.devDependencies.mocha;
|
||||
json.devDependencies.nock = packageJson.devDependencies.nock;
|
||||
|
||||
// Add test script
|
||||
json.scripts.test = 'mocha \'test/*.spec.js\'';
|
||||
json.version = packageJson.version;
|
||||
|
||||
return new Buffer(JSON.stringify(json, null, ' '), 'utf-8');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user