{"id":31773719,"url":"https://github.com/distpub/django-babel-transpiling","last_synced_at":"2025-10-10T04:28:13.579Z","repository":{"id":57419055,"uuid":"336199101","full_name":"DistPub/django-babel-transpiling","owner":"DistPub","description":"Bring babel to your django project, transpiling static .jsx files on the fly, without NodeJS require!","archived":false,"fork":false,"pushed_at":"2021-02-25T10:02:52.000Z","size":395,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T17:16:47.133Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DistPub.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2021-02-05T07:39:29.000Z","updated_at":"2022-07-08T07:16:15.000Z","dependencies_parsed_at":"2022-09-13T15:28:49.155Z","dependency_job_id":null,"html_url":"https://github.com/DistPub/django-babel-transpiling","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DistPub/django-babel-transpiling","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-babel-transpiling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-babel-transpiling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-babel-transpiling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-babel-transpiling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DistPub","download_url":"https://codeload.github.com/DistPub/django-babel-transpiling/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DistPub%2Fdjango-babel-transpiling/sbom","scorecard":{"id":41069,"data":{"date":"2025-08-11","repo":{"name":"github.com/DistPub/django-babel-transpiling","commit":"79fb744e48f13f90c9c0ced738c5a55ab16d445b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"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":"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":"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 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":"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":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":"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":"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":"Vulnerabilities","score":0,"reason":"11 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2021-9 / GHSA-fvgf-6h6h-3322","Warn: Project is vulnerable to: PYSEC-2021-99 / GHSA-p99v-5w3c-jqq9","Warn: Project is vulnerable to: PYSEC-2021-8 / GHSA-qm57-vhq3-3fwf","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2021-7 / GHSA-rxjp-mfm9-w4wr","Warn: Project is vulnerable to: PYSEC-2021-439 / GHSA-v6rh-hp5x-86rv","Warn: Project is vulnerable to: PYSEC-2021-6 / GHSA-xgxc-v2qg-chmh","Warn: Project is vulnerable to: PYSEC-2021-109 / GHSA-xpfp-f569-q3p2"],"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:33:30.295Z","repository_id":57419055,"created_at":"2025-08-14T21:33:30.295Z","updated_at":"2025-08-14T21:33:30.295Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002687,"owners_count":26083442,"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-10T02:00:06.843Z","response_time":62,"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":[],"created_at":"2025-10-10T04:28:10.780Z","updated_at":"2025-10-10T04:28:13.572Z","avatar_url":"https://github.com/DistPub.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-babel-transpiling\nBring babel to your django project, transpiling static .jsx files on the fly, without NodeJS require!\n\n# Install\n\n`pip install django-babel-transpiling`\n\n# Static files transpiling config\n\n1. Add `babel_transpiling` to your django `INSTALLED_APPS`\n1. Add `babel_transpiling.middlewares.StaticFilesTranspilingMiddleware` to your django `MIDDLEWARE`\n    \u003enote the order\n    ```\n    [\n    ...\n    'babel_transpiling.middlewares.StaticFilesTranspilingMiddleware',\n    'whitenoise.middleware.WhiteNoiseMiddleware',\n    ... \n    ]\n    ```\n1. Config django `STATICFILES_STORAGE = 'babel_transpiling.storage.StaticFilesTranspilingStorage'`\n\n# Global Options\n\nDefault options is:\n\n```\n{\n    'transpiler': 'npm/@babel/standalone@7.12.15/babel.min.js',\n    'extensions': ['.jsx'],\n    'options': {\n        'plugins': ['transform-import-cssm'],\n        \"presets\": [\"react\"],\n        \"generatorOpts\": {\n            \"jsescOption\": {\n                \"minimal\": True\n            }\n        }\n    },\n    'mimetypes': {\n        '.jsx': 'application/javascript'\n    },\n    'setup': ['npm/babel-plugin-transform-import-cssm@1.0.0/index.standalone.js']\n}\n```\n\nYou can customize by provide `BABEL_TRANSPILING` in your django settings, for example, custom babel preset:\n\n```\nBABEL_TRANSPILING = {\n    'options': {\n        \"filename\": \"index.ts\",\n        \"presets\": [\"typescript\"]\n    }\n}\n```\n\n# Babel API\n\nYou can control more by set `setup` option, for example, write custom plugin and register:\n\n```\n$ cat path/to/setup.js\n\n// Simple plugin that converts every identifier to \"LOL\"\nfunction lolizer() {\n  return {\n    visitor: {\n      Identifier(path) {\n        path.node.name = 'LOL';\n      }\n    }\n  }\n}\nBabel.registerPlugin('lolizer', lolizer);\n``` \n\nThen config options:\n\n```\nBABEL_TRANSPILING = {\n    'options': {\n        'plugins': ['lolizer']\n    },\n    'setup': ['path/to/setup.js']\n}\n```\n\n# Template Support\n\nSometimes transpiling in your template file is more make sense than static file, \nyou can use `transpiling` tag to do that.\n\n```\n{% load babel_transpiling %}\n...\n\u003cscript\u003e\n    {% transpiling %}\n      ReactDOM.render(\u003cApp/\u003e, document.querySelector('#root'))\n    {% endtranspiling %}\n\u003c/script\u003e \n...\n```\n\nTemplate tag also support use custom transpiling option, for example, in context there exists a `ts` option:\n\n```\n{% transpiling options=ts %}\n  const anExampleVariable: string = \"Hello World\"\n  console.log(anExampleVariable)\n{% endtranspiling %}\n```\n    \n# FAQ\n\n1. Static file not get transpiled\n    \u003eif you use django `runserver` command to run server and the setting `DEBUG=True`, please add `--nostatic` option to command\n\n1. I want use other storage\n    \u003eyou should write your own storage to inherit `StaticFilesTranspilingStorage`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistpub%2Fdjango-babel-transpiling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistpub%2Fdjango-babel-transpiling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistpub%2Fdjango-babel-transpiling/lists"}