vtasks-automate-cli 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/init.js +10 -0
  2. package/package.json +1 -1
package/init.js CHANGED
@@ -19,6 +19,8 @@ class ApiHelpers {
19
19
  }
20
20
  }
21
21
 
22
+ const VTASKS_CONFIG_URL = "http://localhost:3040/project/action/track";
23
+
22
24
  const LOG_COLORS = {
23
25
  RED: "\x1b[31m",
24
26
  GREEN: "\x1b[32m",
@@ -113,6 +115,7 @@ const main = async () => {
113
115
  const carpetaDestino = path.join(process.cwd(), "vTasks");
114
116
  const archivoOrigen = path.join(__dirname, "content", "index.js");
115
117
  const archivoDestino = path.join(carpetaDestino, "index.js");
118
+ const archivoConfig = path.join(carpetaDestino, "config.js");
116
119
  if (fs.existsSync(carpetaDestino)) {
117
120
  console.error(LOG_COLORS.RED, "Error: vTasks directory already exist");
118
121
  process.exit(1);
@@ -120,6 +123,13 @@ const main = async () => {
120
123
  fs.mkdirSync(carpetaDestino, { recursive: true });
121
124
  fs.copyFileSync(archivoOrigen, archivoDestino);
122
125
 
126
+ const configContent = `module.exports = {
127
+ projectName: '${projectName}',
128
+ vTasksUrl: '${VTASKS_CONFIG_URL}'
129
+ };
130
+ `;
131
+ fs.writeFileSync(archivoConfig, configContent);
132
+
123
133
  console.log(LOG_COLORS.GREEN, "Set Up completed ✓");
124
134
  };
125
135
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vtasks-automate-cli",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Automate your vTasks workflow with ease — move tasks between states without opening the app",
5
5
  "bin": {
6
6
  "vtasks-automate": "init.js"