@polymorphism-tech/morph-spec 1.0.1 → 1.0.4

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.
package/README.md CHANGED
@@ -46,21 +46,40 @@ MORPH-SPEC é um framework de desenvolvimento orientado por especificações com
46
46
  # Navegue até seu projeto
47
47
  cd /caminho/do/seu/projeto
48
48
 
49
- # Execute o instalador
49
+ # Execute o instalador (não precisa instalar nada)
50
50
  npx @polymorphism-tech/morph-spec init
51
51
  ```
52
52
 
53
- ### Instalação Global
53
+ ### Instalação Global (Opcional)
54
+
55
+ Se preferir ter o comando disponível globalmente:
54
56
 
55
57
  ```bash
56
- # Instale globalmente
57
58
  npm install -g @polymorphism-tech/morph-spec
58
-
59
- # Use em qualquer projeto
60
- cd /seu/projeto
61
59
  morph-spec init
62
60
  ```
63
61
 
62
+ <details>
63
+ <summary><strong>Windows: Comando não reconhecido?</strong></summary>
64
+
65
+ Se após instalar globalmente o comando `morph-spec` não for reconhecido, adicione o npm ao PATH:
66
+
67
+ **PowerShell (executar como Administrador):**
68
+ ```powershell
69
+ # Adicionar npm global ao PATH permanentemente
70
+ $npmPath = "$env:APPDATA\npm"
71
+ [Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";$npmPath", "User")
72
+ ```
73
+
74
+ Depois, **feche e reabra o terminal**.
75
+
76
+ **Alternativa:** Use `npx` que funciona sem configurar PATH:
77
+ ```bash
78
+ npx @polymorphism-tech/morph-spec init
79
+ ```
80
+
81
+ </details>
82
+
64
83
  ### Comandos CLI
65
84
 
66
85
  | Comando | Descrição |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polymorphism-tech/morph-spec",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "description": "MORPH-SPEC: Methodical Orchestration for Reliable Production-ready SPEC-driven development framework for Claude Code",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -21,7 +21,8 @@
21
21
  "files": [
22
22
  "bin/",
23
23
  "src/",
24
- "content/"
24
+ "content/",
25
+ "README.md"
25
26
  ],
26
27
  "type": "module",
27
28
  "engines": {
@@ -10,7 +10,8 @@ import {
10
10
  readJson,
11
11
  writeJson,
12
12
  ensureDir,
13
- writeFile
13
+ writeFile,
14
+ readFile
14
15
  } from '../utils/file-copier.js';
15
16
 
16
17
  export async function initCommand(options) {
@@ -42,7 +43,7 @@ export async function initCommand(options) {
42
43
 
43
44
  // Backup existing CLAUDE.md if not from MORPH
44
45
  if (await pathExists(claudeMdDest)) {
45
- const existingContent = await import('fs-extra').then(fs => fs.readFile(claudeMdDest, 'utf8'));
46
+ const existingContent = await readFile(claudeMdDest);
46
47
  if (!existingContent.includes('MORPH-SPEC')) {
47
48
  await copyFile(claudeMdDest, `${claudeMdDest}.backup`);
48
49
  logger.dim('Backed up existing CLAUDE.md');
@@ -48,3 +48,7 @@ export async function writeFile(path, content) {
48
48
  export async function removeDir(path) {
49
49
  await fs.remove(path);
50
50
  }
51
+
52
+ export async function readFile(path) {
53
+ return fs.readFile(path, 'utf8');
54
+ }