mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-26 21:51:06 +00:00
Merge pull request #750 from embark-framework/bug_fix/pipeline-default-for-upload
pipeline option/default for upload command
This commit is contained in:
commit
c84cb34527
@ -260,6 +260,7 @@ class Cmd {
|
|||||||
.option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
|
.option('--loglevel [loglevel]', __('level of logging to display') + ' ["error", "warn", "info", "debug", "trace"]', /^(error|warn|info|debug|trace)$/i, 'debug')
|
||||||
.option('--locale [locale]', __('language to use (default: en)'))
|
.option('--locale [locale]', __('language to use (default: en)'))
|
||||||
.option('-c, --client [client]', __('Use a specific ethereum client or simulator (supported: %s)', 'geth, testrpc'))
|
.option('-c, --client [client]', __('Use a specific ethereum client or simulator (supported: %s)', 'geth, testrpc'))
|
||||||
|
.option('--pipeline [pipeline]', __('webpack config to use (default: production)'))
|
||||||
.description(__('Upload your dapp to a decentralized storage') + '.')
|
.description(__('Upload your dapp to a decentralized storage') + '.')
|
||||||
.action(function (env, _options) {
|
.action(function (env, _options) {
|
||||||
i18n.setOrDetectLocale(_options.locale);
|
i18n.setOrDetectLocale(_options.locale);
|
||||||
@ -272,6 +273,7 @@ class Cmd {
|
|||||||
_options.logFile = _options.logfile; // fix casing
|
_options.logFile = _options.logfile; // fix casing
|
||||||
_options.logLevel = _options.loglevel; // fix casing
|
_options.logLevel = _options.loglevel; // fix casing
|
||||||
_options.client = _options.client || 'geth';
|
_options.client = _options.client || 'geth';
|
||||||
|
_options.webpackConfigName = _options.pipeline || 'production';
|
||||||
embark.upload(_options);
|
embark.upload(_options);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,8 @@ class EmbarkController {
|
|||||||
logger: options.logger,
|
logger: options.logger,
|
||||||
config: options.config,
|
config: options.config,
|
||||||
plugins: options.plugins,
|
plugins: options.plugins,
|
||||||
context: this.context
|
context: this.context,
|
||||||
|
webpackConfigName: options.webpackConfigName
|
||||||
});
|
});
|
||||||
engine.init();
|
engine.init();
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class IPFS {
|
|||||||
},
|
},
|
||||||
function printUrls(dir_hash, callback) {
|
function printUrls(dir_hash, callback) {
|
||||||
console.log(("=== " + __("DApp available at") + " http://localhost:8080/ipfs/" + dir_hash + "/").green);
|
console.log(("=== " + __("DApp available at") + " http://localhost:8080/ipfs/" + dir_hash + "/").green);
|
||||||
console.log(("=== " + __("DApp available at") + " http://ipfs.infura.io/ipfs/" + dir_hash + "/").green);
|
console.log(("=== " + __("DApp available at") + " https://ipfs.infura.io/ipfs/" + dir_hash + "/").green);
|
||||||
|
|
||||||
callback(null, dir_hash);
|
callback(null, dir_hash);
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class Swarm {
|
|||||||
return callback('No directory hash was returned');
|
return callback('No directory hash was returned');
|
||||||
}
|
}
|
||||||
console.log(("=== " + __("DApp available at") + ` ${self.getUrl}${dir_hash}/`).green);
|
console.log(("=== " + __("DApp available at") + ` ${self.getUrl}${dir_hash}/`).green);
|
||||||
console.log(("=== " + __("DApp available at") + ` http://swarm-gateways.net/bzz:/${dir_hash}`).green);
|
console.log(("=== " + __("DApp available at") + ` https://swarm-gateways.net/bzz:/${dir_hash}`).green);
|
||||||
|
|
||||||
callback(null, dir_hash);
|
callback(null, dir_hash);
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
// is in embark's node_modules vs. the dapp's node_modules
|
// is in embark's node_modules vs. the dapp's node_modules
|
||||||
|
|
||||||
const cloneDeep = require('lodash.clonedeep');
|
const cloneDeep = require('lodash.clonedeep');
|
||||||
const CompressionPlugin = require('compression-webpack-plugin');
|
// const CompressionPlugin = require('compression-webpack-plugin');
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
@ -165,7 +165,8 @@ devBabelLoader.options.compact = false;
|
|||||||
const production = cloneDeep(base);
|
const production = cloneDeep(base);
|
||||||
production.mode = 'production';
|
production.mode = 'production';
|
||||||
production.name = 'production';
|
production.name = 'production';
|
||||||
production.plugins.push(new CompressionPlugin());
|
// compression of webpack's JS output not enabled by default
|
||||||
|
// production.plugins.push(new CompressionPlugin());
|
||||||
|
|
||||||
// export a list of named configs
|
// export a list of named configs
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user