{"id":16411988,"url":"https://github.com/dmitri-sintsov/django-deno","last_synced_at":"2025-10-09T18:06:30.074Z","repository":{"id":57419738,"uuid":"348743503","full_name":"Dmitri-Sintsov/django-deno","owner":"Dmitri-Sintsov","description":"Django assets / bundle manager with TypeScript transpilation support via sucrase or swc and pluggable apps scripts support.","archived":false,"fork":false,"pushed_at":"2024-12-08T08:09:21.000Z","size":83172,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-15T00:02:01.986Z","etag":null,"topics":["deno","django","rollup","swc","typescript"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dmitri-Sintsov.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-17T14:39:34.000Z","updated_at":"2024-12-08T08:09:24.000Z","dependencies_parsed_at":"2024-10-27T18:45:46.245Z","dependency_job_id":"6a9fbf70-13a6-4ee9-89c0-7ae999691ae1","html_url":"https://github.com/Dmitri-Sintsov/django-deno","commit_stats":{"total_commits":131,"total_committers":1,"mean_commits":131.0,"dds":0.0,"last_synced_commit":"7dcc7d09497407828f2b9d99d81f44effaecb5f8"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/Dmitri-Sintsov/django-deno","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dmitri-Sintsov%2Fdjango-deno","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dmitri-Sintsov%2Fdjango-deno/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dmitri-Sintsov%2Fdjango-deno/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dmitri-Sintsov%2Fdjango-deno/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dmitri-Sintsov","download_url":"https://codeload.github.com/Dmitri-Sintsov/django-deno/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dmitri-Sintsov%2Fdjango-deno/sbom","scorecard":{"id":41237,"data":{"date":"2025-08-11","repo":{"name":"github.com/Dmitri-Sintsov/django-deno","commit":"11961fa62f4feaa5ec9a7780360955bea03ec8fb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v2.1: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.2.0 not signed: https://api.github.com/repos/Dmitri-Sintsov/django-deno/releases/189257544","Warn: release artifact v0.2.0 does not have provenance: https://api.github.com/repos/Dmitri-Sintsov/django-deno/releases/189257544"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"47 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2014-5 / GHSA-296w-6qhq-gf92","Warn: Project is vulnerable to: PYSEC-2011-2 / GHSA-3jqw-crqj-w8qw","Warn: Project is vulnerable to: PYSEC-2012-3 / GHSA-59w8-4wm2-4xw8","Warn: Project is vulnerable to: PYSEC-2012-4 / GHSA-5h2q-4hrp-v9rr","Warn: Project is vulnerable to: PYSEC-2014-6 / GHSA-625g-gx8c-xcmg","Warn: Project is vulnerable to: PYSEC-2015-8 / GHSA-6565-fg86-6jcx","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2012-2 / GHSA-78vx-ggch-wghm","Warn: Project is vulnerable to: PYSEC-2015-9 / GHSA-7fq8-4pv5-5w5c","Warn: Project is vulnerable to: PYSEC-2015-4 / GHSA-7qfw-j7hp-v45g","Warn: Project is vulnerable to: PYSEC-2011-9 / GHSA-7wph-fc4w-wqp2","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: PYSEC-2014-2 / GHSA-89hj-xfx5-7q66","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2016-2 / GHSA-c8c8-9472-w52h","Warn: Project is vulnerable to: PYSEC-2016-3 / GHSA-crhm-qpjc-cm64","Warn: Project is vulnerable to: PYSEC-2014-4 / GHSA-f7cm-ccfp-3q4r","Warn: Project is vulnerable to: PYSEC-2016-16 / GHSA-fp6p-5xvw-m74f","Warn: Project is vulnerable to: PYSEC-2011-8 / GHSA-fwr5-q9rx-294f","Warn: Project is vulnerable to: PYSEC-2015-5 / GHSA-gv98-g628-m9x5","Warn: Project is vulnerable to: PYSEC-2015-20 / GHSA-h582-2pch-3xv3","Warn: Project is vulnerable to: PYSEC-2011-5 / GHSA-h95j-h2rv-qrg4","Warn: Project is vulnerable to: GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2015-6 / GHSA-jhjg-w2cp-5j44","Warn: Project is vulnerable to: PYSEC-2016-15 / GHSA-pw27-w7w4-9qc7","Warn: Project is vulnerable to: PYSEC-2015-10 / GHSA-q5qw-4364-5hhm","Warn: Project is vulnerable to: PYSEC-2011-4 / GHSA-rm2j-x595-q9cj","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2014-1 / GHSA-rvq6-mrpv-m6rm","Warn: Project is vulnerable to: PYSEC-2014-7 / GHSA-rw75-m7gp-92m3","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2014-3 / GHSA-wqjj-hx84-v449","Warn: Project is vulnerable to: PYSEC-2011-3 / GHSA-wxg3-mfph-qg9w","Warn: Project is vulnerable to: PYSEC-2011-1 / GHSA-x88j-93vc-wpmp","Warn: Project is vulnerable to: PYSEC-2007-1","Warn: Project is vulnerable to: PYSEC-2008-1","Warn: Project is vulnerable to: PYSEC-2008-2","Warn: Project is vulnerable to: PYSEC-2009-3","Warn: Project is vulnerable to: PYSEC-2015-11","Warn: Project is vulnerable to: PYSEC-2015-7","Warn: Project is vulnerable to: PYSEC-2016-18","Warn: Project is vulnerable to: PYSEC-2019-41 / GHSA-qfc5-mcwq-26q8","Warn: Project is vulnerable to: PYSEC-2014-14 / GHSA-652x-xj99-gmcc","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2014-13 / GHSA-cfj3-7x9c-4p3h","Warn: Project is vulnerable to: PYSEC-2018-28 / GHSA-x84v-xcm2-53pg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-14T21:36:38.499Z","repository_id":57419738,"created_at":"2025-08-14T21:36:38.499Z","updated_at":"2025-08-14T21:36:38.499Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001949,"owners_count":26083226,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","django","rollup","swc","typescript"],"created_at":"2024-10-11T06:47:15.795Z","updated_at":"2025-10-09T18:06:30.034Z","avatar_url":"https://github.com/Dmitri-Sintsov.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"===========\ndjango-deno\n===========\n\n.. _collectstatic: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/#django-admin-collectstatic\n.. _Deno: https://deno.land\n.. _deno lock.json: https://deno.land/manual/linking_to_external_code/integrity_checking\n.. _deno import_map.json: https://deno.land/manual/linking_to_external_code/import_maps\n.. _DENO_OUTPUT_MODULE_TYPE: https://github.com/Dmitri-Sintsov/django-deno/search?l=Python\u0026q=DENO_OUTPUT_MODULE_TYPE\u0026type=code\n.. _DENO_ROLLUP_BUNDLES: https://github.com/Dmitri-Sintsov/django-deno/search?q=DENO_ROLLUP_BUNDLES\u0026type=code\n.. _DENO_ROLLUP_ENTRY_POINTS: https://github.com/Dmitri-Sintsov/django-deno/search?q=DENO_ROLLUP_ENTRY_POINTS\u0026type=code\n.. _DENO_ROLLUP_INSTALL_OPTIONS: https://github.com/Dmitri-Sintsov/django-deno/search?q=DENO_ROLLUP_INSTALL_OPTIONS\u0026type=code\n.. _DENO_ROLLUP_COLLECT_OPTIONS: https://github.com/Dmitri-Sintsov/django-deno/search?q=DENO_ROLLUP_COLLECT_OPTIONS\u0026type=code\n.. _DENO_ROLLUP_COMPILE_OPTIONS: https://github.com/Dmitri-Sintsov/django-deno/search?q=DENO_ROLLUP_COMPILE_OPTIONS\u0026type=code\n.. _DENO_ROLLUP_SERVE_OPTIONS: https://github.com/Dmitri-Sintsov/django-deno/search?q=DENO_ROLLUP_SERVE_OPTIONS\u0026type=code\n.. _deno compile: https://docs.deno.com/runtime/reference/cli/compiler/\n.. _deno install: https://docs.deno.com/runtime/reference/cli/install/\n.. _Django: https://www.djangoproject.com\n.. _DJANGO_DEBUG: https://github.com/Dmitri-Sintsov/djk-sample/search?q=DJANGO_DEBUG\u0026type=code\n.. _django_deno settings: https://github.com/Dmitri-Sintsov/django-deno/blob/main/django_deno/conf/settings.py\n.. _django_deno.lzma: https://github.com/Dmitri-Sintsov/django-deno/blob/main/django_deno/deno/django_deno.Linux.x86_64.lzma\n.. _Django management commands: https://docs.djangoproject.com/en/dev/ref/django-admin/\n.. _Django packages static files: https://docs.djangoproject.com/en/dev/howto/static-files/\n.. _djk-sample: https://github.com/Dmitri-Sintsov/djk-sample\n.. _djk-sample settings: https://github.com/Dmitri-Sintsov/djk-sample/blob/master/djk_sample/settings.py\n.. _drf-gallery: https://github.com/Dmitri-Sintsov/drf-gallery\n.. _drollup: https://deno.land/x/drollup\n.. _es6 modules: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules\n.. _getStaticFilesResolver: https://github.com/Dmitri-Sintsov/django-deno/search?l=TypeScript\u0026q=getStaticFilesResolver\u0026type=code\n.. _globstar: https://www.linuxjournal.com/content/globstar-new-bash-globbing-option\n.. _isVirtualEntry: https://github.com/Dmitri-Sintsov/django-deno/search?l=TypeScript\u0026q=isVirtualEntry\u0026type=code\n.. _node binary module: https://www.npmjs.com/package/@swc/core-linux-x64-gnu\n.. _setVirtualEntryPoint: https://github.com/Dmitri-Sintsov/django-deno/search?l=TypeScript\u0026q=setVirtualEntryPoint\u0026type=code\n.. _rollup.js: https://rollupjs.org/\n.. _runserver: https://docs.djangoproject.com/en/dev/ref/django-admin/#runserver\n.. _server.ts: https://github.com/Dmitri-Sintsov/django-deno/blob/main/django_deno/deno/server.ts\n.. _synthetic named exports: https://rollupjs.org/plugin-development/#synthetic-named-exports\n.. _SystemJS: https://github.com/systemjs/systemjs\n.. _sucrase: https://github.com/alangpierce/sucrase\n.. _swc: https://swc.rs/\n.. _terser: https://terser.org\n.. _TypeScript: https://www.typescriptlang.org/\n\n`Deno`_ front-end integration for `Django`_, version 0.2.0.\n\n* `rollup.js`_ - bundling for `Django packages static files`_ with importmap resolver.\n* `sucrase`_ / `swc`_ - optional `TypeScript`_ support.\n* `terser`/ `swc`_ - optional compression of bundles.\n* The deno server may be extended to support any of deno api, when applicable.\n* Uses parts of `drollup`_ code, refactored for Deno v2.\n\nRequirements\n------------\n\n* `Deno`_ 2.1.1 or newer.\n* `Django`_ 4.2 / Django 5.1 was tested with continuous integration demo app `djk-sample`_.\n\nInstallation\n------------\n\nIn Ubuntu Linux::\n\n    curl -fsSL https://deno.land/install.sh | sh\n    export DENO_INSTALL=$HOME/.deno\n\nIn Windows run PowerShell then invoke::\n\n    irm https://deno.land/install.ps1 | iex\n    set DENO_INSTALL=%userprofile%\\.deno\n\n``DENO_INSTALL`` environment variable specifies directory where `Deno`_ is installed.\n\n* In case currently installed `Deno`_ version is older than 2.1.1, please use ``deno upgrade`` command to install the\n  newer `Deno`_ version. Deno 1.x is supported only with ``django-deno`` versions lower than 0.2.0.\n\n* This package was tested with Deno version 2.1.1::\n  \n    deno upgrade --version 2.1.1\n\nThe package was not tested with newer versions of Deno, thus may fail.\n\nTo have stable running environment there is precompiled binary for Linux available. See `deno_compile`_ management\ncommand for more info.\n\nTo install the development version of ``django_deno`` in python3 ``virtualenv``::\n\n    pip install -U git+https://github.com/Dmitri-Sintsov/django-deno.git\n\nTo install the stable version of ``django_deno`` in python3 ``virtualenv``::\n\n    pip install -U git+https://github.com/Dmitri-Sintsov/django-deno.git@v0.2.0\n\nDescription\n-----------\n\n``django_deno`` installs Deno web service which is used to communicate with `Django`_ projects.\n\nCurrently the web service `server.ts`_ supports Deno version of `rollup.js`_ bundler to automatically generate\n`es6 modules`_ bundles for `Django`_ projects, including scripts from `Django packages static files`_.\n\nIt's possible to generate `es6 modules`_ bundles and / or `systemjs`_ bundles with optional minification via\n`terser`_.\n\nTranspiling of `TypeScript`_ is supported with `sucrase`_ or with `swc`_.\n\n* `swc`_ is faster and is updated more frequently, but it uses `node binary module`_, which are not supported by\n  `deno compile`_\n* `sucrase`_ is used by default and is always used with bundled vendored ``django_deno`` binary (see `deno_compile`_\n  management command for more info)\n\nTo use `swc`_, one need to set first::\n\n    DENO_USE_COMPILED_BINARY = False\n\nwhich should turn on `swc`_ usage.\n\nSee `deno_compile`_ management command for more info.\n\nWhen transpiling is not enabled, it's expected that the developing code has es6 imports / exports while the rest of code\nis written with es5 syntax.\n\nAt `Django`_ side ``django_deno`` provides the following `Django management commands`_:\n\ncollectrollup\n~~~~~~~~~~~~~\n\n* ``collectrollup`` - similar to Django `collectstatic`_ command, but uses `rollup.js`_ to generate Javascript bundles.\n\nIt's preferable to run the ``collectrollup`` command this way from the `Django`_ project ``virtualenv``::\n\n    python3 manage.py collectrollup --clear --noinput\n\n``--clear`` option is suggested because the target output may vary depending on the source scripts.\n\nThere is `djk-sample`_ script for running ``collectrollup`` in Linux::\n\n    #!/bin/sh\n    DJANGO_DEBUG='False' python3 $VIRTUAL_ENV/djk-sample/manage.py collectrollup --noinput --clear\n\n* https://github.com/Dmitri-Sintsov/djk-sample/blob/master/cli/collectrollup.sh\n\nin Windows::\n\n    if not defined DENO_INSTALL (\n        set DENO_INSTALL=%USERPROFILE%\\.deno\n    )\n    set \"DJANGO_DEBUG=False\" \u0026 python %VIRTUAL_ENV%/djk-sample/manage.py collectrollup --noinput --clear\n\n* https://github.com/Dmitri-Sintsov/djk-sample/blob/master/cli/collectrollup.cmd\n\nThe script also sets the environment variable `DJANGO_DEBUG`_ to ``False`` which is parsed in `djk-sample`_ settings.py::\n\n    DEBUG = os.environ.get('DJANGO_DEBUG', 'true').lower() in TRUE_STR\n\nto set the value of `DENO_OUTPUT_MODULE_TYPE`_ which determines the type of Javascript modules generated, either\n``module`` for modern browsers that support es6 natively, or `SystemJS`_ modules, which are compatible with IE11::\n\n    # Do not forget to re-run collectrollup management command after changing rollup.js bundles module type:\n    DENO_OUTPUT_MODULE_TYPE = 'module' if DEBUG else 'systemjs-module'\n\nThe additional settings for `rollup.js`_ running `collectrollup`_ management command are specified with\n`DENO_ROLLUP_COLLECT_OPTIONS`_ setting, which allows to enable / disable `terser`_ compression and to enable / disable\n`sucrase`_ / `swc`_ transpiling of `TypeScript`_::\n\n    # Run $VIRTUAL_ENV/djk-sample/cherry_django.py to check the validity of collectrollup command output bundle.\n    DENO_ROLLUP_COLLECT_OPTIONS = {\n        'swc': False,\n        'sucrase': True,\n        'terser': True,\n    }\n\n``swc`` key also supports options, which can be passed as Python dict, for example to enable faster `swc`_ minifier, use\nthe following setting::\n\n    DENO_ROLLUP_COLLECT_OPTIONS = {\n        'swc': {\n            'minify': True,\n        },\n        'sucrase': False,\n        'terser': False,\n    }\n\nwhile the default is::\n\n    DENO_ROLLUP_COLLECT_OPTIONS = {\n        # 'relativePaths': True,\n        'staticFilesResolver': 'collect',\n        'swc': not DENO_USE_COMPILED_BINARY,\n        'sucrase': DENO_USE_COMPILED_BINARY,\n        # terser compresses better than swc usually:\n        'terser': True,\n        'bundles': getattr(settings, 'DENO_ROLLUP_BUNDLES', {}),\n        'moduleFormat': DENO_OUTPUT_MODULE_FORMATS[DENO_OUTPUT_MODULE_TYPE],\n        'syntheticNamedExports': getattr(settings, 'DENO_SYNTHETIC_NAMED_EXPORTS', {}),\n    }\n\n* ``syntheticNamedExports`` allows to specify the list of `synthetic named exports`_ for `es6 modules`_ manually, e,g::\n\n    DENO_SYNTHETIC_NAMED_EXPORTS = {\n        'document.js': 'ActionTemplateDialog, Actions, Dialog, Grid, GridActions, GridRow, globalIoc, inherit, ui, TabPane',\n    }\n\n* See the complete default settings: `django_deno settings`_\n\nrunrollup\n~~~~~~~~~\n\n* ``runrollup`` - starts the built-in http development server, similar to Django `runserver`_ command, using `rollup.js`_\n  to dynamically generate Javascript bundle in RAM, providing real-time `es6 modules`_ compatibility for older browsers\n  and `TypeScript`_ compatibility for newer browsers.\n\nSet `DENO_ROLLUP_SERVE_OPTIONS`_ for the `rollup.js`_ options of the `runrollup`_ command. The default is::\n\n    DENO_ROLLUP_SERVE_OPTIONS = {\n        'inlineFileMap': True,\n        'relativePaths': True,\n        'swc': not DENO_USE_COMPILED_BINARY,\n        'sucrase': DENO_USE_COMPILED_BINARY,\n        'terser': False,\n        'preserveEntrySignatures': False,\n        'staticFilesResolver': 'serve',\n        'withCache': True,\n    }\n\n* When ``staticFilesResolver`` is set to ``serve``, `getStaticFilesResolver`_ is used to resolve `Django packages static files`_\n  at `Deno`_ side via automatically generated import maps.\n\ndeno_compile\n~~~~~~~~~~~~\n* ``deno_compile`` - compiles built-in `server.ts`_ to ``django_deno`` binary file with `deno compile`_ for the package\n  distribution. This management command allows to have stable production running environment. Since v0.2.0 it's a\n  preferred way to perform vendoring / bundling of the package.\n\n* Binary compression is supported via ``--compress`` option. github hosted compressed `django_deno.lzma`_ Linux binary\n  can be downloaded and extracted automatically, with the following ``settings.py`` value::\n\n    DENO_USE_COMPILED_BINARY = True\n\n* Windows / OSX binaries are not provided by default and can be built separately.\n\n* `DENO_ROLLUP_COMPILE_OPTIONS`_ are used to select either `sucrase`_ or `swc`_ for the compilation, but `swc`_ is not\n  currently supported::\n\n    DENO_ROLLUP_COMPILE_OPTIONS = {\n        'swc': False,\n        'sucrase': True,\n    }\n\nSetting both ``swc`` and ``sucrase`` keys to ``False`` will enable the inclusion of both transpilers, which is not recommended.\nSuch setting is intended for testing purposes  only.\n\n* See https://github.com/denoland/deno/issues/23266 for more info.\n\ndeno_install\n~~~~~~~~~~~~\n\n* ``deno_install`` management command generates updated `deno install`_ bundle for the built-in deno server. This command\n  should be used only for the package updating / redistribution.\n\nUpdating `deno_install`_ should be performed with the following steps:\n\n* Run the project `collectrollup`_ command with the following ``settings.py`` to reload the dependencies::\n\n    DENO_NO_REMOTE = False\n    DENO_RELOAD = True\n    DENO_CHECK_LOCK_FILE = False\n    DENO_USE_COMPILED_BINARY = False\n\n* Run the project `deno_install`_ command to create local `deno install`_::\n\n    python3 manage.py deno_install\n\n* Run the project `collectrollup`_ command with the following ``settings.py``, to use the updated local `deno_install`_::\n\n    DENO_NO_REMOTE = True\n    DENO_RELOAD = False\n    DENO_CHECK_LOCK_FILE = True\n    DENO_USE_COMPILED_BINARY = False\n\n* `DENO_ROLLUP_INSTALL_OPTIONS`_ are used to select either `sucrase`_ or `swc`_ for installation.\n* Since Deno v2, it seems impossible to create the source bundle without remote dependencies, thus setting\n  ``DENO_NO_REMOTE`` to ``True`` may fail.\n* See https://github.com/denoland/deno/issues/26488\n* Because of that, `deno_compile`_ currently is the preferred way to perform vendoring / bundling of the package.\n\nBundles\n-------\nCreation of `rollup.js`_ bundles has two steps, first one is the definition of `Entry points`_, second is the\ndefinition of `Chunks`_. Both are specified in Django project ``settings.py``.\n\nEntry points\n~~~~~~~~~~~~\nAt the first step, one has to specify Javascript entry points with `DENO_ROLLUP_ENTRY_POINTS`_ setting, for example\n`djk-sample settings`_::\n\n    DENO_ROLLUP_ENTRY_POINTS = [\n        'sample/js/app.js',\n        'sample/js/club-grid.js',\n        'sample/js/member-grid.js',\n    ]\n\nThese are the top scripts of es6 module loader hierarchy.\n\nAlternatively, the script may specify ``use rollup`` directive at the first line of Javascript code, which is used for\nDjango packages entry points and is discouraged for project entry points.\n\nChunks\n~~~~~~\n\nTo specify manual bundles / chunks, `DENO_ROLLUP_BUNDLES`_ setting is used. For example `djk-sample settings`_::\n\n    DENO_ROLLUP_BUNDLES = {\n        'djk': {\n            # 'useGlobStar': False,\n            'writeEntryPoint': 'sample/js/app.js',\n            'matches': [\n                'djk/js/**',\n            ],\n            'excludes': [],\n            'virtualEntryPoints': 'matches',\n            'virtualEntryPointsExcludes': 'excludes',\n        },\n    }\n\n* ``djk`` key specifies the chunk name which will result in generation of ``djk.js`` bundle.\n* ``writeEntryPoint`` key specifies main entry point, which is used to generate ``djk.js`` bundle. ``djk.js`` bundle is\n  shared among the some / all of `Entry points`_, reducing code redundancy.\n* ``matches`` key specifies the list of matching dirs which scripts that will be included into ``djk.js`` bundle.\n* ``excludes`` specifies the list of scripts which are excluded from the ``djk.js`` bundle.\n* ``virtualEntryPoints`` specifies either the list of dirs or ``matches`` string value to set `es6 modules`_ virtual\n  entry points. Such modules are bundled as a virtual ones, included into ``djk.js`` bundle only, not being duplicated\n  as separate standalone module files. See `isVirtualEntry`_ / `setVirtualEntryPoint`_ code for more info.\n* ``useGlobStar``, when set to ``False``, disables `globstar`_ ``**`` matching. ``True`` by default.\n\n* To see the actual settings / usage, demo apps `djk-sample`_ and `drf-gallery`_ are available.\n\nIn memoriam\n~~~~~~~~~~~\n\nIn the memory of the best friend, Pegasik tomcat:\n\n.. image:: Pegasik-2023-03-11.jpeg\n\nRest in peace, dear friend! Friendship transcends death. A true friend is never truly gone.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitri-sintsov%2Fdjango-deno","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmitri-sintsov%2Fdjango-deno","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmitri-sintsov%2Fdjango-deno/lists"}