mirror of
https://github.com/sern-handler/cli
synced 2026-06-06 01:16:53 +00:00
feat: enable extra command & jsdockerfile (#43)
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -13,7 +13,6 @@ export const extraPrompt = {
|
||||
title: 'Dockerfile (JavaScript)',
|
||||
description: 'Dockerfile for JavaScript',
|
||||
value: 'Dockerfile-javascript',
|
||||
disabled: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
11
src/templates/extra/Dockerfile.JS.sern
Normal file
11
src/templates/extra/Dockerfile.JS.sern
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM node:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN node src/index.js
|
||||
Reference in New Issue
Block a user