Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d567c7f

Browse files
committed
rev 1.2.1 release
1 parent a3225b2 commit d567c7f

10 files changed

+38
-23
lines changed

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -63,30 +63,42 @@ Usage
6363

6464
[![NPM version](https://img.shields.io/npm/v/gridstack.svg)](https://www.npmjs.com/package/gridstack)
6565

66-
```bash
66+
```js
6767
yarn add gridstack
68-
or
68+
// or
6969
npm install --save gridstack
7070
```
7171

7272
## Include
7373

74-
* Using webpack, you can now import the files:
74+
```js
75+
import 'gridstack/dist/gridstack.all.js';
76+
import 'gridstack/dist/gridstack.css';
77+
```
78+
79+
* when using webpack/ES6 imports you will need this instead (instead of all.js):
7580

7681
```js
7782
import 'jquery';
7883
import 'jquery-ui';
7984

8085
import 'gridstack/dist/gridstack-poly'; // optional IE support
81-
import GridStack from 'gridstack/dist/gridstack';
86+
import GridStack from 'gridstack';
8287
import 'gridstack/dist/gridstack.jQueryUI';
8388
import 'gridstack/dist/gridstack.css';
8489
```
8590

86-
If your project doesn't make use of jQuery or jQueryUI and you don't want to include these libs,
87-
you can use the lightweight files provided by Gridstack instead of the official ones.
91+
If your project doesn't need to bring it's own jQuery (see [section](#jquery-application)) we include 3.5.1 that always export jQuery)
92+
or jQuery-ui (we include a trimmed version with just drag&drop at 1/5th the size)
93+
you can use the lightweight files provided by Gridstack instead.
8894

89-
For this you have to define an alias in your webpack configuration:
95+
either use full paths above
96+
```js
97+
import 'gridstack/dist/jquery';
98+
import 'gridstack/dist/jquery-ui';
99+
```
100+
101+
or define an alias in your webpack configuration:
90102
```
91103
module.exports = {
92104
...
@@ -98,7 +110,6 @@ module.exports = {
98110
}
99111
}
100112
```
101-
102113
* alternatively in html
103114

104115
```html
@@ -109,10 +120,12 @@ module.exports = {
109120
* or using CDN (minimized):
110121

111122
```html
112-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].0/dist/gridstack.min.css" />
113-
<script src="https://cdn.jsdelivr.net/npm/[email protected].0/dist/gridstack.all.js"></script>
123+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].1/dist/gridstack.min.css" />
124+
<script src="https://cdn.jsdelivr.net/npm/[email protected].1/dist/gridstack.all.js"></script>
114125
```
115126

127+
128+
116129
if you need to debug, look at the git demo/ examples for non min includes.
117130

118131
## Basic usage
@@ -203,7 +216,7 @@ GridStack.init( {column: N} );
203216

204217
2) include `gridstack-extra.css` if **N < 12** (else custom CSS - see next). Without these, things will not render/work correctly.
205218
```html
206-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].0/dist/gridstack-extra.css"/>
219+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected].1/dist/gridstack-extra.css"/>
207220

208221
<div class="grid-stack grid-stack-N">...</div>
209222
```
@@ -365,7 +378,7 @@ Recommend looking at the [many samples](./demo) for more code examples.
365378
366379
### jQuery Application
367380
368-
We're working on implementing HTML5 drag'n'drop through the plugin system. Right now it is still jquery-ui based. Because of that we are still bundling `jquery` (3.5.1) + `jquery-ui` (1.12.1 minimal drag|drop|resize) internally in `gridstack.all.js`. IFF your app needs to bring your own version instead, you should **instead** include `gridstack-poly.min.js` (optional IE support) + `gridstack.min.js` + `gridstack.jQueryUI.min.js` after you import your JQ libs. But note that there are issue with jQuery and ES6 import (see [1306](https://github.com/gridstack/gridstack.js/issues/1306))
381+
We're working on implementing HTML5 drag'n'drop through the plugin system. Right now it is still jquery-ui based. Because of that we are still bundling `jquery` (3.5.1) + `jquery-ui` (1.12.1 minimal drag|drop|resize) internally in `gridstack.all.js`. IFF your app needs to bring your own version instead, you should **instead** include `gridstack-poly.min.js` (optional IE support) + `gridstack.min.js` + `gridstack.jQueryUI.min.js` after you import your JQ libs.
369382
370383
Changes
371384
=====

demo/two.html

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010
<link rel="stylesheet" href="demo.css"/>
1111
<link rel="stylesheet" href="../dist/gridstack-extra.css"/>
1212

13-
<script src="../src/jquery.js"></script>
14-
<script src="../src/gridstack.js"></script>
15-
<script src="../src/jquery-ui.js"></script>
16-
<script src="../src/gridstack.jQueryUI.js"></script>
13+
<script src="../dist/gridstack.all.js"></script>
1714

1815
<style type="text/css">
1916
.grid-stack {

doc/CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Change log
55
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
66
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*
77

8+
- [1.2.1 (2020-09-04)](#121-2020-09-04)
89
- [1.2.0 (2020-08-01)](#120-2020-08-01)
910
- [1.1.2 (2020-05-17)](#112-2020-05-17)
1011
- [1.1.1 (2020-03-17)](#111-2020-03-17)
@@ -34,6 +35,10 @@ Change log
3435

3536
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
3637

38+
## 1.2.1 (2020-09-04)
39+
40+
- fix [1341](https://github.com/gridstack/gridstack.js/pull/1341) Enable the UMD behavior for bundlers compatibility
41+
3742
## 1.2.0 (2020-08-01)
3843

3944
- fix [1311](https://github.com/gridstack/gridstack.js/issues/1311) domAttr is not defined

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gridstack",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "JavaScript / TypeScript for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Ember, knockout...)",
55
"main": "dist/gridstack",
66
"repository": {

src/gridstack-extra.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* gridstack 1.2.0 extra CSS for [2-11] columns (non default)
2+
* gridstack 1.2.1 extra CSS for [2-11] columns (non default)
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.

src/gridstack-poly.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** gridstack.js 1.2.0 - IE and older browsers Polyfills for this library @preserve*/
1+
/** gridstack.js 1.2.1 - IE and older browsers Polyfills for this library @preserve*/
22
/**
33
* https://gridstackjs.com/
44
* (c) 2019-2020 Alain Dumesny

src/gridstack.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Type definitions for Gridstack 1.2.0
1+
// Type definitions for Gridstack 1.2.1
22
// Project: https://gridstackjs.com/
33
// Definitions by: Pascal Senn <https://github.com/PascalSenn>
44
// Ricky Blankenaufulland <https://github.com/ZoolWay>

src/gridstack.jQueryUI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** gridstack.js 1.2.0 - JQuery UI Drag&Drop plugin @preserve */
1+
/** gridstack.js 1.2.1 - JQuery UI Drag&Drop plugin @preserve */
22
/**
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov

src/gridstack.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* gridstack.js 1.2.0
2+
* gridstack.js 1.2.1
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.

src/gridstack.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* required gridstack 1.2.0 CSS for default 12 and 1 columnMode size. Use gridstack-extra.css for others
2+
* required gridstack 1.2.1 CSS for default 12 and 1 columnMode size. Use gridstack-extra.css for others
33
* https://gridstackjs.com/
44
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
55
* gridstack.js may be freely distributed under the MIT license.

0 commit comments

Comments
 (0)