Skip to content

Commit 71409b3

Browse files
committed
Initial commit
0 parents  commit 71409b3

16 files changed

+9379
-0
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
'extends': '@launchpadlab/eslint-config/react'
3+
}

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
lib
2+
esm
3+
/log/*
4+
/tmp/*
5+
!/log/.keep
6+
!/tmp/.keep
7+
npm-debug.log*
8+
node_modules
9+
coverage
10+
yarn-error.log

.renovaterc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@launchpadlab"]
3+
}

.size-limit.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = [
2+
{
3+
path: 'lib',
4+
limit: '5 KB'
5+
}
6+
]

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: node_js
2+
node_js:
3+
- '8'
4+
cache:
5+
- yarn
6+
- npm
7+
notifications:
8+
email: false
9+
before_script:
10+
- 'yarn lint'
11+
- 'yarn size'

LICENSE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2017 Launchpad Lab
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# use-cloudinary
2+
3+
A hook to simplify direct upload calls to the [cloudinary API](https://cloudinary.com/documentation/upload_images#uploading_with_a_direct_call_to_the_api).
4+
5+
<!-- TODO: add example and docs -->
6+
7+
Implemented with [useAsyncFn](https://github.com/streamich/react-use/blob/master/docs/useAsyncFn.md) from `react-use`.

__mocks__/isomorphic-fetch.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
const fetch = jest.fn(function (url, options) {
3+
// Echoes back passed options
4+
return Promise.resolve({ url, ...options })
5+
})
6+
7+
export default fetch

babel.config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
module.exports = {
3+
"presets": [
4+
["@launchpadlab/babel-preset/react", {
5+
"env": {
6+
// Don't transform modules in "esm" mode.
7+
"modules": process.env.BABEL_ENV === 'esm' ? false : 'auto'
8+
}
9+
}]
10+
]
11+
}

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
'setupFiles': [
3+
'./test/setup.js',
4+
]
5+
}

0 commit comments

Comments
 (0)