Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yannbertrand/sails-generate-policy
Generate a policy in a Sails app.
https://github.com/yannbertrand/sails-generate-policy
Last synced: 2 days ago
JSON representation
Generate a policy in a Sails app.
- Host: GitHub
- URL: https://github.com/yannbertrand/sails-generate-policy
- Owner: yannbertrand
- License: mit
- Created: 2015-05-06T21:21:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-23T19:35:27.000Z (about 5 years ago)
- Last Synced: 2024-12-06T23:06:30.344Z (21 days ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
![[email protected]](http://i.imgur.com/RIvu9.png)
# sails-generate-policy
A `policy` generator for use with the Sails command-line interface.
### Installation
Certain generators are installed by default in Sails, but they can be overridden. Check the [Sails docs](http://sailsjs.org/#!/documentation) for information on installing generator overrides / custom generators.
### Production Usage
##### On the command line
```sh
$ sails generate policy
```##### In a node script
```javascript
var path = require('path');
var sailsgen = require('sails-generate');
var scope = {
rootPath: path.resolve(__dirname)
};
sailsgen(require('sails-generate-policy'), scope, function (err) {
if (err) throw err;// It worked.
});
```### Development
To get started quickly and see this generator in action, run the `bin/index.js` script:
```sh
$ git clone YOUR_FORK_OF_THIS_REPO sails-generate-policy-fork
$ cd sails-generate-policy-fork
$ npm install
$ node ./bin
````bin/index.js` is a simple script, bundled only for convenience, that runs the generator with hard-coded scope variables. Please feel free to modify that file however you like! Also see `CONTRIBUTING.md` for more information on overriding/enhancing generators.
### Questions?
See `FAQ.md`.
### More Resources
- [Stackoverflow](http://stackoverflow.com/questions/tagged/sails.js)
- [#sailsjs on Freenode](http://webchat.freenode.net/) (IRC channel)
- [Twitter](https://twitter.com/sailsjs)
- [Professional/enterprise](https://github.com/balderdashy/sails-docs/blob/master/FAQ.md#are-there-professional-support-options)
- [Tutorials](https://github.com/balderdashy/sails-docs/blob/master/FAQ.md#where-do-i-get-help)### License
**[MIT](./LICENSE)**
© 2014 [balderdashy](http://github.com/balderdashy) & [contributors]
[Mike McNeil](http://michaelmcneil.com), [Balderdash](http://balderdash.co) & contributors[Sails](http://sailsjs.org) is free and open-source under the [MIT License](http://sails.mit-license.org/).