{"id":19149262,"url":"https://github.com/nervous-systems/serverless-cljs-plugin","last_synced_at":"2025-05-07T04:42:07.289Z","repository":{"id":57356740,"uuid":"80318005","full_name":"nervous-systems/serverless-cljs-plugin","owner":"nervous-systems","description":"Serverless plugin for Clojurescript deployment w/ cljs-lambda","archived":false,"fork":false,"pushed_at":"2019-02-25T21:56:41.000Z","size":37,"stargazers_count":75,"open_issues_count":9,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-07T04:41:59.562Z","etag":null,"topics":["aws","aws-lambda","clojure","clojurescript","serverless","serverless-plugin"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nervous-systems.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":"2017-01-28T23:33:41.000Z","updated_at":"2024-09-13T11:54:56.000Z","dependencies_parsed_at":"2022-09-26T16:31:59.376Z","dependency_job_id":null,"html_url":"https://github.com/nervous-systems/serverless-cljs-plugin","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervous-systems%2Fserverless-cljs-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervous-systems%2Fserverless-cljs-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervous-systems%2Fserverless-cljs-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nervous-systems%2Fserverless-cljs-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nervous-systems","download_url":"https://codeload.github.com/nervous-systems/serverless-cljs-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252816518,"owners_count":21808702,"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","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":["aws","aws-lambda","clojure","clojurescript","serverless","serverless-plugin"],"created_at":"2024-11-09T08:07:25.098Z","updated_at":"2025-05-07T04:42:07.260Z","avatar_url":"https://github.com/nervous-systems.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# serverless-cljs-plugin\n\n[![npm version](https://badge.fury.io/js/serverless-cljs-plugin.svg)](https://badge.fury.io/js/serverless-cljs-plugin)\n\nA [Serverless](https://github.com/serverless/serverless) plugin which\nuses lein/[cljs-lambda](https://github.com/nervous-systems/cljs-lambda) (or,\noptionally [Lumo](https://github.com/anmonteiro/lumo)) to package services\nwritten in [Clojurescript](https://clojurescript.org/).\n\n## Leiningen Template\n\n``` shell\n$ lein new serverless-cljs example\nexample$ lein deps\n```\n\nWill generate an `example` directory containing a minimal `serverless.yml` and\n`project.clj` demonstrating this plugin's functionality.\n\n### [Guide to using the plugin via Lein/JVM compilation.](https://nervous.io/clojurescript/lambda/2017/02/06/serverless-cljs/)\n\n## Usage\n\n```yaml\nfunctions:\n  echo:\n    cljs: example.core/echo\n\nplugins:\n - serverless-cljs-plugin\n```\n\nWith the above `serverless.yml`, `serverless deploy` will create a zip file\ncontaining your functions.  Doing this is similar to setting the Serverless\n`packaging.artifact` option - `cljs-lambda` is responsible for the zip contents,\nand Serverless includes/excludes will be skipped (`cljs-lambda` offers\nequivalent functionality).\n\nIn the example above, there needn't be a corresponding entry for `echo` in\n`project.clj`.\n\n## Lumo\n\nAlternatively you can use the [Lumo](https://github.com/anmonteiro/lumo)\n[compiler](https://anmonteiro.com/2017/02/compiling-clojurescript-projects-without-the-jvm/).\n\nIn order to enable it, pass the `--lumo` switch to either `deploy` or `package`:\n\n```shell\n$ serverless deploy --lumo\n```\n\nOr add the following to your `serverless.yml`:\n\n```yaml\ncustom:\n  cljsCompiler: lumo\n```\n\n -  _Compiler options_\n\n    The source paths and compiler options will be read from the optional file\n    `serverless-lumo.edn`.  Below are the defaults:\n\n    ```clojure\n    {:source-paths [\"src\"]\n     :compiler     {:output-to     \"out/lambda.js\"\n                    :output-dir    \"out\"\n                    :source-map    false ;; because of a bug in lumo \u003c= 1.8.0\n                    :target        :nodejs\n                    :optimizations :none}}\n    ```\n\n -  _Lumo Configuration_\n\n    As an alternative to `cljsCompiler: lumo`, `cljsCompiler.lumo` may be specified\n    as a map of options.  These options are passed directly to the `lumo` process.\n    Currently supported:\n\n    ```yaml\n    custom:\n      cljsCompiler:\n        lumo:\n          dependencies:\n            - andare:0.7.0\n          classpath:\n            - /tmp/\n          localRepo: /xyz\n          cache: /cache | none\n          index: true | false\n          exitOnWarning: true | false\n    ```\n\n    _Note_: caching is always on unless you specify \"none\" in the config.\n\n -  _The index.js file_\n\n    The `index` option will materialize a custom `index.js` in `:output-dir`'s parent folder. This\n    file should be thought as managed by `serverless-cljs-plugin` and it is necessary for some plugin (e.g.: [`serverless-offline`](https://github.com/dherault/serverless-offline)) to work properly.\n\n    _Note_: with the default compiler options, `index.js` will be saved in the project root, overwriting without warning.\n\n -  _Exit on compilation warnings_\n\n    Lumo generates warnings such as `WARNING: Use of undeclared Var` to signal\n    failures. You can tune the ones you want to see by using the\n    [`:warnings` compiler option](https://clojurescript.org/reference/compiler-options#warnings)\n    in `serverless-lumo.edn`, but by default the `lumo` process emits the warnings,\n    does not throw and returns `0`. This means that `serverless` will keep going in\n    presence of warnings.\n\n## License\n\nserverless-cljs-plugin is free and unencumbered public domain software. For more\ninformation, see http://unlicense.org/ or the accompanying LICENSE\nfile.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervous-systems%2Fserverless-cljs-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnervous-systems%2Fserverless-cljs-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnervous-systems%2Fserverless-cljs-plugin/lists"}