⚠️ Archived Repository: This project is no longer maintained and is kept here for archival purposes only. Please note that the code may be outdated and no longer functional.
deploy template made easy
Utility to deploy store theme on a Storeden instance.
npm install storeden-deploy
import deploy from 'storeden-deploy'
deploy({
apiKey: '<api-key>',
apiExchange: '<api-exchange>',
sourcePath: { source: '<source-path>', exclude: '<glob-pattern>' }
})
Parameter | Type | Mandatory | Default | Description |
---|---|---|---|---|
apiKey |
String | yes | API Key associated with your Storeden Store | |
apiExchange |
String | yes | API Exchange associated with your Storeden Store | |
sourcePath |
String, Object | yes | Local source path where the script will look for template to deploy |
A Promise
fulfilled with true
if deploy process succeded, otherwise an error object.
import deploy from 'storeden-deploy'
let deployed
try {
deployed = await deploy({
apiKey: '927f134fe4c92986a528376f34a16c3FAKEd9b4d198359435da5f4f1f1a2d78042566d',
apiExchange: '23c79cc5fb832839465df5d96fef55cae10584b58ab937FAKEecbdd9bbe33ad3',
sourcePath: './myProject/dist'
})
} catch (e) {
deployed = false
}
console.log(deployed) // true for sure!
import deploy from 'storeden-deploy'
let deployed
try {
deployed = await deploy({
apiKey: '927f134fe4c92986a528376f34a16c3FAKEd9b4d198359435da5f4f1f1a2d78042566d',
apiExchange: '23c79cc5fb832839465df5d96fef55cae10584b58ab937FAKEecbdd9bbe33ad3',
sourcePath: {
source: './myProject/dist',
exclude: '**/{widgets,generated/**'
} // `exclude` property value must be a glob pattern'
})
} catch (e) {
deployed = false
}
console.log(deployed) // true for sure!
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT. Copyright (C) 2019 H-FARM (Enabling Solutions) - Francesco Pasqua.