Possibility to choose the number of space for the indentation
This commit is contained in:
Родитель
7ed746d708
Коммит
f99747d27a
|
@ -47,7 +47,8 @@ $ sgp -h
|
||||||
sgp({
|
sgp({
|
||||||
'src':'', // salesforce src directory path : ./src
|
'src':'', // salesforce src directory path : ./src
|
||||||
'40.0':'', // salesforce API verion : 40.0
|
'40.0':'', // salesforce API verion : 40.0
|
||||||
'src':'' // salesforce src directory path : ./src
|
'output':'', // salesforce src directory path : ./src
|
||||||
|
'indent':' ' // the number of space for the xml indentation (optionnal attibute)
|
||||||
}, console.log);
|
}, console.log);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -69,6 +70,7 @@ Add CLI parameters to build package.xml for only certain types
|
||||||
## Authors
|
## Authors
|
||||||
|
|
||||||
* **Sebastien Colladon** - *Initial work* - [scolladon](https://github.com/scolladon)
|
* **Sebastien Colladon** - *Initial work* - [scolladon](https://github.com/scolladon)
|
||||||
|
* **Baptiste Bieber** - *Add functionalities* - [baptistebieber](https://github.com/baptistebieber)
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
2
index.js
2
index.js
|
@ -29,7 +29,7 @@ module.exports = (config,logger) => {
|
||||||
[].concat(...result).filter(elem => !!elem).forEach(elem => xml.importDocument(elem));
|
[].concat(...result).filter(elem => !!elem).forEach(elem => xml.importDocument(elem));
|
||||||
xml.ele('version')
|
xml.ele('version')
|
||||||
.t(config.apiVersion);
|
.t(config.apiVersion);
|
||||||
const xmlContent = xml.end({ pretty: true, indent: ' ', newline: '\n' });
|
const xmlContent = xml.end({ pretty: true, indent: config.indent || ' ', newline: '\n' });
|
||||||
fs.writeFileSync(config.output + '/' + PACKAGE_XML_FILE_NAME, xmlContent);
|
fs.writeFileSync(config.output + '/' + PACKAGE_XML_FILE_NAME, xmlContent);
|
||||||
resolve();
|
resolve();
|
||||||
}).catch(reject);
|
}).catch(reject);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче