{"id":21082266,"url":"https://github.com/olsonpm/ramda-with-rollup-example","last_synced_at":"2025-03-14T04:43:08.526Z","repository":{"id":80606739,"uuid":"91134759","full_name":"olsonpm/ramda-with-rollup-example","owner":"olsonpm","description":null,"archived":false,"fork":false,"pushed_at":"2017-05-13T00:04:08.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T23:45:41.183Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olsonpm.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-05-12T22:43:08.000Z","updated_at":"2017-05-12T23:20:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"8458d877-567b-4c13-8d75-fcf5df6ed116","html_url":"https://github.com/olsonpm/ramda-with-rollup-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Framda-with-rollup-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Framda-with-rollup-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Framda-with-rollup-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olsonpm%2Framda-with-rollup-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olsonpm","download_url":"https://codeload.github.com/olsonpm/ramda-with-rollup-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243526853,"owners_count":20305112,"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":[],"created_at":"2024-11-19T20:13:29.593Z","updated_at":"2025-03-14T04:43:08.516Z","avatar_url":"https://github.com/olsonpm.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"An example repo showing ramda with es modules and pure annotations used with rollup and uglifyjs.\n\n```\n$ git clone https://github.com/olsonpm/ramda-with-rollup-example.git\n...\n$ cd ramda-with-rollup-example\n$ npm install\n$ ./run\n$ less bundle.js\n```\n\nThe above bundles this\n```js\nimport { add } from 'ramda';\n\nconsole.log(add(1, 2));\n```\n\ninto this\n```js\nfunction _isPlaceholder(r) {\n    return null != r \u0026\u0026 \"object\" == typeof r \u0026\u0026 !0 === r[\"@@functional/placeholder\"];\n}\n\nfunction _curry1(r) {\n    return function e(n) {\n        return 0 === arguments.length || _isPlaceholder(n) ? e : r.apply(this, arguments);\n    };\n}\n\nvar add = function(r) {\n    return function e(n, u) {\n        switch (arguments.length) {\n          case 0:\n            return e;\n\n          case 1:\n            return _isPlaceholder(n) ? e : _curry1(function(e) {\n                return r(n, e);\n            });\n\n          default:\n            return _isPlaceholder(n) \u0026\u0026 _isPlaceholder(u) ? e : _isPlaceholder(n) ? _curry1(function(e) {\n                return r(e, u);\n            }) : _isPlaceholder(u) ? _curry1(function(e) {\n                return r(n, e);\n            }) : r(n, u);\n        }\n    };\n}(function(r, e) {\n    return Number(r) + Number(e);\n});\n\nArray, console.log(add(1, 2))\n```\n\n*I still can't figure out how to get rid of global identifiers (see the dangling\n`Array` above), but that's either something supported by uglifyjs that I\ncouldn't figure out, or it's something I expect will be implemented in\nthe future.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Framda-with-rollup-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folsonpm%2Framda-with-rollup-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folsonpm%2Framda-with-rollup-example/lists"}