Skip to content

Commit

Permalink
chore: refactor directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
znck committed Nov 11, 2017
1 parent c51047e commit e7169fb
Show file tree
Hide file tree
Showing 10 changed files with 164 additions and 33 deletions.
34 changes: 34 additions & 0 deletions .circle/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2
jobs:
build:
docker:
- image: node:latest

branches:
ignore:
- gh-pages # list of branches to ignore
- /release\/.*/ # or ignore regexes

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package-lock.json" }}
- v1-dependencies-

- run: npm install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package-lock.json" }}

- run:
name: test
command: npm run test:cov
- run:
name: upload coverage
command: bash <(curl -s https://codecov.io/bash)

12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules/
node_modules
dist/
coverage/
.nyc_output
prop-types.js
15 changes: 6 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ Please note we have a code of conduct, please follow it in all your interactions

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the README.md with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this
Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.
1. Fork it!
1. Create your feature branch: `git checkout -b my-new-feature`
1. Commit your changes: `git commit -am 'feat: add some feature'`
1. Push to the branch: `git push origin my-new-feature`
1. Submit a pull request :D

## Code of Conduct

Expand Down Expand Up @@ -73,7 +70,7 @@ further defined and clarified by project maintainers.
### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
reported by contacting the project team at . All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Expand Down
12 changes: 6 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2017 Rahul Kadyan
Copyright (c) Rahul Kadyan <[email protected]> (https://znck.me)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +9,13 @@ 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 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.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# PropTypes for Vue

<div class="text-xs-center" align="center" style="margin: 20px">
<img src="./docs/logo.svg" height="255" alt="">
</div>

<div class="text-xs-center" align="center">

<!-- [![vue2](https://img.shields.io/badge/vue-2.x-brightgreen.svg)](https://vuejs.org/) -->
[![NPM version](https://img.shields.io/npm/v/@znck/prop-types.svg?style=flat)](https://npmjs.com/package/@znck/prop-types)
[![NPM downloads](https://img.shields.io/npm/dm/@znck/prop-types.svg?style=flat)](https://npmjs.com/package/@znck/prop-types)
[![CircleCI](https://circleci.com/gh/znck/prop-types/tree/master.svg?style=shield)](https://circleci.com/gh/znck/prop-types-temp/tree/master)
[![codecov](https://codecov.io/gh/znck/prop-types/branch/master/graph/badge.svg)](https://codecov.io/gh/znck/prop-types)

</div>

## Introduction

Fluent prop validation for Vue that won't land in your production code.

Expand Down Expand Up @@ -81,11 +96,6 @@ export default {
</script>
```

## Built With

* [Babel](http://babeljs.io/) - Transpiling
* [Ava](https://github.com/avajs/ava) - Testing

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
Expand All @@ -94,12 +104,9 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduc

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/znck/prop-types/releases).

## Authors

* **Rahul Kadayn** - *Initial work* - [znck](https://github.com/znck)

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.
## Author

## License
**prop-types** © [Rahul Kadyan](https://github.com/znck), Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by Rahul Kadyan with help from contributors ([list](https://github.com/znck/prop-types-temp/contributors)).

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
> [znck.me](https://znck.me) · GitHub [@Rahul Kadyan](https://github.com/znck) · Twitter [@znck0](https://twitter.com/@znck0)
69 changes: 69 additions & 0 deletions docs/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"jsnext:main": "index.js",
"types": "index.d.ts",
"scripts": {
"test": "ava *.spec.js",
"test:cov": "nyc ava *.spec.js",
"test": "npm run lint && ava *.spec.js",
"lint": "xo",
"build": "babel -o prop-types.js index.js",
"prepare": "npm test && npm run build",
"preversion": "npm test",
"prepublishOnly": "./publish.sh \"${AUTO_PUBLISH:-fail}\""
},
"repository": {
Expand Down Expand Up @@ -43,5 +44,12 @@
"babel-register"
],
"babel": "inherit"
},

"xo": {
"extends": "rem",
"envs": [
"ava"
]
}
}
4 changes: 2 additions & 2 deletions publish.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ function publish {

function resetAndDie {
git reset --hard ${COMMIT}

die "$@"
}

npm version "$VERSION" || resetAndDie "NPM could not create new version."
if [ -z "$1" ]; then
AUTO_PUBLISH=pass npm publish --tags "$@" || resetAndDie "NPM publish failed."
Expand Down

0 comments on commit e7169fb

Please sign in to comment.