@vanillaes/esmtk 0.25.1 → 0.26.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.
package/README.md CHANGED
@@ -15,7 +15,7 @@ ESMTK, essential tools for ECMAScript module development
15
15
  - [init](#init) - Create a package.json file for ECMAScript module development
16
16
  - [test](#test) - Run tests (using Tape-ES)
17
17
  - [lint](#lint) - Lint the source code (using Lint-ES)
18
- - [types](#types) - Type check the JSDoc typings (using Typescript)
18
+ - [type](#type) - Type check the JSDoc typings (using Typescript)
19
19
  - [bundle](#bundle) - Bundle the source code to an ECMAScript module (using ESBuild)
20
20
  - [minify](#minify) - Bundle and Minify the source code to an ECMAScript module (using ESBuild)
21
21
  - [commonjs](#commonjs) - Bundle the source code to a CommonJS module (using ESBuild)
@@ -101,13 +101,13 @@ esmtk --fix lint
101
101
  ```
102
102
 
103
103
 
104
- ## Types
104
+ ## Type
105
105
 
106
106
  Type check the JSDoc typings (using Typescript)
107
107
 
108
108
  ### Arguments
109
109
 
110
- `esmtk types [...options] [entry]`
110
+ `esmtk type [...options] [entry]`
111
111
 
112
112
  - `[entry]` - the entry-point for the source
113
113
  - `--strict` - enable 'strict mode' type checks
@@ -116,10 +116,10 @@ Type check the JSDoc typings (using Typescript)
116
116
 
117
117
  ```sh
118
118
  # type check the sources
119
- esmtk types index.js
119
+ esmtk type index.js
120
120
 
121
121
  # type check the sources (with 'strict mode' enabled)
122
- esmtk types --strict index.js
122
+ esmtk type --strict index.js
123
123
  ```
124
124
 
125
125
  **Node: Due to Typescript limitations, inline JSDoc typings will be ignored if typings (ie `*.d.ts` files) exist.**
@@ -8,5 +8,5 @@ export { minify } from './minify.js'
8
8
  export { preview } from './preview.js'
9
9
  export { rm } from './rm.js'
10
10
  export { test } from './test.js'
11
- export { types } from './types.js'
11
+ export { type } from './type.js'
12
12
  export { typings } from './typings.js'
@@ -74,7 +74,7 @@ export async function init (options) {
74
74
  pkg.scripts = {}
75
75
  pkg.scripts.test = 'esmtk test'
76
76
  pkg.scripts.lint = 'esmtk lint'
77
- pkg.scripts.types = `esmtk types ${entry}`
77
+ pkg.scripts.type = `esmtk type ${entry}`
78
78
  pkg.scripts.typings = `esmtk typings ${entry}`
79
79
  pkg.scripts.clean = 'esmtk clean --typings'
80
80
  pkg.scripts.preview = 'esmtk preview'
@@ -6,7 +6,7 @@ import { spawn } from 'child_process'
6
6
  * @param {string} entry the entry point
7
7
  * @param {object} options 'types' options
8
8
  */
9
- export async function types (entry, options) {
9
+ export async function type (entry, options) {
10
10
  const npmExists = await which('npm')
11
11
  if (!npmExists) {
12
12
  console.error('npm not found')
package/bin/esmtk.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { bundle, clean, cp, commonjs, init, lint, minify, preview, rm, test, types, typings } from './commands/index.js'
2
+ import { bundle, clean, cp, commonjs, init, lint, minify, preview, rm, test, type, typings } from './commands/index.js'
3
3
  import { Command } from 'commander'
4
4
  import { createRequire } from 'module'
5
5
  const require = createRequire(import.meta.url)
@@ -33,10 +33,10 @@ program.command('lint')
33
33
  lint(flags)
34
34
  })
35
35
 
36
- program.command('types <entry>')
36
+ program.command('type <entry>')
37
37
  .description('Type check the JSDoc typings using Typescript')
38
38
  .action((entry, options) => {
39
- types(entry, options)
39
+ type(entry, options)
40
40
  })
41
41
 
42
42
  program.command('typings <entry>')
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@vanillaes/esmtk",
3
- "version": "0.25.1",
3
+ "version": "0.26.0",
4
4
  "description": "ES Module Toolkit",
5
5
  "keywords": [
6
6
  "ecmascript",
7
7
  "esm",
8
8
  "esmodules",
9
+ "typescript",
9
10
  "cli",
10
11
  "developer-tools",
11
12
  "jsdoc",
@@ -39,13 +40,13 @@
39
40
  "scripts": {
40
41
  "test": "./bin/esmtk.js test",
41
42
  "lint": "./bin/esmtk.js lint",
42
- "types": "./bin/esmtk.js types src/index.js && ./bin/esmtk.js types bin/commands/index.js",
43
+ "type": "./bin/esmtk.js type src/index.js && ./bin/esmtk.js type bin/commands/index.js",
43
44
  "bundle": "./bin/esmtk.js bundle --platform=node src/index.js src/index.esm.js",
44
45
  "minify": "./bin/esmtk.js minify --platform=node src/index.js src/index.min.js",
45
46
  "typings": "./bin/esmtk.js typings src/index.js",
46
47
  "clean": "./bin/esmtk.js clean --typings",
47
48
  "preview": "./bin/esmtk.js preview",
48
- "preversion": "npm run test && npm run lint && npm run types",
49
+ "preversion": "npm run test && npm run lint && npm run type",
49
50
  "postversion": "git push --follow-tags"
50
51
  },
51
52
  "engines": {