This package exports utils modules used through javascript
projects.
npm install --save-dev @immfly/js-toolkit
Allows to run bash commands.
const { Shell } = require('@immfly/js-toolkit' )
...
await Shell.execute('echo "Hellow"')
Allows to write files given the output file and its content.
const { FileWriter } = require('@immfly/js-toolkit' )
...
await FileWriter.write('file.txt', '::content::'))
Allows generate .env
files given the output file and the data to generate.
const { EnvFiler } = require('@immfly/js-toolkit' )
...
await EnvFiler.build({
file: 'file.txt',
data1: '::data1::',
data2: '::data2::'
})
The result of this example whould be a file named file.txt
with this content:
DATA1=::data1
DATA2=::data2
Contributions welcome; Please submit all pull requests the against master branch. If your pull request contains JavaScript patches or features, you should include relevant unit tests. Please check the Contributing Guidelines for more details. Thanks!
Albert Pérez Farrés