Skip to content

Commit a8ab13b

Browse files
Merge pull request #46 from SoftwareBrothers/beta
Beta
2 parents 027a2c3 + 89a2f93 commit a8ab13b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+7282
-1168
lines changed

.env-example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
NODE_ENV=test
2+
POSTGRES_USER="adminbro"
3+
POSTGRES_PASSWORD="adminbro"
4+
POSTGRES_DATABASE="adminbro-sequelize-test"
5+
POSTGRES_HOST
6+
POSTGRES_PORT

.eslintrc.js

Lines changed: 56 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,60 @@
11
module.exports = {
2-
'env': {
3-
'es6': true,
4-
'node': true,
5-
'mocha': true
2+
env: {
3+
browser: true,
4+
es2020: true,
5+
},
6+
extends: [
7+
'airbnb',
8+
'plugin:react/recommended',
9+
'plugin:@typescript-eslint/recommended',
10+
],
11+
ignorePatterns: [
12+
'*/build/**/*',
13+
'*.json',
14+
'*.txt',
15+
'yarn.lock',
16+
'*.yaml',
17+
],
18+
parser: '@typescript-eslint/parser',
19+
parserOptions: {
20+
ecmaFeatures: {
21+
jsx: true,
622
},
7-
'extends': 'airbnb-base',
8-
'parserOptions': {
9-
'ecmaVersion': 2018,
10-
'sourceType': 'module'
23+
ecmaVersion: 11,
24+
sourceType: 'module',
25+
},
26+
plugins: [
27+
'react',
28+
'@typescript-eslint',
29+
],
30+
rules: {
31+
semi: ['error', 'never'],
32+
'no-unused-vars': 'off',
33+
'import/extensions': 'off',
34+
'import/no-unresolved': 'off',
35+
'react/jsx-filename-extension': 'off',
36+
indent: [
37+
'error',
38+
2,
39+
],
40+
'linebreak-style': ['error', 'unix'],
41+
'object-curly-newline': 'off',
42+
'@typescript-eslint/no-explicit-any': 'off',
43+
},
44+
overrides: [{
45+
files: ['*.tsx'],
46+
rules: {
47+
'react/prop-types': 'off',
48+
'react/jsx-props-no-spreading': 'off',
49+
'import/no-extraneous-dependencies': 'off',
1150
},
12-
'rules': {
13-
'indent': [
14-
'error',
15-
2
16-
],
17-
'linebreak-style': [
18-
'error',
19-
'unix'
20-
],
21-
'quotes': [
22-
'error',
23-
'single'
24-
],
25-
'semi': [
26-
'error',
27-
'never'
28-
],
29-
'import/no-unresolved': 'off',
30-
'no-underscore-dangle': 'off',
31-
'guard-for-in': 'off',
32-
'no-restricted-syntax': 'off',
33-
'no-await-in-loop': 'off',
51+
}, {
52+
files: ['./src/**/*.spec.ts', 'spec/*.ts'],
53+
rules: {
54+
'no-unused-expressions': 'off',
55+
'prefer-arrow-callback': 'off',
56+
'func-names': 'off',
57+
'import/no-extraneous-dependencies': 'off',
3458
},
35-
overrides: [
36-
{
37-
files: ['*-test.js', '*.spec.js'],
38-
rules: {
39-
'no-unused-expressions': 'off',
40-
'func-names': 'off',
41-
'prefer-arrow-callback': 'off'
42-
}
43-
}
44-
],
45-
globals: {
46-
'expect': true,
47-
'factory': true,
48-
'sandbox': true,
49-
'User': true
50-
}
51-
}
59+
}],
60+
}

.github/workflows/push.yml

Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: CI/CD
2-
on: push
2+
on: [push, pull_request]
33
jobs:
44
setup:
55
name: setup
@@ -73,6 +73,15 @@ jobs:
7373
POSTGRES_PASSWORD: postgres
7474
POSTGRES_DATABASE: postgres
7575
POSTGRES_USER: postgres
76+
- name: Build
77+
run: yarn build
78+
- name: Release
79+
if: github.event_name == 'push'
80+
env:
81+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
84+
run: yarn release
7685

7786
notify:
7887
name: Notify
@@ -81,7 +90,6 @@ jobs:
8190
needs:
8291
- test
8392
- setup
84-
- publish
8593
steps:
8694
- uses: technote-space/workflow-conclusion-action@v1
8795
- uses: 8398a7/action-slack@v3
@@ -93,34 +101,4 @@ jobs:
93101
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
94102
if: failure()
95103

96-
publish:
97-
name: Publish
98-
needs: test
99-
runs-on: ubuntu-latest
100-
steps:
101-
- name: Checkout
102-
uses: actions/checkout@v2
103-
- name: Setup
104-
uses: actions/setup-node@v1
105-
with:
106-
node-version: '10.x'
107-
- uses: actions/cache@v1
108-
id: yarn-cache
109-
with:
110-
path: node_modules
111-
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }}
112-
restore-keys: |
113-
${{ runner.os }}-node_modules-
114-
- name: Install
115-
if: steps.yarn-cache.outputs.cache-hit != 'true'
116-
run: yarn install
117-
- name: Release
118-
env:
119-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
120-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
121-
JIRA_TOKEN: ${{ secrets.JIRA_TOKEN }}
122-
JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
123-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
124-
run: yarn release
125-
126104

