New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

angular-eha.radio-buttons

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-eha.radio-buttons - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

.tmp/scripts.js

3

bower.json
{
"name": "angular-eha.radio-buttons",
"description": "Stylish radio button group",
"version": "1.1.0",
"authors": [

@@ -12,3 +11,3 @@ "Tom Vincent <git@tlvince.com>"

],
"homepage": "https://tlvince.com",
"homepage": "http://docs.ehealthafrica.org/angular-eha.radio-buttons/",
"keywords": "radio,button,yesno,toggle",

@@ -15,0 +14,0 @@ "main": [

@@ -94,43 +94,2 @@ module.exports = function(grunt) {

}
},
karma: {
options: {
configFile: 'karma.conf.js'
},
unit: {
singleRun: true,
autoWatch: false
},
watch: {
singleRun: false,
autoWatch: true
}
},
bump: {
options: {
files: ['package.json', 'bower.json'],
updateConfigs: [],
commit: true,
commitMessage: 'Release v%VERSION%',
commitFiles: ['package.json', 'bower.json', 'dist/'],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'Version %VERSION%',
push: false,
// pushTo: 'origin',
gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d',
globalReplace: false,
prereleaseName: false,
regExp: false
}
},
jshint: {
all: ['src/**/*.js', 'tests/**/*.spec.js']
},
jscs: {
src: ['src/**/*.js', 'tests/**/*.spec.js'],
options: {
config: '.jscsrc',
requireCurlyBraces: [ 'if' ]
}
}

@@ -140,4 +99,2 @@ });

grunt.registerTask('template', ['html2js']);
grunt.registerTask('test', ['template', 'jshint', 'jscs', 'karma:unit']);
grunt.registerTask('test:watch', ['karma:watch']);

