From dd6624d50c2ef0609b68c6cd31dd0380b4292604 Mon Sep 17 00:00:00 2001 From: colder Date: Thu, 1 Oct 2020 20:31:35 +0800 Subject: [PATCH] feat/types: import types in jsdoc - remove main field from package.json - update integration test fixtures - update readme example --- README.md | 5 ++--- package.json | 1 - test/integration/fixtures/build-withConfig/tsdx.config.js | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5a44a66ea..806ded671 100644 --- a/README.md +++ b/README.md @@ -324,15 +324,14 @@ The `options` object type definition in [src/externalTypes.ts](src/externalTypes #### Example: Adding Postcss ```js -const tsdx = require('tsdx'); const postcss = require('rollup-plugin-postcss'); const autoprefixer = require('autoprefixer'); const cssnano = require('cssnano'); module.exports = { /** - * @param {tsdx.RollupOptions} config - * @param {tsdx.TsdxOptions} options + * @param {import('tsdx').RollupOptions} config + * @param {import('tsdx').TsdxOptions} options */ rollup(config, options) { config.plugins.push( diff --git a/package.json b/package.json index edcc4baad..743a09b79 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,6 @@ "bugs": { "url": "https://github.com/formium/tsdx/issues" }, - "main": "./dist/externalTypes.js", "typings": "./dist/externalTypes.d.ts", "bin": { "tsdx": "./dist/index.js" diff --git a/test/integration/fixtures/build-withConfig/tsdx.config.js b/test/integration/fixtures/build-withConfig/tsdx.config.js index 57f2c6a2a..7cd3fdaa3 100644 --- a/test/integration/fixtures/build-withConfig/tsdx.config.js +++ b/test/integration/fixtures/build-withConfig/tsdx.config.js @@ -1,13 +1,11 @@ -/* eslint-disable-next-line no-unused-vars */ -const tsdx = require('..'); const postcss = require('rollup-plugin-postcss'); const autoprefixer = require('autoprefixer'); const cssnano = require('cssnano'); module.exports = { /** - * @param {tsdx.RollupOptions} config - * @param {tsdx.TsdxOptions} options + * @param {import('tsdx').RollupOptions} config + * @param {import('tsdx').TsdxOptions} options */ rollup(config, options) { config.plugins.push(