{"id":15063107,"url":"https://github.com/vuestorefront/theme-utilities","last_synced_at":"2025-10-04T22:31:45.696Z","repository":{"id":38825186,"uuid":"311657290","full_name":"vuestorefront/theme-utilities","owner":"vuestorefront","description":"Simple theme inheritance for any JavaScript application","archived":true,"fork":false,"pushed_at":"2024-03-19T09:35:02.000Z","size":117,"stargazers_count":7,"open_issues_count":1,"forks_count":3,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-01-16T13:28:57.531Z","etag":null,"topics":["inheritance","javascript","nuxt","themes","vue-storefront"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/vuestorefront.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":"2020-11-10T12:52:01.000Z","updated_at":"2024-09-27T18:38:13.000Z","dependencies_parsed_at":"2024-06-19T01:30:54.708Z","dependency_job_id":"ff2246d7-547d-4090-8cf6-9a4ce7496ef0","html_url":"https://github.com/vuestorefront/theme-utilities","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuestorefront%2Ftheme-utilities","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuestorefront%2Ftheme-utilities/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuestorefront%2Ftheme-utilities/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vuestorefront%2Ftheme-utilities/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vuestorefront","download_url":"https://codeload.github.com/vuestorefront/theme-utilities/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235321047,"owners_count":18971234,"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":["inheritance","javascript","nuxt","themes","vue-storefront"],"created_at":"2024-09-24T23:51:38.247Z","updated_at":"2025-10-04T22:31:40.371Z","avatar_url":"https://github.com/vuestorefront.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://res.cloudinary.com/vue-storefront/image/upload/v1710754524/Logo_green_2x_z4vmhz.png\" alt=\"Alokai\" height=\"80px\" /\u003e\n\u003c/div\u003e\n\n  ---------\n\n### Stay connected\n\n[![GitHub Repo stars](https://img.shields.io/github/stars/vuestorefront/vue-storefront?style=social)](https://github.com/vuestorefront/vue-storefront)\n[![Twitter Follow](https://img.shields.io/twitter/follow/vuestorefront?style=social)](https://twitter.com/vuestorefront)\n[![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UCkm1F3Cglty3CE1QwKQUhhg?style=social)](https://www.youtube.com/c/VueStorefront)\n[![Discord](https://img.shields.io/discord/770285988244750366?label=join%20discord\u0026logo=Discord\u0026logoColor=white)](https://discord.vuestorefront.io)\n\n# Theme Utilities for Alokai (and not only)\n\n\u003e **Disclaimer:** This project is still in beta phase.\n\n## How it works\n\nThis package creates a `vsf-tu` script allowing to extend multiple [Alokai](https://github.com/vuestorefront/vue-storefront) themes by letting them inherit from each other.\n\nYou can use it with any JavaScript application though. it does not require Vue or Nuxt to run.\n\nScript reads files from multiple sources and copies them to destination directory. If files with the same path (relative to each source) exist in multiple sources, priority will be given to source defined later in the configuration.\n\nFiles with `.vue`, `.ts`, `.js`, `.json`, and `.yml` extensions are additionally parsed using `ejs` library, allowing them to contain build-time variables like `\u003c%= some.source.variable %\u003e`. If you want to parse all extensions, add `parseAllExtensions: true` to the configuration.\n\n## Install\n\n```bash\nyarn global add @vue-storefront/theme-utilities\n```\n\n## Usage\n\nCreate a `theme-utils.config.js` file in the root of the project.\n\n```javascript\n// theme-utils.config.js\nmodule.exports = {\n  copy: {\n    parseAllExtensions: false,\n    to: '',\n    from: [\n      {\n        path: '',\n        ignore: [],\n        ignoreParse: [],\n        variables: {},\n        watch: true\n      }\n    ]\n  }\n};\n```\n\nRun the script:\n\n```bash\nvsf-tu\n```\n\nAlternatively you can use `--config path/to/config/file` flag to provide custom configuration path.\n\n## Configuration\n\n### Options\n\n- `parseAllExtensions` Whether all extensions should be compiled or only `.vue`, `.ts`, `.js`, `.json`, and `.yml`.\n- `to` Path to output directory. Can be relative or absolute.\n- `from` Array of source directories:\n  - `path` Path to source directory. Can be relative or absolute.\n  - `ignore` Array of ignored files/paths. Paths are [glob](https://github.com/isaacs/node-glob)-compatible. Contents of `.nuxt` and `node_modules` are ignored by default.\n  - `ignoreParse` Array of files that shouldn't be parsed by `ejs`. It overrides `parseAllExtensions` and file extensions parsed by default.\n  - `variables` Template variables resolved at build-time.\n  - `watch` Whether directory should be watched for changes.\n\n### Example\n\n```javascript\n// theme-utils.config.js\nmodule.exports = {\n  copy: {\n    to: '_theme',\n    from: [\n      {\n        path: '@vue-storefront/nuxt-theme/theme',\n        ignore: [],\n        variables: {\n          options: {\n            generate: {\n              replace: {\n                apiClient: '@vue-storefront/commercetools-api',\n                composables: '@vue-storefront/commercetools'\n              }\n            }\n          }\n        },\n        watch: true\n      },\n      {\n        path: '/home/Projects/VueStorefront/packages/commercetools/theme',\n        ignore: [\n          '*', // Ignore all files directly in the root of the directory, like package.json, tsconfig.json etc.\n        ],\n        variables: {},\n        watch: true\n      }\n    ]\n  }\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuestorefront%2Ftheme-utilities","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvuestorefront%2Ftheme-utilities","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvuestorefront%2Ftheme-utilities/lists"}