Skip to content

Commit

Permalink
generate types for package
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVipond committed May 17, 2021
1 parent 1b424c1 commit d2d9ec5
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 108 deletions.
7 changes: 7 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore everything
*

# Except these files
# !dist/**/*.js
!lib/**/*.js
!lib/index.d.ts
94 changes: 0 additions & 94 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,25 @@
"name": "@alexvipond/css-selector-pipes",
"version": "0.0.0",
"description": "Pipeline functions for building CSS selectors programmatically",
"files": [
"dist"
],
"main": "./dist/css-selector-pipes.umd.js",
"module": "./dist/css-selector-pipes.es.js",
"main": "./lib/index.umd.js",
"module": "./lib/index.es.js",
"types": "./lib/index.d.ts",
"exports": {
".": {
"import": "./dist/css-selector-pipes.es.js",
"require": "./dist/css-selector-pipes.umd.js"
"import": "./lib/index.es.js",
"require": "./lib/index.umd.js"
}
},
"scripts": {
"dev": "vite",
"build": "vite build",
"build:lib": "vite build --config vite.lib.config.ts",
"build:lib": "vite build --config vite.lib.config.ts && tsc",
"test:only": "run() { uvu -r ts-node/register tests/$2 $1.test.ts$; }; run",
"test": "npm run test:only ."
},
"devDependencies": {
"@fontsource/inconsolata": "^4.3.0",
"@fontsource/inter": "^4.3.0",
"@fontsource/shadows-into-light-two": "^4.3.0",
"@tailwindcss/forms": "^0.3.2",
"@vitejs/plugin-vue": "^1.2.2",
"autoprefixer": "^10.2.5",
Expand All @@ -40,7 +37,6 @@
"@headlessui/vue": "^1.2.0",
"@heroicons/vue": "^1.0.1",
"nanoid": "^3.1.23",
"query-string": "^7.0.0",
"vue": "^3.0.11"
}
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"declaration": true,
"declarationDir": "types",
"declarationDir": "lib",
"emitDeclarationOnly": true
},
"include": [
"src/**/*",
"src/pipes/**/*",
],
"exclude": [
"node_modules"
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import pluginVue from '@vitejs/plugin-vue'

export default {
plugins: [
pluginVue()
pluginVue(),
],
}
3 changes: 2 additions & 1 deletion vite.lib.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ export default {
build: {
lib: {
entry: 'src/pipes/index.ts',
name: 'CssSelectorPipes',
name: 'CssSelectorPipes',
fileName: 'index',
},
outDir: 'lib',
}
Expand Down

0 comments on commit d2d9ec5

Please sign in to comment.