Skip to content

Commit

Permalink
Merge pull request #1382 from thematters/develop
Browse files Browse the repository at this point in the history
Release: v3.12.0
  • Loading branch information
robertu7 authored Jul 31, 2020
2 parents 5ae4b37 + 709ed51 commit e7640a4
Show file tree
Hide file tree
Showing 142 changed files with 1,280 additions and 663 deletions.
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# dev team is required for all PR reviews
* @thematters/dev

# data team is required for all analytic related PR reviews
src/components/Analytics/* @thematters/data
src/common/utils/analytics.ts @thematters/data
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "thematters/dev"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "thematters/dev"
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@master

- name: Setup Node.js
uses: actions/setup-node@v2-beta
uses: actions/setup-node@v2.1.1
with:
node-version: '12.16'

Expand Down
2 changes: 2 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
**/*.ts
**/*.tsx
49 changes: 49 additions & 0 deletions .vim/.vimrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
set nocompatible

call plug#begin('~/.local/share/nvim/plugged')

" Plugins
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'elzr/vim-json'
Plug 'mattn/emmet-vim'
Plug 'dense-analysis/ale'
Plug 'yardnsm/vim-import-cost', { 'do': 'npm install' }
Plug 'mileszs/ack.vim'

Plug 'docker/docker' , {'rtp': '/contrib/syntax/vim/'}
Plug 'leafgarland/typescript-vim'
Plug 'peitalin/vim-jsx-typescript'
Plug 'jparise/vim-graphql'
Plug 'sbdchd/neoformat'
Plug 'tpope/vim-cucumber'

call plug#end()

set number
set encoding=utf-8
set fileencoding=utf-8
set mouse-=a
set clipboard+=unnamed
syntax on

" NERDTree
let NERDTreeAutoDeleteBuffer = 1
let NERDTreeMinimalUI = 1
let NERDTreeShowHidden = 1
let NERDTreeShowLineNumbers = 1
let NERDTreeWinSize = 50

" NERDTree-tabs
let g:nerdtree_tabs_open_on_console_startup = 1

" Ale
let g:airline#extensions#ale#enabled = 1

" import cost
augroup import_cost_auto_run
autocmd!
autocmd InsertLeave *.js,*.jsx,*.ts,*.tsx ImportCost
autocmd BufEnter *.js,*.jsx,*.ts,*.tsx ImportCost
autocmd CursorHold *.js,*.jsx,*.ts,*.tsx ImportCost
augroup END
36 changes: 6 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

- Install dependencies: `npm i`
- Environment variables: `cp .env.local.example .env.local`
- (Optional) Run `npm run gen:type` or `npm run gen:watch`
- Run `npm run gen:type` or `npm run gen:watch`
- Run `npm run dev`, then go to `http://localhost:3000/`

### Build and run production server

`npm run build && npm run start`

### Start local dev with docker
### Start local dev with Docker

- Environment variables: `cp .env.local.example .env.local`
- Set command alias: `source bin/dc-alias`
Expand Down Expand Up @@ -44,30 +44,6 @@
- `docker pull 903380195283.dkr.ecr.ap-southeast-1.amazonaws.com/matters-web:latest`
- `docker tag 903380195283.dkr.ecr.ap-southeast-1.amazonaws.com/matters-web:latest matters-web:latest`

## Routing

We customized routes with Express in `server.ts` and disabled [fs routing](https://github.com/zeit/next.js#disabling-file-system-routing).

Note that we need to specify `href` (the path inside pages directory + query string) and `as` (the path that will be renderer on browser URL bar) props in `<Link>` component.

For instances:

```jsx
// Home
<Link href="/Home" as="/">

// All Authors
<Link href="/Authors" as="/authors">

// User Comments
<Link href="/User/Comments?username=matty" as="/@matty/comments">

// Tag Detail
<Link href="/TagDetail?id=RHJhZnQ6MQ==" as="/tags/RHJhZnQ6MQ==">
```

See [next.js docs](https://github.com/zeit/next.js#routing) for more details.

## Conventions

[Matters Design System](https://paper.dropbox.com/doc/Matters-Design-System--AXX9x2tuPldQFCWTN0Mt~_itAQ-klFuV5yv3ZlqpqHL0w0kU)
Expand Down Expand Up @@ -122,11 +98,11 @@ See `.vscode/settings.json`
- [CoenraadS.bracket-pair-colorizer](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer)
- [naumovs.color-highlight]()

## Release a new version
### Vim

#### Settings

1. Update `CHANGELOG.md`
2. Update `version` field of `package.json`
3. Create a new release and tag in [GitHub Releases](https://github.com/thematters/matters-web/releases)
For vim users, you might want to see `.vim/.vimrc` (using vim-plug).

## Troubleshooting

Expand Down
Loading

0 comments on commit e7640a4

Please sign in to comment.