create-jwn-js 1.1.2 → 1.1.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.
Files changed (2) hide show
  1. package/index.mjs +3 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -18,6 +18,7 @@ import json5 from "json5";
18
18
  // red
19
19
  // } = require('kolorist')
20
20
  import {yellow, blue, red} from "kolorist";
21
+ const __dirname = import.meta.dirname;
21
22
  const cwd = process.cwd()
22
23
  const FRAMEWORKS = [
23
24
  {
@@ -192,7 +193,7 @@ async function init() {
192
193
 
193
194
  // connect.json
194
195
  if(fs.existsSync(path.join(templateDir, `connect-template.json`))) {
195
- const connect = require(path.join(templateDir, `connect-template.json`));
196
+ const connect = json5.parse(fs.readFileSync(path.join(templateDir, `connect-template.json`)).toString());
196
197
  write('connect.json', JSON.stringify(connect, null, 2));
197
198
  }
198
199
 
@@ -203,7 +204,7 @@ async function init() {
203
204
  }
204
205
 
205
206
  // package.json
206
- const pkg = require(path.join(templateDir, `package.json`))
207
+ const pkg = json5.parse(fs.readFileSync(path.join(templateDir, `package.json`)).toString());
207
208
 
208
209
  pkg.name = packageName || targetDir
209
210
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-jwn-js",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "license": "PRIVATE",
5
5
  "author": "Webigorkiev",
6
6
  "bin": {