Skip to content

Commit ec906d3

Browse files
committed
chore: initial commit
0 parents  commit ec906d3

File tree

23 files changed

+10983
-0
lines changed

23 files changed

+10983
-0
lines changed

.babelrc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": [
7+
"last 2 Chrome versions",
8+
"last 2 Opera versions",
9+
"last 2 Firefox versions",
10+
"last 2 Edge versions",
11+
"last 2 Safari versions",
12+
"last 2 iOS versions",
13+
"last 2 ChromeAndroid versions"
14+
]
15+
}
16+
],
17+
"@babel/preset-react"
18+
],
19+
"plugins": ["emotion", "@babel/plugin-proposal-class-properties"]
20+
}

.eslintrc.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* eslint-disable no-undef */
2+
module.exports = {
3+
env: {
4+
browser: true,
5+
es2020: true,
6+
},
7+
extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier'],
8+
parserOptions: {
9+
ecmaFeatures: {
10+
jsx: true,
11+
},
12+
ecmaVersion: 11,
13+
sourceType: 'module',
14+
},
15+
plugins: ['react'],
16+
rules: {
17+
'react/prop-types': 0,
18+
},
19+
settings: {
20+
react: {
21+
version: 'detect',
22+
},
23+
},
24+
ignorePatterns: ['dist/*.js'],
25+
};

.github/workflows/test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Node CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- '*'
9+
10+
pull_request:
11+
types: [opened, synchronize, reopened]
12+
13+
jobs:
14+
test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
node-version: [12.x]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v1
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Get yarn cache directory path
27+
id: yarn-cache-dir-path
28+
run: echo "::set-output name=dir::$(yarn cache dir)"
29+
- uses: actions/cache@v1
30+
with:
31+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
32+
key: ${{ runner.os }}-yarn-${{ hashFiles(format('{0}{1}', github.workspace, '/yarn.lock')) }}
33+
restore-keys: |
34+
${{ runner.os }}-yarn-
35+
- name: log versions
36+
run: node --version && npm --version && yarn --version
37+
- name: install dependecies
38+
run: yarn --frozen-lockfile
39+
- name: run linter
40+
run: yarn lint
41+
- name: check formatting
42+
run: yarn format:ci
43+
- name: run build
44+
run: yarn build

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
.vscode

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist/
2+
bin/
3+
public/
4+
.cache/
5+
packages/netlify-cms-backend-github/src/fragmentTypes.js

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "all",
3+
"singleQuote": true,
4+
"printWidth": 100
5+
}

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2019-2020 Netlify <team@netlify.com>
2+
3+
MIT License
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Netlify CMS Widget Parent
2+
3+
A Netlify CMS widget to select directory parent for an entry
4+
5+
## Usage
6+
7+
## Development
8+
9+
```bash
10+
yarn
11+
yarn develop
12+
```
13+
14+
## Build
15+
16+
```bash
17+
yarn
18+
yarn build
19+
```
20+
21+
## Release
22+
23+
Make sure you have npm + git credentials set up.
24+
25+
- [ ] Make changes and/or merge PRs.
26+
- [ ] `git checkout master`
27+
- [ ] `git pull`
28+
- [ ] `yarn`
29+
- [ ] Set up semantic release environment variables:
30+
31+
```bash
32+
export GIT_AUTHOR_NAME=<your-github-login>
33+
export GIT_AUTHOR_EMAIL=<your-github-email>
34+
export GIT_COMMITTER_NAME=<your-github-login>
35+
export GIT_COMMITTER_EMAIL=<your-github-email>
36+
export GITHUB_TOKEN=<github-token-with-public_repo-permissions>
37+
```
38+
39+
- [ ] `npm run release`

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] };

example/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
backend:
2+
name: git-gateway
3+
branch: CMS_BRANCH_PLACEHOLDER
4+
5+
local_backend: true
6+
media_folder: 'example/media'
7+
8+
collections:
9+
- name: pages
10+
label: Pages
11+
label_singular: Page
12+
folder: example/content/pages
13+
create: true
14+
nested: { depth: 100 }
15+
fields:
16+
- label: Title
17+
name: title
18+
widget: string
19+
meta: { path: { label: Parent, widget: parent, index_file: 'index' } }

0 commit comments

Comments
 (0)