Skip to content

Commit

Permalink
Merge pull request #2 from strapi-community/feature/render
Browse files Browse the repository at this point in the history
Feature/render
  • Loading branch information
Eventyret committed Sep 2, 2022
2 parents e481082 + 688ae60 commit 394c98a
Show file tree
Hide file tree
Showing 38 changed files with 1,003 additions and 746 deletions.
35 changes: 18 additions & 17 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"no-empty": "off",
"indent": ["warn", "tab"],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "backtick"],
"semi": ["error", "always"],
"no-unused-vars": "warn"
}
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"no-empty": "off",
"indent": ["warn", 2, { "SwitchCase": 1 }],

"linebreak-style": ["error", "unix"],
"quotes": ["error", "backtick"],
"semi": ["error", "always"],
"no-unused-vars": "warn"
}
}
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"arrowParens": "avoid",
"singleQuote": true,
"printWidth": 80,
"useTabs": true,
"useTabs": false,
"tabWidth": 2,
"semi": true
}
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@

- [🚦 Current Status](#---current-status)
- [✨ Usage](#--usage)
- [🤖 Using CLI Arguments](#---using-cli-arguments)
- [🧹 Resetting project](#---resetting-project)
- [🚀 Features](#---features)
- [🐳 Docker-compose support](#---docker-compose-support)
- [🖐 Requirements](#---requirements)
- [🎗 Contributing](#---contributing)
- [⭐️ Show your support](#---show-your-support)
- [🔗 Links](#---links)
Expand All @@ -49,7 +48,7 @@ npx @strapi-community/deployify
@strapi-community/deployify reset
```

_Note_ that **RESET** will delete the `everything` from heroku related to the projectname.
_Note_ that **RESET** will delete the `everything` from heroku related to the projectname, if heroku is selected as a provider

## 🚀 Features

Expand Down
38 changes: 19 additions & 19 deletions cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,33 @@ const meow = require(`meow`);
const meowHelp = require(`cli-meow-help`);

const flags = {
clear: {
type: `boolean`,
default: true,
desc: `Clear the console`
},
version: {
type: `boolean`,
alias: `v`,
desc: `Print CLI version`
}
clear: {
type: `boolean`,
default: true,
desc: `Clear the console`
},
version: {
type: `boolean`,
alias: `v`,
desc: `Print CLI version`
}
};
const commands = {
help: { desc: `Print help info` },
reset: { desc: `Reset the project` }
help: { desc: `Print help info` },
reset: { desc: `Reset the project` }
};

const helpText = meowHelp({
name: `strapi-tool-deployify`,
flags,
commands
name: `strapi-tool-deployify`,
flags,
commands
});

const options = {
inferType: true,
description: false,
hardRejection: false,
flags
inferType: true,
description: false,
hardRejection: false,
flags
};

module.exports = meow(helpText, options);
15 changes: 7 additions & 8 deletions cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ const init = require(`./init`);
const cli = require(`./cli`);
const log = require(`./log`);
const quickStart = require(`./quickstart`);
const { resetFiles, resetHeroku } = require(`./reset`);
const { resetProvider } = require(`./reset`);
const message = require(`./message`);
module.exports = {
init,
cli,
log,
quickStart,
resetFiles,
resetHeroku,
message
init,
cli,
log,
quickStart,
resetProvider,
message
};
20 changes: 10 additions & 10 deletions cli/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ const pkg = require(`../package.json`);
const unhandled = require(`cli-handle-unhandled`);

module.exports = ({ clear = true }) => {
unhandled();
welcome({
title: `@strapi-community/deployify`,
tagLine: `by Simen Daehlin`,
description: `${pkg.description}\n${pkg.url}`,
version: pkg.version,
bgColor: `#8d76f9`,
bold: true,
clear
});
unhandled();
welcome({
title: `@strapi-community/deployify`,
tagLine: `by Simen Daehlin`,
description: `${pkg.description}\n${pkg.url}`,
version: pkg.version,
bgColor: `#8d76f9`,
bold: true,
clear
});
};
14 changes: 7 additions & 7 deletions cli/log.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const alert = require(`cli-alerts`);

module.exports = info => {
alert({
type: `warning`,
name: `DEBUG LOG`,
msg: ``
});
alert({
type: `warning`,
name: `DEBUG LOG`,
msg: ``
});

console.log(info);
console.log();
console.log(info);
console.log();
};
10 changes: 5 additions & 5 deletions cli/message.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const { spinner, chalk } = require(`../utils`);
const infoMessage = async message => {
spinner.start(``);
spinner.stopAndPersist({
symbol: `💁`,
text: ` ${chalk.bold.blue.bold(`${message}`)} \n`
});
spinner.start(``);
spinner.stopAndPersist({
symbol: `💁`,
text: ` ${chalk.bold.blue.bold(`${message}`)} \n`
});
};

module.exports = infoMessage;
17 changes: 9 additions & 8 deletions cli/quickstart.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ const { setConfig } = require(`../utils`);
* @returns true
*/
const quickStart = async flags => {
const { projecttype, packagemanager, env } = flags;
const { projecttype, packagemanager, env, provider } = flags;

setConfig({
projectType: projecttype.toLowerCase(),
packageManager: packagemanager.toLowerCase(),
env: env.toLowerCase(),
quickStart: true
});
return true;
setConfig({
projectType: projecttype.toLowerCase(),
packageManager: packagemanager.toLowerCase(),
env: env.toLowerCase(),
quickStart: true,
provider: provider || ``
});
return true;
};

module.exports = quickStart;

0 comments on commit 394c98a

Please sign in to comment.