diff --git a/README.md b/README.md index 4b468fd5a..031e9bbcd 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ ES6 or Typescript ```js import 'gridstack/dist/gridstack.min.css'; -import GridStack from 'gridstack'; +import { GridStack } from 'gridstack'; // THEN to get HTML5 drag&drop import 'gridstack/dist/h5/gridstack-dd-native'; // OR to get legacy jquery-ui drag&drop (support Mobile touch devices, h5 does not yet) diff --git a/doc/CHANGES.md b/doc/CHANGES.md index 4ec176595..6ac3cac5a 100644 --- a/doc/CHANGES.md +++ b/doc/CHANGES.md @@ -57,6 +57,7 @@ Change log - fix [#219](https://github.com/gridstack/gridstack.js/issues/219) **fixing another 6 years old request** we now automatically insert extra rows when dragging an item at the bottom below others to make it easier to insert below. - fix [#1687](https://github.com/gridstack/gridstack.js/issues/1687) more fix for drag between 2 grids with `row / maxRow` broken in 4.x +- fix export symbols .d.ts for `gridstack-h5.js | gridstack-jq.js | gridstack-static.js` ## 4.0.3 (2021-3-28) diff --git a/karma.conf.js b/karma.conf.js index c665632b0..a215dcc98 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -33,7 +33,10 @@ module.exports = function(config) { ], // BUT list of files to exclude exclude: [ - 'src/index*.ts', + // used for webpack h5/jq/static .js + "src/gridstack-h5.ts", + "src/gridstack-jq.ts", + "src/gridstack-static.ts", 'src/jq/*', // use h5 version for unit testing // 'src/h5/*', // use jq version for unit testing ], diff --git a/src/index-h5.ts b/src/gridstack-h5.ts similarity index 100% rename from src/index-h5.ts rename to src/gridstack-h5.ts diff --git a/src/index-jq.ts b/src/gridstack-jq.ts similarity index 100% rename from src/index-jq.ts rename to src/gridstack-jq.ts diff --git a/src/index-static.ts b/src/gridstack-static.ts similarity index 100% rename from src/index-static.ts rename to src/gridstack-static.ts diff --git a/tsconfig.json b/tsconfig.json index 6fd23c11a..b14699e23 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,10 @@ }, "exclude": [ "./src/**/*.spec.ts", - "./src/index*", // used for webpack h5/jq/static .js + // used for webpack h5/jq/static .js + "./src/gridstack-h5.ts", + "./src/gridstack-jq.ts", + "./src/gridstack-static.ts", ], "include": [ "./src/**/*.ts" diff --git a/webpack.config.js b/webpack.config.js index a2150715c..ebc86fead 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -2,9 +2,9 @@ const path = require('path'); module.exports = { entry: { - 'gridstack-h5': './src/index-h5.ts', - 'gridstack-jq': './src/index-jq.ts', - 'gridstack-static': './src/index-static.ts' + 'gridstack-h5': './src/gridstack-h5.ts', + 'gridstack-jq': './src/gridstack-jq.ts', + 'gridstack-static': './src/gridstack-static.ts' }, mode: 'production', // production vs development devtool: 'source-map',