Skip to content

Commit

Permalink
fix(scaffold): update project scaffold template
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Nov 6, 2018
1 parent c070830 commit f0784ca
Show file tree
Hide file tree
Showing 14 changed files with 3,768 additions and 177 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "standard"
"extends": "@ahmadnassri/eslint-config"
}
61 changes: 3 additions & 58 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
_extends: .github

repository:
name: node-fs-writefile-promise
description: Promise version of fs.writefile
topics: node, fs, writefile, promise
homepage: https://www.ahmadnassri.com
homepage: https://github.com/ahmadnassri/node-fs-writefile-promise
private: false
has_issues: true
has_wiki: false
Expand All @@ -12,60 +14,3 @@ repository:
allow_squash_merge: true
allow_merge_commit: false
allow_rebase_merge: true

labels:
- name: bug
description: Something isn't working
color: EE3F46

- name: security
description: Security related topic
color: EE3F46

- name: chore
description: Changes that don't modify core files
color: FEF2C0

- name: discussion
description: A discussion thread
color: CC317C

- name: question
description: Generic question
color: CC317C

- name: enhancement
description: New feature or request
color: 5EBEFF

- name: optimizaiton
description: Performance or Code Optimization
color: 5EBEFF

- name: feature
description: New Feature
color: 91CA55

- name: in progress
description: Currently being worked on
color: FBCA04

- name: watchlist
description: Keep an eye on these
color: FBCA04

- name: invalid
description: Something doesn't seem right
color: D2DAE1

- name: wontfix
description: This will not be worked on
color: D2DAE1

- name: duplicate
description: This issue or pull request already exists
color: D2DAE1

- name: on hold
description: No work planned on this for now
color: D2DAE1
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*.log
/.nyc_output
/.scripts/cc-test-reporter
/coverage
/node_modules
3 changes: 3 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@ahmadnassri/semantic-release-config"
}
5 changes: 5 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"@ahmadnassri/remark-config"
]
}
9 changes: 0 additions & 9 deletions .scripts/codeclimate

This file was deleted.

10 changes: 0 additions & 10 deletions .scripts/test-reporter

This file was deleted.

41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

22 changes: 9 additions & 13 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
Copyright (c) 2015, Ahmad Nassri <[email protected]>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
MIT License

Copyright (c) 2018 Ahmad Nassri <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
43 changes: 21 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,31 @@
# fs-writefile-promise [![version][npm-version]][npm-url] [![License][license-image]][license-url] [![Build Status][travis-image]][travis-url] [![Downloads][npm-downloads]][npm-url] [![Coverage Status][codeclimate-coverage]][codeclimate-url]
# fs.writeFile Promise

[Promise] version of [fs.writefile]:
[![License][license-image]][license-url] [![version][npm-image]][npm-url] [![Build Status][circle-image]][circle-url]

> [Promise][] version of [fs.writefile][]:
> Asynchronously writes data to a file, replacing the file if it already exists.
## Install

```bash
npm install --prod --save fs-writefile-promise
npm install fs-writefile-promise
```

## API

<!-- lint disable no-shortcut-reference-link -->
### write(filename, data [, options])
<!-- lint enable no-shortcut-reference-link -->

*filename*: `String`
*data* `String` or `Buffer`
*options*: `Object`
Return: `Object` ([Promise])
- _filename_: `String`
- _data_ `String` or `Buffer`
- _options_: `Object`

When it finishes, it will be [*fulfilled*](http://promisesaplus.com/#point-26) with the file name that was written to.
Return: `Object` ([Promise][])

When it fails, it will be [*rejected*](http://promisesaplus.com/#point-30) with an error as its first argument.
When it finishes, it will be [_fulfilled_](http://promisesaplus.com/#point-26) with the file name that was written to.

When it fails, it will be [_rejected_](http://promisesaplus.com/#point-30) with an error as its first argument.

```js
write('/tmp/foo', 'bar')
Expand All @@ -40,23 +44,18 @@ write('/tmp/foo', 'bar')
The option object will be directly passed to [fs.writefile](https://nodejs.org/api/fs.html#fs_fs_writefile_filename_data_options_callback).

---
> License: [ISC][license-url] &bull;
> Copyright: [ahmadnassri.com](https://www.ahmadnassri.com) &bull;
> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) &bull;
> Github: [@ahmadnassri](https://github.com/ahmadnassri) &bull;
> Twitter: [@ahmadnassri](https://twitter.com/ahmadnassri)
> Twitter: [@AhmadNassri](https://twitter.com/AhmadNassri)
[license-url]: http://choosealicense.com/licenses/isc/
[license-image]: https://img.shields.io/github/license/ahmadnassri/node-fs-writefile-promise.svg?style=flat-square
[license-url]: LICENSE
[license-image]: https://img.shields.io/github/license/ahmadnassri/node-fs-writefile-promise.svg?style=for-the-badge&logo=circleci

[travis-url]: https://travis-ci.org/ahmadnassri/node-fs-writefile-promise
[travis-image]: https://img.shields.io/travis/ahmadnassri/node-fs-writefile-promise.svg?style=flat-square
[circle-url]: https://circleci.com/gh/ahmadnassri/workflows/node-fs-writefile-promise
[circle-image]: https://img.shields.io/circleci/project/github/ahmadnassri/node-fs-writefile-promise/master.svg?style=for-the-badge&logo=circleci

[npm-url]: https://www.npmjs.com/package/fs-writefile-promise
[npm-version]: https://img.shields.io/npm/v/fs-writefile-promise.svg?style=flat-square
[npm-downloads]: https://img.shields.io/npm/dm/fs-writefile-promise.svg?style=flat-square

[codeclimate-url]: https://codeclimate.com/github/ahmadnassri/node-fs-writefile-promise
[codeclimate-coverage]: https://api.codeclimate.com/v1/badges/afb06750df095dcab7cd/test_coverage?style=flat-square
[npm-image]: https://img.shields.io/npm/v/fs-writefile-promise.svg?style=for-the-badge&logo=npm

[fs.writefile]: https://nodejs.org/api/fs.html#fs_fs_writefile_filename_data_options_callback
[Promise]: http://promisesaplus.com/
[promise]: http://promisesaplus.com/
99 changes: 99 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
version: 2.1

executors:
builder:
docker:
- image: ahmadnassri/build-essential

node-6:
docker:
- image: node:6-slim

node-8:
docker:
- image: node:8-slim

node-10:
docker:
- image: node:10-slim

commands:
persist:
steps:
- persist_to_workspace:
root: .
paths: .

attach:
steps:
- attach_workspace:
at: .

install:
steps:
- run:
name: Install dependencies
command: npm ci

jobs:
build:
executor: builder
steps:
- checkout
- install
- persist

lint:
executor: builder
steps:
- attach
- run: npm run lint

test-node-6:
executor: node-6
steps:
- attach
- run: npm run test

test-node-8:
executor: node-8
steps:
- attach
- run: npm run test

test-node-10:
executor: node-10
steps:
- attach
- run: npm run test

release:
executor: builder
steps:
- attach
- run: npx semantic-release

workflows:
version: 2
main:
jobs:
- build

- lint:
requires: [ build ]

- test-node-6:
requires: [ build ]

- test-node-8:
requires: [ build ]

- test-node-10:
requires: [ build ]

- release:
context: semantic-release
requires: [ build, lint, test-node-6, test-node-8, test-node-10 ]
filters:
branches:
only: master
Loading

0 comments on commit f0784ca

Please sign in to comment.