{"id":20060668,"url":"https://github.com/ficusjs/ficusjs-core","last_synced_at":"2025-05-05T15:33:21.954Z","repository":{"id":103429135,"uuid":"366608105","full_name":"ficusjs/ficusjs-core","owner":"ficusjs","description":"Core patterns and functions for FicusJS","archived":false,"fork":false,"pushed_at":"2024-10-10T21:10:18.000Z","size":638,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-10-11T21:58:23.079Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ficusjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"ficusjs"}},"created_at":"2021-05-12T05:57:44.000Z","updated_at":"2024-10-10T21:08:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"97291db1-04ff-4342-97ca-79219cb91098","html_url":"https://github.com/ficusjs/ficusjs-core","commit_stats":{"total_commits":35,"total_committers":4,"mean_commits":8.75,"dds":"0.11428571428571432","last_synced_commit":"5cedf59e96609ebd8cecaf9b9f9b4f437da07570"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficusjs%2Fficusjs-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficusjs%2Fficusjs-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficusjs%2Fficusjs-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ficusjs%2Fficusjs-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ficusjs","download_url":"https://codeload.github.com/ficusjs/ficusjs-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224188059,"owners_count":17270366,"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-13T13:16:14.892Z","updated_at":"2024-11-13T13:16:15.778Z","avatar_url":"https://github.com/ficusjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ficusjs"],"categories":[],"sub_categories":[],"readme":"# FicusJS core\n\nFicusJS core provides functions for creating fast, lightweight web components\nand modules for packaging sets of components.\n\nComponents created with FicusJS are native custom elements\ncreated in a functional and declarative way.\n\nA set of components can be shared as a module using a package manager or publishing it to a URL.\nBy packaging your components into a module, it can be imported into other applications and re-used multiple times.\n\nFor documentation visit [https://docs.ficusjs.org/](https://docs.ficusjs.org/)\n\n## Getting started\n\nThe `createCustomElement` function defines a new component with the provided tag plus declarative object and registers it in the browser as a [custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements).\n\n```js\n// import the createCustomElement function\nimport { createCustomElement } from 'https://cdn.skypack.dev/@ficusjs/core'\n\n// import the renderer and html tagged template literal from the htm renderer\nimport { html, renderer } from 'https://cdn.skypack.dev/@ficusjs/renderers@5/htm'\n\ncreateCustomElement('my-component', {\n  renderer,\n  props: {\n    personName: {\n      type: String,\n      required: true\n    }\n  },\n  render () {\n    return html`\n      \u003cp\u003e\n        Hi, there! My name is ${this.props.personName}\n      \u003c/p\u003e\n    `\n  }\n})\n```\n\nThe `use` function will import a module of components into your application ready to use.\n\n```js\n// import the use function\nimport { use } from 'https://cdn.skypack.dev/@ficusjs/core'\n\n// import the renderer and html tagged template literal from the uhtml renderer\nimport { html, renderer } from 'https://cdn.skypack.dev/@ficusjs/renderers@5/uhtml'\n\n// import component module from a local path\nimport { module } from './path/to/component-module.esm.js'\n\n// import the components into your application, passing the renderer and html tagged template literal to the module\nuse(module, { renderer, html })\n```\n\nSee the [documentation](https://docs.ficusjs.org/modules/) for more information on creating and consuming modules.\n\n## Installation\n\nFicusJS core is part of [FicusJS](https://docs.ficusjs.org) but can also be installed independently in a number of ways.\n\n### CDN\n\nWe recommend using native ES modules in the browser.\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { createCustomElement, use } from 'https://cdn.skypack.dev/@ficusjs/core'\n\u003c/script\u003e\n```\n\nFicusJS core is available on [Skypack](https://www.skypack.dev/view/@ficusjs/core).\n\n### NPM\n\nFicusJS core work nicely with build tools such as Snowpack, Webpack or Rollup. If you are using a NodeJS tool, you can install the NPM package.\n\n```bash\nnpm install @ficusjs/core\n```\n\n### Available builds\n\nFicusJS core only provides ES module builds. For legacy browsers or alternative modules such as CommonJS, it is recommended to use a build tool to transpile the code.\n\n## Development\n\nHow to set-up FicusJS core for local development.\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/ficusjs/ficusjs-core.git\n```\n\n2. Change the working directory\n\n```bash\ncd ficusjs-core\n```\n\n3. Install dependencies\n\n```bash\nnpm install\n```\n\n4. Run the local development server\n\n```bash\nnpm run dev\n```\n\nThat's it! Now open http://localhost:8080 to see a local app.\n\n## License\n\nThis project is licensed under the MIT License - see the [`LICENSE`](LICENSE) file for details.\n\n## Contributing to FicusJS core\n\nAny kind of positive contribution is welcome! Please help us to grow by contributing to the project.\n\nIf you wish to contribute, you can work on any features you think would enhance the library. After adding your code, please send us a Pull Request.\n\n\u003e Please read [CONTRIBUTING](CONTRIBUTING.md) for details on our [CODE OF CONDUCT](CODE_OF_CONDUCT.md), and the process for submitting pull requests to us.\n\n## Support\n\nWe all need support and motivation. FicusJS is not an exception. Please give this project a ⭐️ to encourage and show that you liked it. Don't forget to leave a star ⭐️ before you move away.\n\nIf you found the library helpful, please consider [sponsoring us](https://github.com/sponsors/ficusjs).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fficusjs%2Fficusjs-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fficusjs%2Fficusjs-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fficusjs%2Fficusjs-core/lists"}