Skip to content

Commit

Permalink
Merge pull request #163 from excalidraw/master
Browse files Browse the repository at this point in the history
merge code
  • Loading branch information
Ares2013 committed Mar 17, 2021
2 parents f3fdc38 + 052b73d commit 77796f8
Show file tree
Hide file tree
Showing 225 changed files with 25,150 additions and 33,878 deletions.
10 changes: 5 additions & 5 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
*
!public/
!src/
!.npmrc
!.env
!.eslintrc.json
!.npmrc
!.prettierrc
!package-lock.json
!package.json
!public/
!src/
!tsconfig.json
!.env
!yarn.lock
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ package-lock.json
.vscode/
firebase/
dist/
public/workbox
38 changes: 2 additions & 36 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
{
"extends": ["prettier", "react-app"],
"plugins": ["prettier"],
"extends": ["@excalidraw/eslint-config", "react-app"],
"rules": {
"curly": "warn",
"dot-notation": "warn",
"import/no-anonymous-default-export": "off",
"no-console": [
"warn",
{
"allow": ["warn", "error", "info"]
}
],
"no-else-return": "warn",
"no-lonely-if": "warn",
"no-restricted-syntax": [
"warn",
{
"message": "Use 't(...)' instead of literal text in JSX",
"selector": "JSXText[value=/\\w/]"
}
],
"no-unneeded-ternary": "warn",
"no-unused-expressions": "warn",
"no-unused-vars": "warn",
"no-useless-return": "warn",
"no-var": "warn",
"object-shorthand": "warn",
"one-var": ["warn", "never"],
"prefer-arrow-callback": "warn",
"prefer-const": [
"warn",
{
"destructuring": "all"
}
],
"prefer-template": "warn",
"prettier/prettier": "warn"
"import/no-anonymous-default-export": "off"
}
}
6 changes: 6 additions & 0 deletions .github/assets/crowdin.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions .github/assets/sentry.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .github/assets/vercel.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
directory: /
schedule:
interval: weekly
day: sunday
time: "01:00"
open-pull-requests-limit: 99
reviewers:
- lipis
assignees:
- lipis

- package-ecosystem: npm
directory: "/src/packages/excalidraw/"
directory: /src/packages/excalidraw/
schedule:
interval: weekly
day: sunday
time: "01:00"
open-pull-requests-limit: 99
reviewers:
- ad1992
assignees:
- ad1992

- package-ecosystem: npm
directory: "/src/packages/utils/"
directory: /src/packages/utils/
schedule:
interval: weekly
day: sunday
time: "01:00"
open-pull-requests-limit: 99
reviewers:
- ad1992
assignees:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
jobs:
build-docker:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- run: docker build -t excalidraw .
24 changes: 10 additions & 14 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,23 @@ on:
pull_request:

jobs:
build:
packages:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup Node.js 12.x
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- name: Setup Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 12.x

node-version: 14.x
- name: Install dependencies
run: |
npm ci
npm ci --prefix src/packages/excalidraw
npm ci --prefix src/packages/utils
yarn --frozen-lockfile
yarn --cwd src/packages/excalidraw
yarn --cwd src/packages/utils
- name: Build @excalidraw/excalidraw
run: |
npm run pack --prefix src/packages/excalidraw
yarn --cwd src/packages/excalidraw run pack
- name: Build @excalidraw/utils
run: |
npm run pack --prefix src/packages/utils
yarn --cwd src/packages/utils run pack
11 changes: 8 additions & 3 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Cancel
on: [push]
name: Cancel previous runs

on:
push:
branches:
- master
pull_request:

jobs:
cancel:
name: "Cancel Previous Runs"
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
Expand Down
24 changes: 9 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
name: Lint

on:
push:
branches:
- master
pull_request:
on: pull_request

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Setup Node.js 12.x
uses: actions/setup-node@v1
- name: Setup Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 14.x

- name: Install and lint
run: |
npm ci
npm run test:other
npm run test:code
npm run test:typecheck
env:
CI: true
yarn --frozen-lockfile
yarn test:other
yarn test:code
yarn test:typecheck
16 changes: 8 additions & 8 deletions .github/workflows/locales-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build locales coverage
on:
push:
branches:
- "l10n_master"
- l10n_master

jobs:
locales:
Expand All @@ -14,18 +14,18 @@ jobs:
with:
token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }}

- name: Setup Node.js 12.x
uses: actions/setup-node@v1
- name: Setup Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 12.x
node-version: 14.x

- name: Create report file
run: |
npm run locales-coverage
yarn locales-coverage
FILE_CHANGED=$(git diff src/locales/percentages.json)
if [ ! -z "${FILE_CHANGED}" ]; then
git config --global user.name 'Kostas Bariotis'
git config --global user.email 'konmpar@gmail.com'
git config --global user.name 'Excalidraw Bot'
git config --global user.email 'bot@excalidraw.com'
git add src/locales/percentages.json
git commit -am "Auto commit: Calculate translation coverage"
git push
Expand All @@ -43,5 +43,5 @@ jobs:
uses: kt3k/update-pr-description@v1.0.1
with:
pr_body: ${{ steps.getCommentBody.outputs.body }}
pr_title: "chore: New Crowdin updates"
pr_title: "chore: Update translations from Crowdin"
github_token: ${{ secrets.PUSH_TRANSLATIONS_COVERAGE_PAT }}
4 changes: 2 additions & 2 deletions .github/workflows/semantic-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Semantic PR title"
name: Semantic PR title

on:
pull_request_target:
Expand All @@ -8,7 +8,7 @@ on:
- synchronize

jobs:
main:
semantic:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.0.0
Expand Down
20 changes: 8 additions & 12 deletions .github/workflows/sentry-production.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
name: New Sentry Production Release
name: New Sentry production release

on:
push:
branches:
- master

jobs:
release:
sentry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1.0.0

- name: Setup Node.js 12.x
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- name: Setup Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 12.x

node-version: 14.x
- name: Install and build
run: |
npm ci
npm run build:app
yarn --frozen-lockfile
yarn build:app
env:
CI: true

- name: Install Sentry
run: |
curl -sL https://sentry.io/get-cli/ | bash
- name: Create new Sentry release
run: |
export SENTRY_RELEASE=$(sentry-cli releases propose-version)
Expand Down
23 changes: 7 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
name: Tests

on:
push:
branches:
- master
pull_request:
on: pull_request

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup Node.js 12.x
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- name: Setup Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 12.x

node-version: 14.x
- name: Install and test
run: |
npm ci
npm run test:app
env:
CI: true
yarn --frozen-lockfile
yarn test:app
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ firebase
logs
node_modules
npm-debug.log*
package-lock.json
static
yarn-debug.log*
yarn-error.log*
yarn.lock
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12
14
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
### Option 2 - CodeSandbox

1. Go to https://codesandbox.io/s/github/excalidraw/excalidraw
1. Connect your Github account
1. Connect your GitHub account
1. Go to Git tab on left side
1. Tap on `Fork Sandbox`
1. Write your code
Expand All @@ -35,7 +35,6 @@ Make sure the title starts with a semantic prefix:

- **feat**: A new feature
- **fix**: A bug fix
- **improvement**: An improvement to a current feature
- **docs**: Documentation only changes
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- **refactor**: A code change that neither fixes a bug nor adds a feature
Expand Down

0 comments on commit 77796f8

Please sign in to comment.