Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/getninjas/dhalsim-js
Dhalsim is a media query for javascript
https://github.com/getninjas/dhalsim-js
es6 javascript-library media-queries responsive
Last synced: about 1 month ago
JSON representation
Dhalsim is a media query for javascript
- Host: GitHub
- URL: https://github.com/getninjas/dhalsim-js
- Owner: getninjas
- License: mit
- Created: 2018-03-07T18:15:46.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T21:36:29.000Z (about 2 years ago)
- Last Synced: 2024-11-09T20:35:35.370Z (about 2 months ago)
- Topics: es6, javascript-library, media-queries, responsive
- Language: JavaScript
- Homepage: https://getninjas.github.io/dhalsim-js
- Size: 3.14 MB
- Stars: 16
- Watchers: 37
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Dhalsim
[![Build Status](https://travis-ci.org/getninjas/dhalsim-js.svg?branch=master)](https://travis-ci.org/getninjas/dhalsim-js)
[![Maintainability](https://api.codeclimate.com/v1/badges/56d8af4515d3676174d1/maintainability)](https://codeclimate.com/github/getninjas/dhalsim-js/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/56d8af4515d3676174d1/test_coverage)](https://codeclimate.com/github/getninjas/dhalsim-js/test_coverage)Helper to check a media query on JS
* This script appends has methods to check the size of screen.### Documentation
See live here [https://getninjas.github.io/dhalsim-js/](https://getninjas.github.io/dhalsim-js/)
### Install
`npm i dhalsim-js --save`
`yarn add dhalsim-js`
### Demo
`npm run demo`
`yarn demo`
### Build
`npm run build`
`yarn build`
### Usage
You can use it via:
* GLOBAL variable
* CommonJs
* AMD
* ES6 Module#### To init module
* init();#### Methods
* isMobile();
* isTablet();
* isDesktop();
* isWide();
* beyondTablet();
* beyondMobile();### Release process
We are using `npm version` to generate our releases. There are 3 kind of releases generally used: major, minor and patch. See the http://semver.org/ for more details.The process is:
1. After merge PR on master:
1.1 `git checkout master`;
1.2 `git pull --tags origin master`;
2. run `npm version major|minor|patch -m "Message of your changes"` (important: you need to be an admin to push on master);
3. Now let's publish the package on npm. You need to run `npm adduser` and have the credentials to do this;
3.1 If nothing fails on `npm version` and you have the credentials of npm GetNinjas account, run `npm publish`.
4. Done! Now, you can install the package on any project!