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",
|
"version": "9.1.0",
|
||||||
"description": "A vanilla JS customisable text input/select box plugin",
|
"description": "A vanilla JS customisable text input/select box plugin",
|
||||||
"main": "./public/assets/scripts/choices.js",
|
"main": "./public/assets/scripts/choices.js",
|
||||||
"types": "./types/index.d.ts",
|
"types": "./public/types/src/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "run-p js:watch css:watch",
|
"start": "run-p js:watch css:watch",
|
||||||
"build": "run-p js:build css:build",
|
"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": "/",
|
"baseUrl": "/",
|
||||||
"outDir": "./dist/",
|
"outDir": "./dist/",
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
|
"declaration": true,
|
||||||
|
"declarationDir": "./public/types/",
|
||||||
|
"declarationMap": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
|
"moduleResolution": "node",
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": ["es2017", "dom"],
|
"lib": ["es2017", "dom"],
|
||||||
|
|
|
@ -8,7 +8,7 @@ const exclude = /node_modules/;
|
||||||
* @type {import('webpack').Configuration}
|
* @type {import('webpack').Configuration}
|
||||||
*/
|
*/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: ['./src/scripts/choices'],
|
entry: ['./src/index'],
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue