1.4.0 • Published 5 years ago

pinp v1.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

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.

1.4.0

5 years ago

1.3.0

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago