pulse-js-framework 1.4.7 → 1.4.8

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 (3) hide show
  1. package/README.md +22 -4
  2. package/cli/dev.js +24 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -451,11 +451,11 @@ onNativeReady(({ platform }) => {
451
451
 
452
452
  **Available APIs:** Storage, Device Info, Network Status, Toast, Vibration, Clipboard, App Lifecycle
453
453
 
454
- ## VSCode Extension
454
+ ## IDE Extensions
455
455
 
456
- Pulse includes a VSCode extension for `.pulse` files with syntax highlighting and snippets.
456
+ Pulse provides extensions for popular IDEs with syntax highlighting and snippets.
457
457
 
458
- ### Installation
458
+ ### VS Code
459
459
 
460
460
  ```bash
461
461
  # Windows (PowerShell)
@@ -467,12 +467,30 @@ cd vscode-extension
467
467
  bash install.sh
468
468
  ```
469
469
 
470
- Then restart VSCode. You'll get:
470
+ Then restart VS Code. You'll get:
471
471
  - Syntax highlighting for `.pulse` files
472
472
  - Code snippets (`page`, `state`, `view`, `@click`, etc.)
473
473
  - Bracket matching and auto-closing
474
474
  - Comment toggling (Ctrl+/)
475
475
 
476
+ ### IntelliJ IDEA / WebStorm
477
+
478
+ ```bash
479
+ cd intellij-plugin
480
+ ./gradlew buildPlugin
481
+ ```
482
+
483
+ Then install the plugin from `build/distributions/pulse-language-1.0.0.zip`:
484
+ 1. Open **Settings** > **Plugins**
485
+ 2. Click gear icon > **Install Plugin from Disk...**
486
+ 3. Select the `.zip` file and restart
487
+
488
+ Features:
489
+ - Syntax highlighting for `.pulse` files
490
+ - 17 Live Templates (snippets)
491
+ - Code folding for blocks
492
+ - Customizable color scheme
493
+
476
494
  ## TypeScript Support
477
495
 
478
496
  Pulse includes full TypeScript definitions for IDE autocomplete and type checking:
package/cli/dev.js CHANGED
@@ -79,7 +79,7 @@ export async function startDevServer(args) {
79
79
  try {
80
80
  const source = readFileSync(filePath, 'utf-8');
81
81
  const result = compile(source, {
82
- runtime: '/node_modules/pulse-js-framework/runtime/index.js'
82
+ runtime: '/runtime/index.js'
83
83
  });
84
84
 
85
85
  if (result.success) {
@@ -105,6 +105,29 @@ export async function startDevServer(args) {
105
105
  res.end(content);
106
106
  return;
107
107
  }
108
+
109
+ // Check if there's a .pulse file that should be compiled to .js
110
+ const pulseFilePath = filePath.replace(/\.(js|mjs)$/, '.pulse');
111
+ if (existsSync(pulseFilePath)) {
112
+ try {
113
+ const source = readFileSync(pulseFilePath, 'utf-8');
114
+ const result = compile(source, {
115
+ runtime: '/runtime/index.js'
116
+ });
117
+
118
+ if (result.success) {
119
+ res.writeHead(200, { 'Content-Type': 'application/javascript' });
120
+ res.end(result.code);
121
+ } else {
122
+ res.writeHead(500, { 'Content-Type': 'text/plain' });
123
+ res.end(`Compilation error: ${result.errors.map(e => e.message).join('\n')}`);
124
+ }
125
+ } catch (error) {
126
+ res.writeHead(500, { 'Content-Type': 'text/plain' });
127
+ res.end(`Error: ${error.message}`);
128
+ }
129
+ return;
130
+ }
108
131
  }
109
132
 
110
133
  // Handle node_modules
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pulse-js-framework",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "A declarative DOM framework with CSS selector-based structure and reactive pulsations",
5
5
  "type": "module",
6
6
  "main": "index.js",