同步操作将从 Gitee 极速下载/notesnook 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Try it out! | Developer guide | How to build? | Desktop app
You can find all the desktop related code in the desktop/
directory. Since it uses the web app directly, we are keeping both together. (We should probably move it to it's own project at some point.)
Before you start it is recommended that you read the contributing guidelines.
Requirements:
Before you can do anything, you'll need to install Node.js on your system.
Once you have completed the setup, the first step is to clone
the monorepo:
git clone https://github.com/streetwriters/notesnook.git
# change directory
cd notesnook
Once you are inside the ./notesnook
directory, run the preparation step:
# this might take a while to complete
npm install
Now you can finally start the web app:
npm run start:web
If you'd like to build in production mode:
npm run build:web
# serve the app locally
npx serve apps/web/build
This project is in a transition state between Javascript & Typescript. We are gradually porting everything over to Typescript so if you can help with that, it'd be great!
We try to keep the stack as lean as possible
src/
: 99% of the source code lives here & this is also where you'll be spending most of your time.
index.tsx
: the app entrypoint responsible for loading the appropriate view based on the current route.app.js
: the default route that contains the whole note taking experience (notes list, navigation, editor etc.)views/
: Contains all the views including views for login, settings, notes, notebooks & topics.components/
: All the reusuable UI components are here (e.g. button, editor, etc.)stores/
: Contains the glue code & logic for all the UI interaction. For example, when you pin a note the src/stores/note-store.js
is responsible for everything including refreshing the list to reflect the changes.navigation/
: All the routing & navigation logic lives here. The app uses 2 kinds of routers:
routes.js
: This contains all the main routes like /notes
, /notebooks
with information on what to render when user goes to a particular route.hash-routes.js
: The hash routes are used for temporary navigation like opening dialogs, opening a note. These look like #/notes/6307bbd65d5d5d5cb86f6f74/edit
.interfaces/
: This is where the platform specific storage & encryption logic lives. These interface implementations are used by the @notesnook/core
to provide capabilities such as persistence & encryption.hooks/
: Contains all the general purpose React hooksutils/
: These are general-purpose utilities for performing various tasks such as downloading files, storing configuration etc.common/
: This directory contains the shared logic between the whole app. For example, this is where the database is instantiated for use throughout the app.commands/
: These are commands used by the desktop app for things like checking for updates, storing backups etc.desktop/
: The Electron layer for the desktop app lives here. (This should be moved outside into it's own project).When you are done making the required changes, you need to run the tests. We use Playwright as the testing framework. The tests can be started with a single command:
npm run test:web
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。