Browse Source

Add basic docs explaining nbb compatibility

Gabriel Horner 3 years ago
parent
commit
823b8ec39e
2 changed files with 14 additions and 5 deletions
  1. 7 5
      CODEBASE_OVERVIEW.md
  2. 7 0
      docs/dev-practices.md

+ 7 - 5
CODEBASE_OVERVIEW.md

@@ -36,15 +36,17 @@ After cloning the [Logseq repository](https://github.com/logseq/logseq), there a
 
 - Config files are located at the root directory. `package.json` contains the JavaScript dependencies while `deps.edn` contains their Clojure counterparts. `shadow-cljs.edn` and `gulpfile.js` contain all the build scripts.
 
-- `/public` and `/resources` contain all the static assets
+- `public/` and `resources/` contain all the static assets
 
-- `/src` is where most of the code locates.
+- `src/` is where most of the code is located.
 
-  - `/src/electron` and `/src/main/electron` contains code specific to the desktop app.
+  - `src/electron/` and `src/main/electron/` contains code specific to the desktop app.
 
-  - `/src/test` contains all the test and `/src/dev-cljs` contains some development utilities.
+  - `src/test/` contains all the tests and `src/dev-cljs/` contains some development utilities.
 
-  - `/src/main/frontend` contains code that powers the Logseq editor. Folders and files inside are organized by features or functions. For example, `components` contains all the UI components and `handler` contains all the event-handling code. You can explore on your own interest.
+  - `src/main/frontend/` contains code that powers the Logseq editor. Folders and files inside are organized by features or functions. For example, `components` contains all the UI components and `handler` contains all the event-handling code. You can explore on your own interest.
+
+  - `src/main/logseq/` contains the api used by plugins and the graph-parser.
 
 ## Data Flow
 

+ 7 - 0
docs/dev-practices.md

@@ -58,6 +58,13 @@ We use [datascript](https://github.com/tonsky/datascript)'s datalog to power our
 scripts/lint_rules.clj
 ```
 
+### Nbb compatible
+
+Namespaces have the metadata flag `^:nbb-compatible` indicate they are compatible with https://github.com/logseq/nbb-logseq. This compatibility is necessary in order for namespaces to be reused by the frontend and CLIs. To confirm these compatibilities, run:
+```
+bb test:load-nbb-compatible-namespaces
+```
+
 ## Testing
 
 We have unit and end to end tests.