Skip to content

Commit

Permalink
TASK: Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Inkdpixels committed Nov 3, 2017
0 parents commit 719418c
Show file tree
Hide file tree
Showing 15 changed files with 7,717 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": [
"@immowelt/babel-preset-immowelt-node"
]
}
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@immowelt/eslint-config-immowelt-react"
}
26 changes: 26 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# By default we ignore all `node_modules`, except for modules which ship typings, since this increases the startup time of Flow drastically
# @see https://github.com/facebook/flow/issues/869
#
[ignore]
.*\/node_modules\/(?!(@immowelt|log-fancy)\/).*
.*\/node_modules/npmconf/.*
.*\/node_modules/config-chain/.*

[include]

[libs]

[options]
suppress_comment= \\(.\\|\n\\)*\\$FlowFixMe

#
# Supress errors in case we require() something based on a variable (E.g. used in the getComponent function of hypernova).
#
module.ignore_non_literal_requires=true

[lints]
# all=off by default
all=warn
untyped-type-import=error
sketchy-null-bool=off
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
node_modules

# third party typings
flow-typed/npm

# compiled assets
dist

# test results
coverage

# Ignore the symlink ".editorconfig" from the @immowelt/styleguide-javascript package.
.editorconfig

# Ignore the symlink ".prettierrc" from the @immowelt/styleguide-javascript package.
.prettierrc
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# dependencies
node_modules

# third party typings
flow-typed/npm

# test results
coverage
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v8
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sudo: false
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
before_install:
- npm install -g greenkeeper-lockfile@1
before_script:
- greenkeeper-lockfile-update
after_script:
- greenkeeper-lockfile-upload
73 changes: 73 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Contributing
We are open and grateful for any contributions made by you!

## Reporting Issues
Before opening an issue, please make sure that your issue hasn't been already reported by using the search functionality of the [issue tracker](https://github.com/ImmoweltGroup/util-create-project-config/issues).

## Development
Visit the [issue tracker](https://github.com/ImmoweltGroup/util-create-project-config/issues) to find a list of open issues that are easy to pick up or need some love.

Fork, then clone the repo:
```
git clone https://github.com/your-username/util-create-project-config.git
```

### Building
Running the `build` task will transpile the code and move all flow annotations into separate files.
```
npm run build
```

### Testing, Type-Checking with Flow and Linting
To run the tests:
```
npm run test
```

To continuously watch and run the unit-tests, execute the following:
```
npm run jest:watch
```

To perform linting with `eslint`, run the following:
```
npm run lint
```

To perform a single check of the types with `flow`, run the following:
```
npm run flow
```

### New Features
Please open an issue with a proposal for a new feature or refactoring before starting on the work. We don't want you to waste your efforts on a pull request that we won't want to accept.

## Commit guidelines and semantic release
Our repositories make great use of [semantic-release](https://github.com/semantic-release/semantic-release). This tool automatically creates releases once the code is pushed to our `master` branch and the commits signal a release-worthy CI run.

All commits must contain a prefix of one of the following values, e.g.

| Prefix | Description | Release type |
| ------------- | --------------- | ------------- |
| `!!!` | Breaking change | Major |
| `FEATURE` | Feature | Minor |
| `BUGFIX` | Bugfix | Patch |
| `SECURITY` | Security change | Patch |
| `TASK` | Other changes | No release |

So in case you want to submit a bugfix, you should execute `git commit -m "BUGFIX: A short description of what this commit solves - solves #21"` where `21` is the issue number of the bug you fix.

## Submitting Changes

* Open a new issue in the [issue tracker](https://github.com/ImmoweltGroup/util-create-project-config/issues).
* Fork the repo.
* Create a new feature branch based off the `master` branch.
* Make sure all tests pass and there are no linting errors.
* Make sure to commit your changes with the guidelines written above.
* Submit a pull request, referencing any issues it addresses.

Please try to keep your pull request focused in scope and avoid including unrelated commits.

After you have submitted your pull request, we'll try to get back to you as soon as possible. We may suggest some changes or improvements.

Thank you for contributing! :-) :heart:
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Immowelt Hamburg

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.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# find-config-up

[![Powered by Immowelt](https://img.shields.io/badge/powered%20by-immowelt-yellow.svg?colorB=ffb200)](https://stackshare.io/immowelt-group/)
[![Greenkeeper badge](https://badges.greenkeeper.io/ImmoweltGroup/find-config-up.svg)](https://greenkeeper.io/)
[![Build Status](https://travis-ci.org/ImmoweltGroup/find-config-up.svg?branch=master)](https://travis-ci.org/ImmoweltGroup/find-config-up)
[![Dependency Status](https://david-dm.org/ImmoweltGroup/find-config-up.svg)](https://david-dm.org/ImmoweltGroup/find-config-up)
[![devDependency Status](https://david-dm.org/ImmoweltGroup/find-config-up/dev-status.svg)](https://david-dm.org/ImmoweltGroup/find-config-up#info=devDependencies&view=table)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)

Resolve your packages configuration from a `.*rc` or `package.json` file with a given property up the file-tree.

## Install

```sh
$ npm install find-config-up
```

or

```sh
$ yarn add find-config-up
```

## API
#### Getting started
```js
const findConfigUp = require('find-config-up');

(async function() {
//
// Tries to find a `.myfancyrc` up the tree and merges it with the defaults,
// if no file was found it falls back to resolving a `package.json` up the tree
// with a `my-fancy-package` property defined.
//
// If none of the above was successful, the defaults will be returned.
//
const config = await findConfigUp({
rawConfigFileName: '.myfancyrc',
packageJsonProperty: 'my-fancy-package',
defaults: {}
});

console.log(config);
})()
```

#### Options
##### `rawConfigFileName: string`
The file name of your preffered `.rc` file, e.g. `.babelrc`.

##### `packageJsonProperty: string`
The property name which should be resolved as a fallback in all `package.json` files up the tree.

##### `defaults: Object`
The defaults which will be recursively merged with the results from the file-system.

##### `cwd: string` (Optional)
A custom current working directory, falls back to `process.cwd()`.

## Contributing
See the `CONTRIBUTING.md` file at the root of the repository.

## Licensing
See the `LICENSE` file at the root of the repository.
Loading

0 comments on commit 719418c

Please sign in to comment.