Skip to content

Commit

Permalink
feat: add desktop repo (#1071)
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz authored Jun 7, 2022
1 parent 0bb12db commit 0b7ce82
Show file tree
Hide file tree
Showing 135 changed files with 17,821 additions and 180 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# git
.git/
.gitignore
.eslintcache
Expand All @@ -7,3 +6,4 @@ dist
packages/web-server/public/assets
packages/web-server/tmp
packages/web-server/vendor/bundles
packages/desktop
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
packages/*/coverage
4 changes: 4 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ queries:

paths:
- packages/web/src/javascripts
- packages/desktop/app

paths-ignore:
- bin
- node_modules
- build
- dist
- packages/desktop/app/dist
27 changes: 27 additions & 0 deletions .github/workflows/desktop.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Dev

on:
push:
branches:
- develop
paths:
- packages/desktop/**

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/desktop
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn setup
- run: node scripts/build.mjs appimage-x64
- uses: actions/upload-artifact@v2
with:
name: 'AppImage'
path: dist/*.AppImage
2 changes: 1 addition & 1 deletion .github/workflows/git-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
- name: git-sync
uses: wei/git-sync@v3
with:
source_repo: "standardnotes/web"
source_repo: "standardnotes/app"
source_branch: "refs/remotes/source/*"
destination_repo: "standardnotes/private-web"
destination_branch: "refs/heads/*"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/beta.yml → .github/workflows/web.beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Beta
on:
push:
branches: [ beta/* ]
paths:
- packages/web-server/**
- packages/web/**
workflow_dispatch:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dev.yml → .github/workflows/web.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
push:
branches: [ develop ]
paths:
- packages/web-server
- packages/web
- packages/web-server/**
- packages/web/**
workflow_dispatch:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prod.yml → .github/workflows/web.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
push:
branches: [ main ]
paths:
- packages/web-server
- packages/web
- packages/web-server/**
- packages/web/**

jobs:
test:
Expand Down
76 changes: 0 additions & 76 deletions CODE_OF_CONDUCT.md

This file was deleted.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Standard Notes is a simple and private notes app available on most platforms, in
<div align="center">

[![latest release version](https://img.shields.io/github/v/release/standardnotes/desktop)](https://github.com/standardnotes/desktop/releases)
[![License](https://img.shields.io/github/license/standardnotes/web?color=blue)](https://github.com/standardnotes/web/blob/main/LICENSE)
[![License](https://img.shields.io/github/license/standardnotes/app?color=blue)](https://github.com/standardnotes/app/blob/main/LICENSE)
[![Slack](https://img.shields.io/badge/slack-standardnotes-CC2B5E.svg?style=flat&logo=slack)](https://standardnotes.com/slack)
[![Twitter Follow](https://img.shields.io/badge/follow-%40standardnotes-blue.svg?style=flat&logo=twitter)](https://twitter.com/standardnotes)

Expand Down Expand Up @@ -58,8 +58,6 @@ Developers can create and publish their own extensions. Visit the [documentation

Questions? Find answers on our [Help page](https://standardnotes.com/help).

🙏

---

### Docker setup
Expand Down
4 changes: 2 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ case "$COMMAND" in
echo "Prestart Step 1/1 - Removing server lock"
rm -f /app/packages/web-server/tmp/pids/server.pid
echo "Starting Server..."
yarn start:web
yarn start:server:web
;;

'start-local' )
Expand All @@ -21,7 +21,7 @@ case "$COMMAND" in
echo "Prestart Step 4/4 - Building"
yarn build
echo "Starting Server..."
yarn start:web
yarn start:server:web
;;

* )
Expand Down
4 changes: 4 additions & 0 deletions linter.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"exclude": ["node_modules"],
"extends": "./node_modules/@standardnotes/config/src/linter.tsconfig.json"
}
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@
"test": "lerna run test --parallel",
"clean": "lerna run clean",
"build": "lerna run build",
"start:web": "lerna run start --scope=@standardnotes/web-server",
"start:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server",
"build:web": "lerna run build --scope=@standardnotes/web",
"start:server:web": "lerna run start --scope=@standardnotes/web-server",
"start:server:web:localhost": "lerna run start:no-binding --scope=@standardnotes/web-server",
"prepare": "husky install"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/desktop/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEFAULT_SYNC_SERVER=https://api.standardnotes.com
42 changes: 42 additions & 0 deletions packages/desktop/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"env": {
"node": true,
"commonjs": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"../../node_modules/@standardnotes/config/src/.eslintrc"
],
"parser": "@typescript-eslint/parser",
"ignorePatterns": ["test", "scripts", ".eslintrc", "tsconfig.json", "node_modules"],
"rules": {
/** Style */
"quotes": ["error", "single", { "avoidEscape": true }],

/** Preferences */
"no-console": "off",
"accessor-pairs": 0,
"no-nonoctal-decimal-escape": 0,
"no-unsafe-optional-chaining": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-use-before-define": ["error", "nofunc"],
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/no-var-requires": 0,
/**
* The following rules are disabled because they are already implemented
* in the TypeScript configuration, or vice-versa
*/
"no-unused-vars": 0,
"no-useless-constructor": 0,
"no-unused-expressions": 0,
"@typescript-eslint/camelcase": 0
},
"plugins": ["@typescript-eslint"],
"globals": {
"zip": true
}
}
15 changes: 15 additions & 0 deletions packages/desktop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
node_modules/
.DS_Store
dist/
npm-debug.log
test/data/tmp/

/app/dist
.vscode
.idea
.env
.env.production
.env.development

codeqldb
yarn-error.log
2 changes: 2 additions & 0 deletions packages/desktop/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
5 changes: 5 additions & 0 deletions packages/desktop/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extension": ["ts"],
"spec": "test/*.spec.ts",
"require": "ts-node/register/transpile-only"
}
6 changes: 6 additions & 0 deletions packages/desktop/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
runtime = electron
target = 5.0.10
target_arch = x64
disturl = https://atom.io/download/atom-shell
export npm_config_runtime=electron
export npm_config_build_from_source=true
1 change: 1 addition & 0 deletions packages/desktop/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14.17.3
8 changes: 8 additions & 0 deletions packages/desktop/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node_modules/
dist/
app/dist/
test/data/tmp/
web/
.github
codeqldb
*.js
6 changes: 6 additions & 0 deletions packages/desktop/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 120,
"semi": false
}
Loading

0 comments on commit 0b7ce82

Please sign in to comment.