瀏覽代碼

Prima release

Sistemi Informatici 4 年之前
父節點
當前提交
0da9eb48f6
共有 4 個文件被更改,包括 88 次插入0 次删除
  1. 9 0
      .editorconfig
  2. 15 0
      cmd.js
  3. 13 0
      log.js
  4. 51 0
      package.json

+ 9 - 0
.editorconfig

@@ -0,0 +1,9 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 2
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true

+ 15 - 0
cmd.js

@@ -0,0 +1,15 @@
+#!/usr/bin/env node
+
+const program = require('commander');
+
+program
+    .command('start <env>')
+    .description('Start the project with the given environment')
+    .action(require('./commands/start'));
+
+program
+    .command('stop <env>')
+    .description('End the project with the given environment')
+    .action(require('./commands/stop'));
+
+program.parse(process.argv);

+ 13 - 0
log.js

@@ -0,0 +1,13 @@
+const colors = require('colors');
+
+module.exports = {
+  log: (message, ...params) => {
+    console.log(colors.green(message), ...params);
+  },
+  error: (message, ...params) => {
+    console.error(colors.red(message), ...params);
+  },
+  warn: (message, ...params) => {
+    console.warn(colors.yellow(message), ...params);
+  }
+};

+ 51 - 0
package.json

@@ -0,0 +1,51 @@
+{
+  "_from": "git+https://git.iamdev.it/IAMdev/dockerize-project.git#v2.1.1",
+  "_id": "dockerize-project@2.1.1",
+  "_inBundle": false,
+  "_integrity": "",
+  "_location": "/dockerize-project",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "git",
+    "raw": "dockerize-project@git+https://git.iamdev.it/IAMdev/dockerize-project.git#v2.1.1",
+    "name": "dockerize-project",
+    "escapedName": "dockerize-project",
+    "rawSpec": "git+https://git.iamdev.it/IAMdev/dockerize-project.git#v2.1.1",
+    "saveSpec": "git+https://git.iamdev.it/IAMdev/dockerize-project.git#v2.1.1",
+    "fetchSpec": "https://git.iamdev.it/IAMdev/dockerize-project.git",
+    "gitCommittish": "v2.1.1"
+  },
+  "_requiredBy": [
+    "#DEV:/"
+  ],
+  "_resolved": "git+https://git.iamdev.it/IAMdev/dockerize-project.git#b9e32ba2b10816123a58dd8def112dcfc13282c8",
+  "_spec": "dockerize-project@git+https://git.iamdev.it/IAMdev/dockerize-project.git#v2.1.1",
+  "_where": "/home/mdomenici/Progetti/bc",
+  "author": {
+    "name": "IAMdev"
+  },
+  "bin": {
+    "dockerize-project": "bin/cmd.js"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "colors": "^1.4.0",
+    "commander": "^4.0.1",
+    "docker-compose": "^0.23.1",
+    "hostile": "^1.3.2",
+    "is-root": "^2.1.0"
+  },
+  "deprecated": false,
+  "description": "",
+  "license": "ISC",
+  "main": "bin/docker.js",
+  "name": "dockerize-project",
+  "repository": {
+    "type": "git",
+    "url": "https://git.dev.iamdev.it/IAMdev/dockerize-project.git"
+  },
+  "scripts": {
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "version": "2.1.1"
+}