{"id":19908833,"url":"https://github.com/vseventer/parcel-namer-custom","last_synced_at":"2025-05-03T02:31:26.426Z","repository":{"id":39889165,"uuid":"314960402","full_name":"vseventer/parcel-namer-custom","owner":"vseventer","description":"Parcel namer plugin to rename bundles by interpolating a filename template.","archived":false,"fork":false,"pushed_at":"2022-05-23T09:30:44.000Z","size":152,"stargazers_count":10,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-07T10:35:40.386Z","etag":null,"topics":["interpolate","parcel","parcel-namer","parcel-plugin"],"latest_commit_sha":null,"homepage":"","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/vseventer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-22T04:39:29.000Z","updated_at":"2024-05-17T16:51:17.000Z","dependencies_parsed_at":"2022-09-12T00:10:34.592Z","dependency_job_id":null,"html_url":"https://github.com/vseventer/parcel-namer-custom","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vseventer%2Fparcel-namer-custom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vseventer%2Fparcel-namer-custom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vseventer%2Fparcel-namer-custom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vseventer%2Fparcel-namer-custom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vseventer","download_url":"https://codeload.github.com/vseventer/parcel-namer-custom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252133709,"owners_count":21699585,"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":["interpolate","parcel","parcel-namer","parcel-plugin"],"created_at":"2024-11-12T21:13:36.919Z","updated_at":"2025-05-03T02:31:26.178Z","avatar_url":"https://github.com/vseventer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parcel-namer-custom\n\u003e Parcel namer plugin to rename bundles by interpolating a filename template.\n\n## Installation\n1. `$ npm install parcel-namer-custom --save-dev`\n2. Update your `.parcelrc` with the entry below.\n   ```\n   \"namers\": [\"parcel-namer-custom\", \"...\"],\n   ```\n\n*Important:* the three dots indicate to Parcel to run their default namer on any bundles that haven't been named yet.\n\n## Configuration\nPlugin configuration lives in your `package.json`, as `parcel-namer-custom` object prop:\n- Keys should be Regular Expressions matching against a bundles' filepath.\n- Values should be filename templates.\n\n## Filename templates\nThis plugin takes an approach similar to Webpacks' [interpolateName](https://github.com/webpack/loader-utils#interpolatename).\n\nThe following tokens are replaced in the filename template:\n- `[path]` the path of the bundle relative to the project root,\n- `[folder]` the folder the bundle is in,\n- `[base]` the filename (including extension) of the bundle,\n- `[ext]` the input extension of the bundle,\n- `[name]` the basename of the bundle,\n- `[type]` the output type of the bundle,\n- `[hash]` the hash of the bundle,\n- `[N]` the N-th match obtained from matching the current filename against the Regular Expression.\n\n### Examples\n```\n// package.json\n\"parcel-namer-custom\": {\n  \"admin.js$\": \"[folder]/[name].[ext]\",\n  \".scss$\": \"[folder]/[name].[hash].[type]\",\n  \".jsx?$\": \"scripts/[name].[hash].[type]\"\n}\n\n// src/admin/console.js -\u003e admin/console.js\n// src/styles/main.scss -\u003e styles/main.1722cc.css\n// src/modules/main.jsx -\u003e scripts/main.9488dd.js\n```\n\n## Debugging\nRun Parcel with `--log-level info` to see what bundles are renamed.\n\n## Changelog\nSee the [Changelog](./CHANGELOG.md) for a list of changes.\n\n## License\n    The MIT License (MIT)\n\n    Copyright (c) 2020 Mark van Seventer\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy of\n    this software and associated documentation files (the \"Software\"), to deal in\n    the Software without restriction, including without limitation the rights to\n    use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n    the Software, and to permit persons to whom the Software is furnished to do so,\n    subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n    FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n    COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n    IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n    CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvseventer%2Fparcel-namer-custom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvseventer%2Fparcel-namer-custom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvseventer%2Fparcel-namer-custom/lists"}