Skip to content

Commit

Permalink
rev 1.2.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
adumesny committed Sep 4, 2020
1 parent a3225b2 commit d567c7f
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 23 deletions.
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,30 +63,42 @@ Usage

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

```bash
```js
yarn add gridstack
or
// or
npm install --save gridstack
```

## Include

* Using webpack, you can now import the files:
```js
import 'gridstack/dist/gridstack.all.js';
import 'gridstack/dist/gridstack.css';
```

* when using webpack/ES6 imports you will need this instead (instead of all.js):

```js
import 'jquery';
import 'jquery-ui';

import 'gridstack/dist/gridstack-poly'; // optional IE support
import GridStack from 'gridstack/dist/gridstack';
import GridStack from 'gridstack';
import 'gridstack/dist/gridstack.jQueryUI';
import 'gridstack/dist/gridstack.css';
```

If your project doesn't make use of jQuery or jQueryUI and you don't want to include these libs,
you can use the lightweight files provided by Gridstack instead of the official ones.
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)
or jQuery-ui (we include a trimmed version with just drag&drop at 1/5th the size)
you can use the lightweight files provided by Gridstack instead.

For this you have to define an alias in your webpack configuration:
either use full paths above
```js
import 'gridstack/dist/jquery';
import 'gridstack/dist/jquery-ui';
```

or define an alias in your webpack configuration:
```
module.exports = {
...
Expand All @@ -98,7 +110,6 @@ module.exports = {
}
}
```

* alternatively in html

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

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@1.2.0/dist/gridstack.min.css" />
<script src="https://cdn.jsdelivr.net/npm/gridstack@1.2.0/dist/gridstack.all.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@1.2.1/dist/gridstack.min.css" />
<script src="https://cdn.jsdelivr.net/npm/gridstack@1.2.1/dist/gridstack.all.js"></script>
```



if you need to debug, look at the git demo/ examples for non min includes.

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

2) include `gridstack-extra.css` if **N < 12** (else custom CSS - see next). Without these, things will not render/work correctly.
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@1.2.0/dist/gridstack-extra.css"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/gridstack@1.2.1/dist/gridstack-extra.css"/>

<div class="grid-stack grid-stack-N">...</div>
```
Expand Down Expand Up @@ -365,7 +378,7 @@ Recommend looking at the [many samples](./demo) for more code examples.
### jQuery Application
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))
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.
Changes
=====
Expand Down
5 changes: 1 addition & 4 deletions demo/two.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
<link rel="stylesheet" href="demo.css"/>
<link rel="stylesheet" href="../dist/gridstack-extra.css"/>

<script src="../src/jquery.js"></script>
<script src="../src/gridstack.js"></script>
<script src="../src/jquery-ui.js"></script>
<script src="../src/gridstack.jQueryUI.js"></script>
<script src="../dist/gridstack.all.js"></script>

<style type="text/css">
.grid-stack {
Expand Down
5 changes: 5 additions & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Change log
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)*

- [1.2.1 (2020-09-04)](#121-2020-09-04)
- [1.2.0 (2020-08-01)](#120-2020-08-01)
- [1.1.2 (2020-05-17)](#112-2020-05-17)
- [1.1.1 (2020-03-17)](#111-2020-03-17)
Expand Down Expand Up @@ -34,6 +35,10 @@ Change log

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

## 1.2.1 (2020-09-04)

- fix [1341](https://github.com/gridstack/gridstack.js/pull/1341) Enable the UMD behavior for bundlers compatibility

## 1.2.0 (2020-08-01)

- fix [1311](https://github.com/gridstack/gridstack.js/issues/1311) domAttr is not defined
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gridstack",
"version": "1.2.0",
"version": "1.2.1",
"description": "JavaScript / TypeScript for dashboard layout and creation, no external dependencies, with many wrappers (React, Angular, Ember, knockout...)",
"main": "dist/gridstack",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-extra.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* gridstack 1.2.0 extra CSS for [2-11] columns (non default)
* gridstack 1.2.1 extra CSS for [2-11] columns (non default)
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack-poly.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** gridstack.js 1.2.0 - IE and older browsers Polyfills for this library @preserve*/
/** gridstack.js 1.2.1 - IE and older browsers Polyfills for this library @preserve*/
/**
* https://gridstackjs.com/
* (c) 2019-2020 Alain Dumesny
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Type definitions for Gridstack 1.2.0
// Type definitions for Gridstack 1.2.1
// Project: https://gridstackjs.com/
// Definitions by: Pascal Senn <https://github.com/PascalSenn>
// Ricky Blankenaufulland <https://github.com/ZoolWay>
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.jQueryUI.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** gridstack.js 1.2.0 - JQuery UI Drag&Drop plugin @preserve */
/** gridstack.js 1.2.1 - JQuery UI Drag&Drop plugin @preserve */
/**
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* gridstack.js 1.2.0
* gridstack.js 1.2.1
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
Expand Down
2 changes: 1 addition & 1 deletion src/gridstack.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* required gridstack 1.2.0 CSS for default 12 and 1 columnMode size. Use gridstack-extra.css for others
* required gridstack 1.2.1 CSS for default 12 and 1 columnMode size. Use gridstack-extra.css for others
* https://gridstackjs.com/
* (c) 2014-2020 Alain Dumesny, Dylan Weiss, Pavel Reznikov
* gridstack.js may be freely distributed under the MIT license.
Expand Down

0 comments on commit d567c7f

Please sign in to comment.