Skip to content

Commit

Permalink
v0.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrotoff committed Mar 18, 2019
1 parent 9ca71b1 commit 10af451
Show file tree
Hide file tree
Showing 12 changed files with 6,250 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Taken from https://github.com/twbs/bootstrap/blob/v4.1.3/.browserslistrc
# Taken from https://github.com/twbs/bootstrap/blob/v4.3.1/.browserslistrc

>= 1%
last 1 major version
Expand Down
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# See https://editorconfig.org/
# Visual Studio Code needs an extension: `ext install EditorConfig`

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 2
6 changes: 6 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
hooks: {
'pre-commit': 'yarn precommit',
'pre-push': 'yarn prepush'
}
};
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
dist/
.gitignore
.prettierignore
.editorconfig
.browserslistrc
LICENSE
*.gif
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- '8'

script:
- yarn build
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## v0.0.2 (2019/03/18)

First release
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 Tanguy Krotoff
Copyright (c) 2018-2019 Tanguy Krotoff

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# bootstrap-spinner
# @tkrotoff/bootstrap-spinner

[![Build Status](https://travis-ci.org/tkrotoff/bootstrap-spinner.svg?branch=master)](https://travis-ci.org/tkrotoff/bootstrap-spinner)

⚠️ This code is kind of "obsolete" now since Bootstrap >= 4.2 includes spinners: https://getbootstrap.com/docs/4.2/components/spinners/

Expand Down Expand Up @@ -39,18 +41,20 @@ input.is-pending {

Bootstrap 4 spinner for `<input>` and `<button>`

![demo](demo.gif)
![demo](doc/demo.gif)

Example: https://codesandbox.io/s/github/tkrotoff/bootstrap-spinner

- Small: less than 100 lines of [SCSS](src/bootstrap4-spinner.scss)
- No SVG, image... just CSS
- Works in latest browsers and IE >= 10
- Uses [Bootstrap variables](https://getbootstrap.com/docs/4.1/getting-started/theming/#variable-defaults): nothing hardcoded
- Uses [Bootstrap variables](https://getbootstrap.com/docs/4.3/getting-started/theming/#variable-defaults): nothing hardcoded

## Usage

Import [bootstrap4-spinner.scss](src/bootstrap4-spinner.scss) and then modify your [Bootstrap 4 code](https://getbootstrap.com/docs/4.1/components/forms/) as follow:
`yarn add @tkrotoff/bootstrap-spinner` or `npm install @tkrotoff/bootstrap-spinner`

Import [bootstrap4-spinner.scss](src/bootstrap4-spinner.scss) and then modify your [Bootstrap 4 code](https://getbootstrap.com/docs/4.3/components/forms/) as follow:

```HTML
<div class="form-group">
Expand All @@ -70,7 +74,7 @@ Import [bootstrap4-spinner.scss](src/bootstrap4-spinner.scss) and then modify yo
You can change the spinner size by overwriting Sass variable `$spinner-size`:

```SCSS
import '~bootstrap-spinner/src/bootstrap4-spinner';
import '~@tkrotoff/bootstrap-spinner/src/bootstrap4-spinner';

$spinner-size: 40px;
```
File renamed without changes
2 changes: 1 addition & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h1>bootstrap-spinner</h1>

<p>
Example taken from
<a href="https://getbootstrap.com/docs/4.1/components/forms/#overview">
<a href="https://getbootstrap.com/docs/4.3/components/forms/#overview">
Bootstrap Forms Overview
</a>
</p>
Expand Down
27 changes: 19 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"name": "bootstrap-spinner",
"version": "0.0.1",
"name": "@tkrotoff/bootstrap-spinner",
"version": "0.0.2",
"repository": {
"type": "git",
"url": "https://github.com/tkrotoff/bootstrap-spinner.git"
},
"description": "Bootstrap 4 spinner for <input> and <button>",
"license": "MIT",
"keywords": [
"bootstrap4",
"bootstrap",
Expand All @@ -10,22 +15,28 @@
"spinner"
],
"main": "example/index.html",
"files": [
"src/"
],
"scripts": {
"clean": "rm -rf dist .cache",
"clean:all": "yarn run clean && rm -rf node_modules yarn.lock",
"start": "yarn run clean && parcel example/index.html --open",
"build": "yarn run clean && parcel build example/index.html --public-url ./",
"prettier": "prettier --write \"**/*\""
"prettier": "prettier --write \"**/*\"",
"precommit": "yarn prettier && yarn build",
"prepush": "yarn precommit"
},
"dependencies": {},
"peerDependencies": {
"bootstrap": "^4.2.1"
"bootstrap": "^4.3.1"
},
"devDependencies": {
"bootstrap": "^4.2.1",
"bootstrap": "^4.3.1",
"husky": "^1.3.1",
"node-sass": "^4.11.0",
"parcel-bundler": "^1.11.0",
"postcss-preset-env": "^6.5.0",
"prettier": "^1.15.3"
"parcel-bundler": "^1.12.2",
"postcss-preset-env": "^6.6.0",
"prettier": "^1.16.4"
}
}
Loading

0 comments on commit 10af451

Please sign in to comment.