-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit bc66cba
Showing
27 changed files
with
20,184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#root = true | ||
|
||
[*] | ||
indent_style = space | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
max_line_length = 100 | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
node_modules | ||
coverage | ||
.nyc_output | ||
.DS_Store | ||
*.log | ||
.vscode | ||
.idea | ||
dist | ||
compiled | ||
.awcache | ||
.rpt2_cache | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"modules": true, | ||
"plugins": { | ||
"postcss-preset-env": { | ||
"stage": 3, | ||
"features": { | ||
"color-mod-function": { "unresolved": "warn" }, | ||
"custom-media-queries": { | ||
"preserve": false | ||
}, | ||
"custom-properties": { | ||
"preserve": false | ||
}, | ||
"nesting-rules": true | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Sanity, Inc | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Sanity Asset Source: Unsplash | ||
|
||
## Developing on this module | ||
|
||
To simulate using your development version as a real module inside a studio, you can do the following: | ||
|
||
* Run `npm install && npm link` from the root of this repository. | ||
* Run `npm run watch` to start developing and build the module when changes are made. | ||
|
||
#### Displaying your development version inside a studio | ||
|
||
**With the mono-repo's `test-studio`:** | ||
|
||
* Bootstrap the monorepo: `npm run bootstrap` | ||
* Add `sanity-plugin-asset-source-unsplash` with the current version number to `package.json` in the `test-studio` root folder (but don't run `npm install` afterwards) | ||
* Run `npm link sanity-plugin-asset-source-unsplash` inside the mono-repo's root. | ||
* Add `asset-source-unsplash` to the list of the studios plugins in `sanity.json`. | ||
* Restart the `test-studio` | ||
|
||
**With a regular Sanity Studio:** | ||
* Run `npm install` | ||
* Add `sanity-plugin-asset-source-unsplash` with the current version number to `package.json`. | ||
* Run `npm link sanity-plugin-asset-source-unsplash` | ||
* Add `asset-source-unsplash` to the list of the studios plugins in `sanity.json`. | ||
* Start the studio | ||
|
||
When you are done and have published your new version, you can run `npm unlink` inside this repo, and `npm unlink sanity-plugin-asset-source-unsplash` inside the mono-repo or studio to get back to the normal state. Then run `npm run bootstrap` for the mono-repo or `npm install` inside the regular studio to use the published version. | ||
|
||
|
||
## Futher reading | ||
|
||
https://github.com/danielma/unsplash-react | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"accessKey": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const tsconfig = require('./tsconfig.json') | ||
const moduleNameMapper = require('tsconfig-paths-jest')(tsconfig) | ||
|
||
module.exports = { | ||
transform: { | ||
'.(ts|tsx)': 'ts-jest' | ||
}, | ||
testEnvironment: 'node', | ||
testRegex: '(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$', | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'css'], | ||
coveragePathIgnorePatterns: ['/node_modules/', '/test/'], | ||
globals: { | ||
document: {}, | ||
window: {}, | ||
HTMLElement: {} | ||
}, | ||
collectCoverageFrom: ['src/*.{js,ts}'], | ||
moduleNameMapper: { | ||
...moduleNameMapper, | ||
'\\.(css|less|sass|scss)$': '<rootDir>/test/__mocks__/styleMock.js' | ||
} | ||
} |
Oops, something went wrong.