@@ -241,3 +241,51 @@ django-prose-editor outside the admin in your site.
241
241
242
242
In addition, you may optionally set a ``--prose-editor-typographic `` property
243
243
to control the color of typographic characters when shown.
244
+
245
+
246
+ Development
247
+ ===========
248
+
249
+ For the best development experience:
250
+
251
+ 1. Install django-prose-editor in editable mode in your project:
252
+
253
+ .. code-block :: shell
254
+
255
+ pip install -e /path/to/django-prose-editor
256
+
257
+ 2. Run ``yarn && yarn dev `` in the django-prose-editor directory to watch for
258
+ asset changes.
259
+
260
+ When using ``yarn dev ``:
261
+
262
+ - The generated CSS and JavaScript is not minified, making it easier to debug.
263
+ - Source maps are generated to help identify exactly where in the source code
264
+ an error occurs.
265
+ - The watcher will rebuild files automatically when you make changes.
266
+
267
+ Source maps are generated in development mode (``yarn dev ``) for easier
268
+ debugging, but not included in production builds to keep the package size
269
+ manageable. The JavaScript in this project is quite extensive, so source maps
270
+ would significantly increase the distribution size.
271
+
272
+ The pre-commit configuration includes a hook that prevents committing files
273
+ with source map references, ensuring that development artifacts don't make it
274
+ into the repository.
275
+
276
+ Code Style and Linting
277
+ ---------------------
278
+
279
+ This project uses pre-commit hooks to enforce coding style guidelines. We use
280
+ Ruff for Python linting and formatting, Biome for JavaScript/TypeScript linting
281
+ and formatting and a few other hooks.
282
+
283
+ To set up pre-commit using uv:
284
+
285
+ .. code-block :: shell
286
+
287
+ uv tool install pre-commit
288
+ pre-commit install
289
+
290
+ Pre-commit will automatically check your code for style issues when you commit
291
+ changes.
0 commit comments