{"id":21277995,"url":"https://github.com/b13/grunt-requirejs-hash-filenames","last_synced_at":"2025-03-15T13:25:39.647Z","repository":{"id":57255619,"uuid":"94221092","full_name":"b13/grunt-requirejs-hash-filenames","owner":"b13","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-10T04:17:53.000Z","size":238,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-09T23:38:56.142Z","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/b13.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-13T14:20:16.000Z","updated_at":"2019-07-11T09:16:19.000Z","dependencies_parsed_at":"2022-09-04T23:01:20.951Z","dependency_job_id":null,"html_url":"https://github.com/b13/grunt-requirejs-hash-filenames","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/b13%2Fgrunt-requirejs-hash-filenames","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-hash-filenames/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-hash-filenames/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/b13%2Fgrunt-requirejs-hash-filenames/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/b13","download_url":"https://codeload.github.com/b13/grunt-requirejs-hash-filenames/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243734456,"owners_count":20339292,"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-21T10:08:42.815Z","updated_at":"2025-03-15T13:25:39.625Z","avatar_url":"https://github.com/b13.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-requirejs-hash-filenames\n\n\u003e Add hash to each filename and update RequireJs config to load those 'new' files. This task should be used after r.js optimization / 'production js build' is done.\n\n## Getting Started\nThis plugin requires Grunt `~0.4.5`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-requirejs-hash-filenames --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-requirejs-hash-filenames');\n```\n\n## The \"requirejsHashFiles\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `requirejsHashFiles` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n    requirejsHashFiles: {\n        options: {\n            task: {\n                // append hash to each file\n                // use pathTofile/**/*.js to also parse subfolders\n                files: ['pathTofile/*.js'],\n\n                // exclude files\n                excludeFiles: ['pathToExcludedFile/file']\n\n                // path to main requirejs file (included in html header)\n                requireJsMainConfigFile: 'pathToRequireJsMainConfigFile/common.js',\n\n                // replace path(s) to new main requirejs file\n                replaceRequireJsMainConfigFilePaths: ['replaceRequireJsMainConfigFilePaths/index.html'],\n\n                // if you want to use requirejs namespace, see: http://www.requirejs.org/docs/faq-optimization.html#namespace\n                requirejsNamespace: ''\n            }\n        }\n    }\n});\n```\n\n## Release History\n* Add exclude file option\n* Add support to hash js files in subfolder\n* Big bang\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fgrunt-requirejs-hash-filenames","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fb13%2Fgrunt-requirejs-hash-filenames","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fb13%2Fgrunt-requirejs-hash-filenames/lists"}