arnaudjuracek / pinp

PINP is not packery

Home Page:https://arnaudjuracek.github.io/pinp/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pinp

pinp is not packery


Usage

Import with a module bundler
$ npm install --save pinp
// using ES6 module
import pinp from 'pinp'

// using CommonJS module
var pinp = require('pinp')
Import from a browser
<script src="https://unpkg.com/pinp"></script>
<script>
  // window.pinp is exposed
</script>

Quickstart

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 for a detailed implementation.

API

See docs/API.

Development

$ 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.

About

PINP is not packery

https://arnaudjuracek.github.io/pinp/

License:MIT License


Languages

Language:JavaScript 74.4%Language:HTML 25.6%