noshift.js 0.6.0 → 0.7.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.
@@ -43,8 +43,8 @@ export default async function create(projectNameArg, options = {}) {
43
43
  const pkgPath = path.join(projectPath, "package.json");
44
44
  const pkg = JSON.parse(await fs.readFile(pkgPath, "utf-8"));
45
45
  pkg.scripts = pkg.scripts ?? {};
46
- pkg.scripts.compile = "nsc compile";
47
- pkg.scripts.dev = "nsc dev";
46
+ pkg.scripts.compile = "nsc";
47
+ pkg.scripts.dev = "nsc watch";
48
48
  if (usePrettier) {
49
49
  pkg.scripts.format = "prettier --write ./src";
50
50
  }
@@ -90,7 +90,7 @@ export default async function create(projectNameArg, options = {}) {
90
90
 
91
91
  // Install noshift.js
92
92
  logger.step("Installing noshift.js ...");
93
- execSync("npm install noshift.js", { stdio: "ignore" });
93
+ execSync("npm install --save-dev noshift.js", { stdio: "ignore" });
94
94
 
95
95
  // Create project files
96
96
  logger.step("Creating project files ...");
@@ -111,13 +111,13 @@ A [NoShift.js](https://github.com/otoneko1102/NoShift.js) project.
111
111
  ## Compile
112
112
 
113
113
  \`\`\`bash
114
- npm run compile
114
+ nsc
115
115
  \`\`\`
116
116
 
117
117
  ## Dev (watch mode)
118
118
 
119
119
  \`\`\`bash
120
- npm run dev
120
+ nsc watch
121
121
  \`\`\`
122
122
  `;
123
123
 
@@ -129,6 +129,6 @@ npm run dev
129
129
  console.log("");
130
130
  logger.info("Next steps:");
131
131
  console.log(` ${logger.highlight(`cd ${projectName}`)}`);
132
- console.log(` ${logger.highlight("npm run compile")}`);
132
+ console.log(` ${logger.highlight("nsc")}`);
133
133
  console.log("");
134
134
  }
package/commands/init.js CHANGED
@@ -36,9 +36,7 @@ const PLUGIN_NAME = "prettier-plugin-noshift.js";
36
36
  */
37
37
  async function addPluginToExistingConfig(filePath) {
38
38
  const basename = path.basename(filePath);
39
- const isJson =
40
- basename === ".prettierrc" ||
41
- basename === ".prettierrc.json";
39
+ const isJson = basename === ".prettierrc" || basename === ".prettierrc.json";
42
40
 
43
41
  if (!isJson) {
44
42
  logger.warn(
@@ -77,7 +75,10 @@ async function createPrettierConfig() {
77
75
  trailingComma: "es5",
78
76
  plugins: [PLUGIN_NAME],
79
77
  };
80
- await writeFile(".prettierrc", JSON.stringify(prettierConfig, null, 2) + "\n");
78
+ await writeFile(
79
+ ".prettierrc",
80
+ JSON.stringify(prettierConfig, null, 2) + "\n",
81
+ );
81
82
  logger.success("Created .prettierrc");
82
83
  }
83
84
 
@@ -109,10 +110,7 @@ export default async function init() {
109
110
  logger.success("Overwritten nsjsconfig.json");
110
111
  }
111
112
  } else {
112
- await writeFile(
113
- configPath,
114
- JSON.stringify(DEFAULT_CONFIG, null, 2) + "\n",
115
- );
113
+ await writeFile(configPath, JSON.stringify(DEFAULT_CONFIG, null, 2) + "\n");
116
114
  logger.success("Created nsjsconfig.json");
117
115
  }
118
116
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noshift.js",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Joke language.",
5
5
  "bin": {
6
6
  "nsc": "./bin/cli.js"
@@ -18,14 +18,16 @@
18
18
  "keywords": [
19
19
  "noshift",
20
20
  "nsjs",
21
- "joke"
21
+ "joke",
22
+ "language",
23
+ "lang"
22
24
  ],
23
25
  "author": "otoneko.",
24
26
  "license": "MIT",
25
27
  "bugs": {
26
28
  "url": "https://github.com/otoneko1102/NoShift.js/issues"
27
29
  },
28
- "homepage": "https://otoneko1102.github.io/NoShift.js/",
30
+ "homepage": "https://noshift.js.org",
29
31
  "dependencies": {
30
32
  "commander": "^14.0.3"
31
33
  },