diff --git a/Gruntfile.js b/Gruntfile.js index a55471521..cfb546341 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -43,6 +43,7 @@ module.exports = function(grunt) { files: { 'dist/gridstack.js': ['src/gridstack.js'], 'dist/gridstack.d.ts': ['src/gridstack.d.ts'], + 'dist/gridstack.all.d.ts': ['src/gridstack.d.ts'], 'dist/gridstack.jQueryUI.js': ['src/gridstack.jQueryUI.js'], 'dist/gridstack-poly.js': ['src/gridstack-poly.js'], 'dist/jquery.js': ['src/jquery.js'], diff --git a/README.md b/README.md index ca9a0344b..d5315bbe2 100644 --- a/README.md +++ b/README.md @@ -258,6 +258,30 @@ working on touch-based devices. ``` +**NEW** +```js +// element identifier defaults to '.grid-stack', returns the grid +// Note: for Typescript use window.GridStack.init() until next native TS version +var grid = GridStack.init(opts?, element?); + +// returns DOM element +grid.addWidget('