noshift.js 0.0.5 → 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.
- package/README.md +79 -0
- package/commands/create.js +1 -1
- package/package.json +10 -2
package/README.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# NoShift.js
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
```bash
|
|
5
|
+
npm install -g noshift.js@latest
|
|
6
|
+
npx nsjs create
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## English
|
|
10
|
+
|
|
11
|
+
### Language
|
|
12
|
+
NoShift.js
|
|
13
|
+
|
|
14
|
+
### Extension
|
|
15
|
+
`.nsjs`
|
|
16
|
+
|
|
17
|
+
### Summary
|
|
18
|
+
Typing symbols with Shift is tiring. NoShift.js is a JavaScript-like language that allows you to write JavaScript **without using the Shift key**.
|
|
19
|
+
It compiles to plain JavaScript.
|
|
20
|
+
|
|
21
|
+
The mapping is based on the keyboard layout of the creator’s laptop.
|
|
22
|
+
|
|
23
|
+
## 日本語
|
|
24
|
+
### 言語名
|
|
25
|
+
NoShift.js
|
|
26
|
+
|
|
27
|
+
### 拡張子
|
|
28
|
+
.nsjs
|
|
29
|
+
|
|
30
|
+
### 概略
|
|
31
|
+
記号を入力するときに Shift を押すのが面倒なので、Shift を押さずに JavaScript が書ける言語を作りました。
|
|
32
|
+
NoShift.js は JavaScript に変換されます。
|
|
33
|
+
|
|
34
|
+
この記号変換の基準は、作者のノートパソコンのキーボード配列です。
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
! --> ^1
|
|
38
|
+
" --> ^2
|
|
39
|
+
$ --> ^4
|
|
40
|
+
% --> ^5
|
|
41
|
+
& --> ^6
|
|
42
|
+
' --> ^7
|
|
43
|
+
( --> ^8
|
|
44
|
+
) --> ^9
|
|
45
|
+
= --> ^-
|
|
46
|
+
~ --> ^^
|
|
47
|
+
| --> ^\
|
|
48
|
+
` --> ^@
|
|
49
|
+
{ --> ^[
|
|
50
|
+
} --> ^]
|
|
51
|
+
+ --> ^;
|
|
52
|
+
* --> ^:
|
|
53
|
+
< --> ^,
|
|
54
|
+
> --> ^.
|
|
55
|
+
? --> ^/
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Escaping in strings
|
|
59
|
+
Examples:
|
|
60
|
+
```nsjs
|
|
61
|
+
^2^5^2 --> "^5"
|
|
62
|
+
^7^5^7 --> '^5'
|
|
63
|
+
^@^5^@ --> `^5`
|
|
64
|
+
```
|
|
65
|
+
Template literals (${} syntax)
|
|
66
|
+
|
|
67
|
+
```nsjs
|
|
68
|
+
^@^5^4^[^2Hello World!^2^]^@ --> `^5${"Hello World!"}`
|
|
69
|
+
```
|
|
70
|
+
Hello World!
|
|
71
|
+
Example:
|
|
72
|
+
|
|
73
|
+
```nsjs
|
|
74
|
+
console.log^8^2Hello World!^2^9;
|
|
75
|
+
Result:
|
|
76
|
+
```
|
|
77
|
+
```js
|
|
78
|
+
console.log("Hello World!");
|
|
79
|
+
```
|
package/commands/create.js
CHANGED
|
@@ -101,7 +101,7 @@ export default async function create(projectNameArg) {
|
|
|
101
101
|
|
|
102
102
|
// nsjs.config.js を作成
|
|
103
103
|
const configContent = `export default {
|
|
104
|
-
build: "", //
|
|
104
|
+
build: "", // default: ./build
|
|
105
105
|
};
|
|
106
106
|
`;
|
|
107
107
|
await fs.writeFile("nsjs.config.js", configContent);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "noshift.js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Joke language.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nsjs": "./bin/cli.js"
|
|
@@ -10,11 +10,19 @@
|
|
|
10
10
|
"dev": "node commands/dev.js",
|
|
11
11
|
"build": "node commands/build.js"
|
|
12
12
|
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/otoneko1102/NoShift.js.git"
|
|
16
|
+
},
|
|
13
17
|
"keywords": [
|
|
14
|
-
"noshift"
|
|
18
|
+
"noshift", "nsjs", "joke"
|
|
15
19
|
],
|
|
16
20
|
"author": "otoneko.",
|
|
17
21
|
"license": "MIT",
|
|
22
|
+
"bugs": {
|
|
23
|
+
"url": "https://github.com/otoneko1102/NoShift.js/issues"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://otoneko1102.github.io/NoShift.js/",
|
|
18
26
|
"dependencies": {
|
|
19
27
|
"commander": "^14.0.0",
|
|
20
28
|
"inquirer": "^12.6.3"
|