.gitignore

Lines changed: 119 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,120 @@
1-
node_modules
2-
.nyc_output
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
322
coverage
4-
.DS_store
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Microbundle cache
57+
.rpt2_cache/
58+
.rts2_cache_cjs/
59+
.rts2_cache_es/
60+
.rts2_cache_umd/
61+
62+
# Optional REPL history
63+
.node_repl_history
64+
65+
# Output of 'npm pack'
66+
*.tgz
67+
68+
# Yarn Integrity file
69+
.yarn-integrity
70+
71+
# dotenv environment variables file
72+
.env
73+
.env.test
74+
75+
# parcel-bundler cache (https://parceljs.org/)
76+
.cache
77+
.parcel-cache
78+
79+
# Next.js build output
80+
.next
81+
out
82+
83+
# Nuxt.js build / generate output
84+
.nuxt
85+
dist
86+
87+
# Gatsby files
88+
.cache/
89+
# Comment in the public line in if your project uses Gatsby and not Next.js
90+
# https://nextjs.org/blog/next-9-1#public-directory-support
91+
# public
92+
93+
# vuepress build output
94+
.vuepress/dist
95+
96+
# Serverless directories
97+
.serverless/
98+
99+
# FuseBox cache
100+
.fusebox/
101+
102+
# DynamoDB Local files
103+
.dynamodb/
104+
105+
# TernJS port file
106+
.tern-port
107+
108+
# Stores VSCode versions used for testing VSCode extensions
109+
.vscode-test
110+
111+
# yarn v2
112+
.yarn/cache
113+
.yarn/unplugged
114+
.yarn/build-state.yml
115+
.yarn/install-state.gz
116+
.pnp.*
117+
118+
build
119+
types
120+
.vscode

.npmignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
example-app
2+
migrations
3+
models
4+
.github
5+
src

.releaserc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
"@semantic-release/npm",
1616
"@semantic-release/github",
1717
"@semantic-release/git",
18-
["semantic-release-jira-releases-sb", {
19-
"projectId": "AB",
20-
"releaseNameTemplate": "v${version}",
21-
"jiraHost": "kmpgroup.atlassian.net",
22-
"ticketPrefixes": [ "AB" ],
23-
"released": true,
24-
"setReleaseDate": true
25-
}],
2618
[
2719
"semantic-release-slack-bot",
2820
{

example-app/.adminbro/.entry.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
AdminBro.UserComponents = {}

example-app/.adminbro/bundle.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example-app/.env-example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
NODE_ENV=test
2+
POSTGRES_USER="adminbro"
3+
POSTGRES_PASSWORD="adminbro"
4+
POSTGRES_DATABASE="adminbro-sequelize"

example-app/cypress.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"baseUrl": "http://localhost:3000/admin"
3+
}

0 commit comments

Comments
 (0)