Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gruntjs/grunt-legacy-option
Grunt's option methods, as a standalone library.
https://github.com/gruntjs/grunt-legacy-option
Last synced: 2 months ago
JSON representation
Grunt's option methods, as a standalone library.
- Host: GitHub
- URL: https://github.com/gruntjs/grunt-legacy-option
- Owner: gruntjs
- License: mit
- Created: 2015-05-12T00:39:11.000Z (over 9 years ago)
- Default Branch: main
- Last Pushed: 2021-03-22T15:03:40.000Z (almost 4 years ago)
- Last Synced: 2024-05-09T19:31:32.869Z (9 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 1
- Watchers: 5
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# grunt-legacy-option [![NPM version](https://badge.fury.io/js/grunt-legacy-option.svg)](http://badge.fury.io/js/grunt-legacy-option) [![Build Status](https://travis-ci.org/gruntjs/grunt-legacy-option.svg)](https://travis-ci.org/gruntjs/grunt-legacy-option) [![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
> Grunt's option methods, as a standalone library.
## Heads up!
This is not ready for use yet! We'll update the readme when it's ready to go, feel free to star the project if you want updates in the meantime!
## Install
Install with [npm](https://www.npmjs.com/)
```sh
$ npm i grunt-legacy-option --save
```## Usage
```js
var option = require('grunt-legacy-option').create();
```## API
### [option](index.js#L23)
Get or set an option value.
**Params**
* `key` **{String}**: The option to get or set
* `value` **{_}**
* `returns` **{_}**: If only the `key` is passed, the value of `key` is returned.### [.init](index.js#L41)
Initialize option data.
**Params**
* `obj` **{Object}**: Optionally pass an object to initialize with, otherwise a default object is used.
* `returns` **{Object}**### [.flags](index.js#L51)
Returns a list of options as command line flags.
* `returns` **{Array}**
## TODO
**First:**
_(loosely in this order...)_
* [x] migrate code
* [x] migrate tests
* [x] get tests passing with 100% parity
* [x] add Grunfile
* [ ] coverage
* [x] API documentation, written as code comments
* [ ] Add links to website docs for any methods that have more info
* [ ] enable travis
* [x] add travis badge**Next:**
* [ ] replace core `grunt.option` internal module with `grunt-legacy-option`
* [ ] remove any dependencies that are no longer needed from grunt.
* [ ] Add the event to the changelogs of both libraries## Related projects
* [grunt](http://gruntjs.com/): The JavaScript Task Runner
* [grunt-cli](http://gruntjs.com/): The grunt command line interface.
* [grunt-legacy-log](http://gruntjs.com/): The Grunt 0.4.x logger.
* [grunt-legacy-util](http://gruntjs.com/): Some old grunt utils provided for backwards compatibility.## Running tests
Install dev dependencies:
```sh
$ npm install -d && grunt
```## Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/gruntjs/grunt-legacy-option/issues/new)
## Author
**"Cowboy" Ben Alman**
+ [github/cowboy](https://github.com/cowboy)
* [twitter/cowboy](http://twitter.com/cowboy)## Release history
**DATE** **VERSION** **CHANGES**
* 2015-05-11 v0.1.0 first commit
## License
Copyright © 2015 "Cowboy" Ben Alman
Released under the MIT license.***
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on June 05, 2015._