nero-init 1.0.4 → 1.0.5

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.
@@ -19,7 +19,7 @@
19
19
  "test": "vitest",
20
20
  "format": "prettier --write .",
21
21
  "format:check": "prettier --check .",
22
- "lint": "eslint . --config",
22
+ "lint": "eslint .",
23
23
  "lint:fix": "eslint . --fix",
24
24
  "prepublishOnly": "npm run build",
25
25
  "postbuild": "chmod +x dist/index.js"
@@ -3,9 +3,9 @@
3
3
  import pkg from '../package.json' with { type: 'json' }
4
4
  import { handleCliOptions } from './cli/options.js'
5
5
 
6
- async function run() {
6
+ export async function run() {
7
7
  handleCliOptions()
8
- console.log(`${pkg.name} is running...`)
8
+ return `${pkg.name} is running...`
9
9
  }
10
10
 
11
- await run()
11
+ console.log(await run())
@@ -0,0 +1,9 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { run } from '../src/index.js'
3
+
4
+ describe('cli entry', () => {
5
+ it('returns a startup message', async () => {
6
+ const result = await run()
7
+ expect(result).toContain('running')
8
+ })
9
+ })
@@ -1 +1,3 @@
1
- console.log("library");
1
+ import { LIB_NAME } from './lib/index.js'
2
+
3
+ console.log(LIB_NAME)
@@ -0,0 +1 @@
1
+ export const LIB_NAME = 'library'
@@ -0,0 +1,8 @@
1
+ import { describe, it, expect } from 'vitest'
2
+ import { LIB_NAME } from '../src/lib'
3
+
4
+ describe('lib', () => {
5
+ it('exports a library identifier', () => {
6
+ expect(LIB_NAME).toBe('library')
7
+ })
8
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nero-init",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "Project scaffold for CLI, library and Web templates.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",