mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-15 20:25:18 +02:00
Update configuration to output types
This commit is contained in:
parent
0b6973b322
commit
bf94386cc5
|
@ -3,7 +3,7 @@
|
|||
"version": "9.1.0",
|
||||
"description": "A vanilla JS customisable text input/select box plugin",
|
||||
"main": "./public/assets/scripts/choices.js",
|
||||
"types": "./types/index.d.ts",
|
||||
"types": "./public/types/src/index.d.ts",
|
||||
"scripts": {
|
||||
"start": "run-p js:watch css:watch",
|
||||
"build": "run-p js:build css:build",
|
||||
|
|
7
src/index.ts
Normal file
7
src/index.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import Choices from './scripts/choices';
|
||||
|
||||
export * from './scripts/constants';
|
||||
export * from './scripts/defaults';
|
||||
export { default as templates } from './scripts/templates';
|
||||
|
||||
export default Choices;
|
|
@ -3,8 +3,12 @@
|
|||
"baseUrl": "/",
|
||||
"outDir": "./dist/",
|
||||
"allowJs": true,
|
||||
"declaration": true,
|
||||
"declarationDir": "./public/types/",
|
||||
"declarationMap": true,
|
||||
"sourceMap": true,
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"target": "es5",
|
||||
"lib": ["es2017", "dom"],
|
||||
|
|
|
@ -8,7 +8,7 @@ const exclude = /node_modules/;
|
|||
* @type {import('webpack').Configuration}
|
||||
*/
|
||||
module.exports = {
|
||||
entry: ['./src/scripts/choices'],
|
||||
entry: ['./src/index'],
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue