From 7cf62c03083b8ebbb8a6a63fd8efe592344d5230 Mon Sep 17 00:00:00 2001 From: Evo <85353424+EvolutionX-10@users.noreply.github.com> Date: Sat, 18 Jun 2022 12:17:26 +0530 Subject: [PATCH] feat: enable extra command & jsdockerfile (#43) --- src/index.js | 6 ++++++ src/prompts/extra.js | 1 - src/templates/extra/Dockerfile.JS.sern | 11 +++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 src/templates/extra/Dockerfile.JS.sern diff --git a/src/index.js b/src/index.js index 00d31b0..3932fc4 100644 --- a/src/index.js +++ b/src/index.js @@ -2,6 +2,7 @@ import { init } from './commands/init.js'; import { help } from './commands/help.js'; +import { extra } from './commands/extra.js'; import { Command } from 'commander'; import { version } from './utilities/version.js'; @@ -24,4 +25,9 @@ program .option('-n --name', 'Name of plugin') .action(plugins); +program + .command(extra.name) + .description('Easy way to add extra things in your sern project') + .action(extra); + program.parse(); diff --git a/src/prompts/extra.js b/src/prompts/extra.js index 2e9dbaf..d100b73 100644 --- a/src/prompts/extra.js +++ b/src/prompts/extra.js @@ -13,7 +13,6 @@ export const extraPrompt = { title: 'Dockerfile (JavaScript)', description: 'Dockerfile for JavaScript', value: 'Dockerfile-javascript', - disabled: true, }, ], }; diff --git a/src/templates/extra/Dockerfile.JS.sern b/src/templates/extra/Dockerfile.JS.sern new file mode 100644 index 0000000..4ee33dc --- /dev/null +++ b/src/templates/extra/Dockerfile.JS.sern @@ -0,0 +1,11 @@ +FROM node:latest + +WORKDIR /app + +COPY package.json ./ + +RUN npm install + +COPY . . + +RUN node src/index.js \ No newline at end of file