Skip to content

Commit

Permalink
feat: create date field
Browse files Browse the repository at this point in the history
  • Loading branch information
adrians5j committed Apr 27, 2019
1 parent 99025c0 commit 2e8d903
Show file tree
Hide file tree
Showing 22 changed files with 14,325 additions and 4 deletions.
26 changes: 26 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"projectName": "commodo-fields-date",
"projectOwner": "doitadrian",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "doitadrian",
"name": "Adrian Smijulj",
"avatar_url": "https://avatars0.githubusercontent.com/u/5121148?v=4",
"profile": "https://github.com/doitadrian",
"contributions": [
"code",
"doc",
"example",
"review",
"test"
]
}
]
}
11 changes: 11 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"presets": [
[
"@babel/preset-env"
]
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}

22 changes: 22 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
env: {
node: true,
es6: true,
jest: true
},
parser: "babel-eslint",
extends: ["eslint:recommended"],
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2018,
sourceType: "module"
},
rules: {
indent: ["error", 4],
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"]
}
};
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto
*.js text eol=lf
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.idea
.webpack
.serverless
.env
.npmrc
npm-debug.log
node_modules
.DS_Store
coverage
yarn-error.log
dist/
storybook-static/
.changelog
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
printWidth: 100,
parser: "babylon",
tabWidth: 4
};
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
sudo: false
language: node_js
node_js: 8

cache:
directories:
- ~/.npm
- ~/.cache

notifications:
email: false

jobs:
include:
- stage: test
script:
- npm run test:jest:dist
- stage: release
node_js: lts/*
script:
- npm run test:jest:src:coverage:coveralls
- npm run build
deploy:
provider: script
skip_cleanup: true
script:
- npm run release
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Contributing

## Bugs

Found a bug? Have a problem / idea? Please check past issues, maybe someone already had that problem.

## Development process

### Setup


1. Fork and clone the repo

2. Install all dependencies:
```
npm i
```
3. Development is made via Storybook. Start it (on port `6006`) by running:
```
npm run storybook
```
### Testing
Before you create PR, make sure all tests are passing.
```
npm test
```
36 changes: 36 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!--- Provide a general summary of the issue in the Title above -->

## This is:
<!-- Select one -->
- Bug
- Feature request
- Question
- Idea

<!--- If you report bug, please follow template below -->
<!--- It will allow us to better understand problem and help you faster -->

## Specifications

- version:
- OS:
- Browser:

## Expected Behavior
<!--- Tell us what should happen -->

## Actual Behavior
<!--- Tell us what happens instead of the expected behavior -->

## Steps to Reproduce the Problem
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->
1.
2.
3.

## Detailed Description
<!--- Provide a detailed description of the change or addition you are proposing -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
6 changes: 3 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2019 Adrian Smijulj
Copyright (c) Adrian Smijulj

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 @@ -18,4 +18,4 @@ 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.
SOFTWARE.
15 changes: 15 additions & 0 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
<!--- Please link to the issue here: -->

## Your solution
<!--- Please describe your solution, have you encountered any issues along the way? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if relevant):
48 changes: 47 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,48 @@
# commodo-fields-date
A date field for Commodo composable models
[![Build Status](https://travis-ci.org/doitadrian/commodo-fields-date.svg?branch=master)](https://travis-ci.org/doitadrian/commodo-fields-date)
[![Coverage Status](https://coveralls.io/repos/github/doitadrian/commodo-fields-date/badge.svg?branch=master)](https://coveralls.io/github/doitadrian/commodo-fields-date?branch=master)
[![](https://img.shields.io/npm/dw/commodo-fields-date.svg)](https://www.npmjs.com/package/commodo-fields-date)
[![](https://img.shields.io/npm/v/commodo-fields-date.svg)](https://www.npmjs.com/package/commodo-fields-date)
![](https://img.shields.io/npm/types/commodo-fields-date.svg)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)](#contributors)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

A date field form Commodo composeable models.

## Install
```
npm install --save commodo-fields-date
```

Or if you prefer yarn:
```
yarn add commodo-fields-date
```

## Quick Example:

```javascript
import { compose } from "ramda";
import { withFields, string } from "@commodo/fields";
import { date } from "commodo-fields-date";

const Company = compose(
withFields({
name: string(),
createdOn: date()
})
)(function() {});
```

## Contributors

Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars0.githubusercontent.com/u/5121148?v=4" width="100px;"/><br /><sub><b>Adrian Smijulj</b></sub>](https://github.com/doitadrian)<br />[💻](https://github.com/doitadrian/commodo-fields-date/commits?author=doitadrian "Code") [📖](https://github.com/doitadrian/commodo-fields-date/commits?author=doitadrian "Documentation") [💡](#example-doitadrian "Examples") [👀](#review-doitadrian "Reviewed Pull Requests") [⚠️](https://github.com/doitadrian/commodo-fields-date/commits?author=doitadrian "Tests") |
| :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
7 changes: 7 additions & 0 deletions idea.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* eslint-disable */
// This file helps Jetbrains resolve aliases
System.config({
paths: {
"commodo-fields-date": "./src"
}
});
Loading

0 comments on commit 2e8d903

Please sign in to comment.