@hsusulist/lcode 0.0.0-stage → 0.1.1

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 +12 -3
  2. package/bin/lcode.js +29 -0
  3. package/package.json +32 -6
package/README.md CHANGED
@@ -1,3 +1,12 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # @hsusulist/lcode
2
+
3
+ Install the LCode terminal editor for LUC projects on Windows:
4
+
5
+ ```powershell
6
+ npm install -g @hsusulist/lcode
7
+ lcode .
8
+ ```
9
+
10
+ The package uses the LUC runtime and forwards its arguments to
11
+ `luc --lcode [path]`. Install `@hsusulist/luc` directly if you also want the
12
+ LUC interpreter command.
package/bin/lcode.js ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ const { spawnSync } = require('child_process');
5
+ const path = require('path');
6
+
7
+ if (process.platform !== 'win32') {
8
+ console.error('lcode: this package currently supports Windows only.');
9
+ process.exit(1);
10
+ }
11
+
12
+ let launcher;
13
+ try {
14
+ launcher = require.resolve('@hsusulist/luc/bin/luc.js');
15
+ } catch (error) {
16
+ console.error('lcode: the @hsusulist/luc launcher is unavailable: ' + error.message);
17
+ process.exit(1);
18
+ }
19
+
20
+ const result = spawnSync(process.execPath, [launcher, '--lcode'].concat(process.argv.slice(2)), {
21
+ stdio: 'inherit',
22
+ cwd: process.cwd()
23
+ });
24
+
25
+ if (result.error) {
26
+ console.error('lcode: ' + result.error.message);
27
+ process.exit(1);
28
+ }
29
+ process.exit(result.status === null ? 1 : result.status);
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
- {
2
- "name": "@hsusulist/lcode",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
1
+ {
2
+ "name": "@hsusulist/lcode",
3
+ "version": "0.1.1",
4
+ "description": "LCode terminal editor for LUC projects",
5
+ "bin": {
6
+ "lcode": "bin/lcode.js"
7
+ },
8
+ "files": [
9
+ "bin",
10
+ "README.md"
11
+ ],
12
+ "os": [
13
+ "win32"
14
+ ],
15
+ "engines": {
16
+ "node": ">=16"
17
+ },
18
+ "license": "Apache-2.0",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/hsusulist/luc.git",
22
+ "directory": "npm/lcode"
23
+ },
24
+ "keywords": [
25
+ "lcode",
26
+ "luc",
27
+ "editor"
28
+ ],
29
+ "dependencies": {
30
+ "@hsusulist/luc": "^0.2.3"
31
+ }
32
+ }