mirror of
https://github.com/embarklabs/embark.git
synced 2025-01-11 14:24:24 +00:00
Merge branch 'develop' of github.com:iurimatias/embark-framework into develop
This commit is contained in:
commit
d67982ac71
@ -483,7 +483,7 @@ The environment is a specific blockchain configuration that can be managed at co
|
||||
Structuring Application
|
||||
======
|
||||
|
||||
Embark is quite flexible and you can configure you're own directory structure using ```embark.json```
|
||||
Embark is quite flexible and you can configure your own directory structure using ```embark.json```
|
||||
|
||||
```Json
|
||||
# embark.json
|
||||
@ -512,7 +512,7 @@ To deploy a dapp to SWARM, all you need to do is run a local SWARM node and then
|
||||
Plugins
|
||||
======
|
||||
|
||||
It's possible to extend Embarks functionality with plugins. For example the follow is possible:
|
||||
It's possible to extend Embarks functionality with plugins. For example the following is possible:
|
||||
|
||||
* plugin to add support for es6, jsx, coffescript, etc (``embark.registerPipeline``)
|
||||
* plugin to add standard contracts or a contract framework (``embark.registerContractConfiguration`` and ``embark.addContractFile``)
|
||||
|
@ -23,6 +23,14 @@ Config.prototype.loadConfigFiles = function(options) {
|
||||
if (options.interceptLogs === undefined) {
|
||||
interceptLogs = true;
|
||||
}
|
||||
|
||||
//Check if the config file exists
|
||||
var embarkConfigExists = fs.existsSync(options.embarkConfig);
|
||||
if(!embarkConfigExists){
|
||||
this.logger.error('Cannot find file ' + options.embarkConfig + '. Please ensure you are running this command inside the Dapp folder');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
this.embarkConfig = fs.readJSONSync(options.embarkConfig);
|
||||
this.embarkConfig.plugins = this.embarkConfig.plugins || {};
|
||||
|
||||
|
@ -25,6 +25,10 @@ function writeJSONSync() {
|
||||
return fs.writeJSONSync.apply(fs.writeJSONSync, arguments);
|
||||
}
|
||||
|
||||
function existsSync(){
|
||||
return fs.existsSync.apply(fs.existsSync, arguments);
|
||||
}
|
||||
|
||||
// returns embarks root directory
|
||||
function embarkPath(fileOrDir) {
|
||||
return utils.joinPath(__dirname, '/../../', fileOrDir);
|
||||
@ -37,6 +41,6 @@ module.exports = {
|
||||
writeFileSync: writeFileSync,
|
||||
readJSONSync: readJSONSync,
|
||||
writeJSONSync: writeJSONSync,
|
||||
existsSync: existsSync,
|
||||
embarkPath: embarkPath
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user