Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnaudjuracek/pinp
PINP is not packery
https://github.com/arnaudjuracek/pinp
drag-and-drop grid javascript packing
Last synced: 13 days ago
JSON representation
PINP is not packery
- Host: GitHub
- URL: https://github.com/arnaudjuracek/pinp
- Owner: arnaudjuracek
- License: mit
- Created: 2019-06-13T14:37:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-17T08:37:14.000Z (over 4 years ago)
- Last Synced: 2024-11-06T23:45:38.478Z (2 months ago)
- Topics: drag-and-drop, grid, javascript, packing
- Language: JavaScript
- Homepage: https://arnaudjuracek.github.io/pinp/
- Size: 255 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `pinp`
> `pinp` is not packery
## Usage
##### Import with a module bundler```console
$ npm install --save pinp
``````js
// using ES6 module
import pinp from 'pinp'// using CommonJS module
var pinp = require('pinp')
```##### Import from a browser
```html
// window.pinp is exposed
```
### Quickstart
```js
import pinp from 'pinp'const grid = pinp('.pinp-container')
const elements = document.querySelectorAll('.pinp-element')
for (let i = 0; i < elements.length; i++) {
grid.add(elements[i])
}grid.update()
```
See [`example`](example/) for a detailed implementation.## API
See [docs/API](docs/API.md).
## Development
```console
$ npm install # install all npm dependencies
$ npm run start # start the dev server with livereload on the example folder
$ npm run build # bundle your library in CJS / UMD / ESM
$ npm run test # lint your js inside the src folder$ npm version [major|minor|patch] # bundle, create a new release, publish to npm and deploy example/ to gh-page
```## License
[MIT.](https://tldrlegal.com/license/mit-license)