Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/generate/generate-cname
Generate the CNAME file for a web project. Is this necessary? No, not at all. A CNAME file is one line and takes a couple seconds to create. The point of this micro-generator is to automate the creation of the CNAME file based on configuration settings, as a small part of a larger build.
https://github.com/generate/generate-cname
cli cname generate generator plugin scaffolder scaffolding site webapp website
Last synced: about 2 months ago
JSON representation
Generate the CNAME file for a web project. Is this necessary? No, not at all. A CNAME file is one line and takes a couple seconds to create. The point of this micro-generator is to automate the creation of the CNAME file based on configuration settings, as a small part of a larger build.
- Host: GitHub
- URL: https://github.com/generate/generate-cname
- Owner: generate
- License: mit
- Created: 2017-05-23T16:47:47.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-29T10:48:26.000Z (over 7 years ago)
- Last Synced: 2024-10-29T01:26:36.553Z (2 months ago)
- Topics: cli, cname, generate, generator, plugin, scaffolder, scaffolding, site, webapp, website
- Language: JavaScript
- Homepage: https://github.com/generate
- Size: 8.79 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# generate-cname [![NPM version](https://img.shields.io/npm/v/generate-cname.svg?style=flat)](https://www.npmjs.com/package/generate-cname) [![NPM monthly downloads](https://img.shields.io/npm/dm/generate-cname.svg?style=flat)](https://npmjs.org/package/generate-cname) [![NPM total downloads](https://img.shields.io/npm/dt/generate-cname.svg?style=flat)](https://npmjs.org/package/generate-cname) [![Linux Build Status](https://img.shields.io/travis/generate/generate-cname.svg?style=flat&label=Travis)](https://travis-ci.org/generate/generate-cname)
> Generate the CNAME file for a web project. Is this necessary? No, not at all. A CNAME file is one line and takes a couple seconds to create. The point of this generator is to automate the creation of the CNAME file based on configuration settings, as a small part of a larger build.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save generate-cname
```## Usage
### CLI
**Install**
First install [generate](https://github.com/generate/generate) and this module either globally or locally:
```sh
$ npm install --global generate generate-cname
```**Generate a CNAME file on demand**
The following command will prompt you for the URL to use, then will write a `CNAME` file to the cwd or specified `--dest`:
```sh
$ gen cname
$ gen cname --dest ./foo
```### Use as a plugin
You can add a `cname` task to your [generate](https://github.com/generate/generate) generator by adding the following line in `generator.js`:
```js
app.use(require('generate-cname'));
```**Example**
Given you have a generator named `generate-foo`, you would run the following to generate a `cname` file:
```sh
$ gen foo:cname
```You can also run the `cname` task from any other task in your generator, so that a cname file is automatically generated along with other files.
## About
### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```### Running tests
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```### Author
**Jon Schlinkert**
* [github/jonschlinkert](https://github.com/jonschlinkert)
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)### License
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 29, 2017._