create-sonicjs 2.0.7 → 2.0.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.
- package/package.json +1 -1
- package/src/cli.js +4 -2
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -11,8 +11,10 @@ import validatePackageName from 'validate-npm-package-name'
|
|
|
11
11
|
|
|
12
12
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
const
|
|
14
|
+
// Read version from package.json
|
|
15
|
+
const packageJsonPath = path.join(__dirname, '../package.json')
|
|
16
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'))
|
|
17
|
+
const VERSION = packageJson.version
|
|
16
18
|
|
|
17
19
|
// Templates available
|
|
18
20
|
const TEMPLATES = {
|