@@ -158,11 +115,3 @@ grunt.registerTask('build', function() {

grunt.registerTask('release', function(target) {
grunt.task.run([
'build',
'bump:' + target
]);
});
grunt.registerTask('default', ['jshint', 'jscs', 'build']);
grunt.registerTask('default', ['build']);
};
{
"name": "angular-eha.radio-buttons",
"version": "1.1.0",
"version": "1.2.0",
"description": "Stylish radio button group",
"main": "dist/radio-buttons.template.js",
"scripts": {
"test": "grunt test"
"test": "echo The grass has so little to do"
},

@@ -13,15 +13,16 @@ "repository": {

},
"author": "Tom Vincent <git@tlvince.com>",
"author": "Tom Vincent <git@tlvince.com> (https://tlvince.com/)",
"license": "Apache-2.0",
"keywords": "radio,button,yesno,toggle",
"homepage": "https://tlvince.com",
"keywords": [
"radio",
"button",
"yesno",
"toggle"
],
"homepage": "http://docs.ehealthafrica.org/angular-eha.radio-buttons/",
"devDependencies": {
"angular": "^1.3.13",
"angular-mocks": "^1.3.13",
"angular-ui-router": "^0.2.13",
"chai": "^2.0.0",
"chai-as-promised": "^4.2.0",
"grunt": "^0.4.5",
"grunt-bump": "^0.3.0",
"grunt-concat": "^0.1.6",
"grunt-cli": "^0.1.13",
"grunt-contrib-clean": "^0.6.0",

@@ -31,23 +32,10 @@ "grunt-contrib-concat": "^0.5.1",

"grunt-contrib-uglify": "^0.8.0",
"grunt-contrib-jshint": "^0.11.0",
"grunt-jscs": "^1.5.0",
"grunt-html2js": "^0.3.0",
"grunt-karma": "^0.10.1",
"grunt-ng-annotate": "^0.10.0",
"i": "^0.3.2",
"karma": "^0.12.31",
"karma-chai": "^0.1.0",
"karma-chai-plugins": "^0.2.4",
"karma-coverage": "^0.2.7",
"karma-firefox-launcher": "^0.1.4",
"karma-mocha": "^0.1.10",
"karma-sinon": "^1.0.4",
"karma-sinon-chai": "^0.3.0",
"load-grunt-tasks": "^3.1.0",
"lodash": "^3.2.0",
"mocha": "^2.1.0",
"optimist": "^0.6.1",
"sinon": "^1.12.2"
"load-grunt-tasks": "^3.1.0"
},
"dependencies": {}
"dependencies": {},
"bugs": {
"url": "https://github.com/eHealthAfrica/angular-eha.radio-buttons/issues"
}
}
# angular-eha.radio-buttons
[![Build Status](https://travis-ci.org/eHealthAfrica/radio-buttons.svg)](https://travis-ci.org/eHealthAfrica/radio-buttons)
[![Build Status][travis-image]][travis-url]
> Stylish radio button group
[travis-image]: https://img.shields.io/travis/eHealthAfrica/angular-eha.radio-buttons.svg
[travis-url]: https://travis-ci.org/eHealthAfrica/angular-eha.radio-buttons
## Usage
```html
<eha-radio-buttons
model="radios"
></eha-radio-buttons>
```
## Installation

@@ -17,166 +28,5 @@

## Dependencies
Then simply add `eha.radio-buttons` as a dependency somewhere in your project
that makes sense and you're good to go.
* `angular-bootstrap`
* `font-awesome`
### Distribution bundle
- *dist/radio-buttons.js*
- *dist/radio-buttons.min.js*
- *dist/radio-buttons.templates.js* *(default)*
- *dist/radio-buttons.templates.min.js*
- *dist/radio-buttons.css*
Then simply add `eha.radio-buttons` as dependencies somewhere in your project that makes sense and you're good to go.
#### A note on wiredep
If you're using wiredep `dist/radio-buttons.{template.js,css}` will be injected by default. If you don't want that to happen you'll like want to employ something along the following lines in your `Gruntfile`:
```javascript
wiredep: {
...
options: {
exclude: [
'bower_components/radio-buttons/dist/radio-buttons.template.js'
]
}
...
}
```
Then you're free to include whichever bundle you prefer in what ever manner you prefer.
### Example
```html
<html ng-app="backButtonExample">
<head>
<title>Back Button Example</title>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-eha.radio-buttons/dist/radio-buttons.template.js"></script>
<script>
angular.module('backButtonExample', [
'eha.radio-buttons'
]);
</script>
</head>
<body>
<eha-radio-buttons
model="myModel"
></eha-radio-buttons>
</body>
</html>
```
## Options
* `model` (required): The scope property to bind to (two-way)
* `templateUrl`: An optional path to a template
## Contributing
### Prerequisites
- Firefox (for running test suite)
- node (0.12.0)
- bower (1.3.12)
- grunt-cli (0.1.7)
- grunt (0.4.5)
### Installation
```bash
# Fork the upstream repo on github and pull down your fork
git clone git@github.com:yourusername/angular-eha.radio-buttons.git
# change into project folder
cd angular-eha.radio-buttons
# Add the upstream as a remote
git remote add upstream git@github.com:eHealthAfrica/angular-eha.radio-buttons.git
# Install the dev dependencies
npm install
```
### Docs
Code should be documented following the guidelines set out by [jsdoc](http://usejsdoc.org/) and [ngdoc](https://github.com/angular/angular.js/wiki/Writing-AngularJS-Documentation). We can then leverage [Dgeni](http://github.com/angular/dgeni) or something simlary to generate documentation in any format we like.
### Test Suite
The test suite is configured to run in Firefox and is powered by:
- Karma
- Mocha
- Chai (as promised)
- Sinon (chai)
The library is conducive to TDD. `grunt test:watch` is your friend. As modules (and templates) are exposed on their own namespace you can easily isolate areas of the code base for true unit testing without being forced to pull in the whole library or stub/mock modules irrelevant to the feature(s) you're testing.
#### Running Tests
##### Single run
```bash
grunt test
```
##### Watch
```bash
grunt test:watch
```
### Transpiling templates (html2js)
Transpiling our html templates into js allows us to neatly push them into the `$templateCache`.
To transpile the templates it's another simple grunt command:
```bash
grunt templates
```
This will compile the templates to the `dist/` folder. But it's probably best to avoid this all together. Both the `grunt test` and `grunt release` commands take care of all of this for you.
If you need to override the default template, simply replace what's already in the `$templateCache` with what ever you want. One way to achieve this is like this:
```html
<script id="templates/back-button.directive.tpl.html" type="text/html">
<button>I'm a button!</button>
</script>
```
## Release Process
To make a release, ensure you have issued `grunt build`, committed the distribution package and tagged the commit with an appropriate version according to the [SemVer spec](http://semver.org/).
To make this easy for you, there's a handy grunt task. Simply issue `grunt release:major|minor|patch` and grunt will take care of building, committing and tagging for you. Then make a PR to the master branch of the upstream, merge upon CI build success and then all that's left to do is to push the tags to the upstream.
e.g:
```bash
grunt release:minor
git pull-request -b <upstream_repo>:master
git push upstream --tags
```
### Publishing to npm
To publish a new version to npm, simply issue from the command line prior making a release (i.e.issuing a `grunt release` and pushing both commits and tags to the upstream):
```
npm publish
```
### Publishing to bower
Publishing to bower is slightly simpler in so far that you only have to do it once, and not explicitly for every release like npm:
e.g.
```
bower register angular-eha.radio-buttons <upstream_repo_url>
```
## License

@@ -183,0 +33,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc