معرفی شرکت ها


gfc-2.0.2


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Simple way to initialize a new git repository in an empty directory, add a file and do a first commit (or skip that part in a directory with files). Useful for unit tests and generators.
ویژگی مقدار
سیستم عامل -
نام فایل gfc-2.0.2
نام gfc
نسخه کتابخانه 2.0.2
نگهدارنده ['johno', 'jonschlinkert']
ایمیل نگهدارنده ['johnotander@gmail.com', 'github@sellside.com']
نویسنده Jon Schlinkert
ایمیل نویسنده -
آدرس صفحه اصلی git+https://github.com/jonschlinkert/gfc.git
آدرس اینترنتی https://github.com/jonschlinkert/gfc
مجوز MIT
# gfc [![NPM version](https://img.shields.io/npm/v/gfc.svg?style=flat)](https://www.npmjs.com/package/gfc) [![NPM monthly downloads](https://img.shields.io/npm/dm/gfc.svg?style=flat)](https://npmjs.org/package/gfc) [![NPM total downloads](https://img.shields.io/npm/dt/gfc.svg?style=flat)](https://npmjs.org/package/gfc) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/gfc.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/gfc) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/gfc.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/gfc) > Simple way to initialize a new git repository in an empty directory, add a file and do a first commit (or skip that part in a directory with files). Useful for unit tests and generators. Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support. ## Install Install with [npm](https://www.npmjs.com/): ```sh $ npm install --save gfc ``` ## Usage ```js const firstCommit = require('gfc'); ``` The main export is an async function that takes a [callback](#async-usage) or returns a [promise](#promise-usage) when no callback is passed. A [.sync](#sync-usage) method is also exposed. **Default behavior** The following steps can be customized with [options](#options): 1. Creates a new git repository 2. Adds a `.gitkeep` file if the cwd is empty. 3. `git add .` 4. do a first commit with the message `"first commit"` ### promise usage Returns a promise if a [callback](#async-usage) is not passed. ```js firstCommit(cwd[, options]) .then(res => { console.log('stdout: ' + res.stdout); console.log('stderr: ' + res.stderr); }) .catch(err => console.log('Error: ', err)); ``` ### async usage ```js firstCommit(cwd[, options], function(err, stdout, stderr) { if (err) { console.error('exec error: ' + err); return; } console.log('stdout: ' + stdout); console.log('stderr: ' + stderr); }); ``` ### sync usage ```js firstCommit.sync(cwd[, options]); ``` ## Options ### options.file **Type**: `object|boolean` **Default**: `{ path: '.gitkeep', contents: '' }` ```js firstCommit.sync('foo/bar', { file: false }) ``` ### options.message **Type**: `string` **Default**: `'first commit'` ```js var options = {message: 'my amazing first commit'}; firstCommit('foo/bar', options, function(err) { if (err) { console.log(err); } else { console.log('done!'); } }); ``` ### options.exec **Type**: `object` **Default**: `undefined` Options to pass to [execSync](https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options). ```js var options = { message: 'my amazing first commit', exec: { timeout: 3000, killSignal: 'SIGTERM' } }; firstCommit.sync('foo/bar', options); ``` ## About <details> <summary><strong>Contributing</strong></summary> Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new). Please read the [contributing guide](.github/contributing.md) for advice on opening issues, pull requests, and coding standards. </details> <details> <summary><strong>Running Tests</strong></summary> 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 ``` </details> <details> <summary><strong>Building docs</strong></summary> _(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 ``` </details> ### Related projects You might also be interested in these projects: * [git-branch](https://www.npmjs.com/package/git-branch): Get the current branch for a local git repository. | [homepage](https://github.com/jonschlinkert/git-branch "Get the current branch for a local git repository.") * [git-user-name](https://www.npmjs.com/package/git-user-name): Get a user's name from git config at the project or global scope, depending on… [more](https://github.com/jonschlinkert/git-user-name) | [homepage](https://github.com/jonschlinkert/git-user-name "Get a user's name from git config at the project or global scope, depending on what git uses in the current context.") * [git-username](https://www.npmjs.com/package/git-username): Get the username (or 'owner' name) from a git/GitHub remote origin URL. | [homepage](https://github.com/jonschlinkert/git-username "Get the username (or 'owner' name) from a git/GitHub remote origin URL.") * [list-git-remotes](https://www.npmjs.com/package/list-git-remotes): List the remotes for a local git repository. Sync and async. | [homepage](https://github.com/jonschlinkert/list-git-remotes "List the remotes for a local git repository. Sync and async.") ### Contributors | **Commits** | **Contributor** | | --- | --- | | 6 | [johno](https://github.com/johno) | | 6 | [jonschlinkert](https://github.com/jonschlinkert) | ### Author **Jon Schlinkert** * [LinkedIn Profile](https://linkedin.com/in/jonschlinkert) * [GitHub Profile](https://github.com/jonschlinkert) * [Twitter Profile](https://twitter.com/jonschlinkert) ### License Copyright © 2018, [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 March 09, 2018._


نیازمندی

مقدار نام
^1.0.0 empty-dir
^1.0.0 is-git-url
^0.5.1 mkdirp


زبان مورد نیاز

مقدار نام
9.7.1 Npm


نحوه نصب


نصب پکیج tgz gfc-2.0.2:

    npm install gfc-2.0.2.tgz