{"id":19450970,"url":"https://github.com/rixo/gulp-angular-relative-template-url","last_synced_at":"2025-07-02T07:07:04.774Z","repository":{"id":147723886,"uuid":"42301355","full_name":"rixo/gulp-angular-relative-template-url","owner":"rixo","description":"Allows to write angular templateUrl relatives to their source directory in the form `templateUrl: './my-template.html'`","archived":false,"fork":false,"pushed_at":"2015-10-30T16:33:39.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T09:29:20.230Z","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/rixo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-11T10:01:30.000Z","updated_at":"2015-09-11T11:10:45.000Z","dependencies_parsed_at":"2023-04-11T11:57:27.927Z","dependency_job_id":null,"html_url":"https://github.com/rixo/gulp-angular-relative-template-url","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rixo/gulp-angular-relative-template-url","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fgulp-angular-relative-template-url","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fgulp-angular-relative-template-url/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fgulp-angular-relative-template-url/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fgulp-angular-relative-template-url/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rixo","download_url":"https://codeload.github.com/rixo/gulp-angular-relative-template-url/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rixo%2Fgulp-angular-relative-template-url/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263091027,"owners_count":23412344,"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-10T16:39:45.707Z","updated_at":"2025-07-02T07:07:04.753Z","avatar_url":"https://github.com/rixo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-angular-relative-template-url\n\nAllows to write angular templateUrl relative to their source directory in \nthe form `templateUrl: './my-template.html'`.\n\nDevelopment is still in **a very early stage**, it works on the projects where I need it,\nbut nothing has been consolidated yet...\n\n## Usage with generator-gulp-angular\n\nWorks well with [`generator-gulp-angular`](https://github.com/Swiip/generator-gulp-angular),\nif you modify the *scripts* task as such:\n\n    gulp.task('scripts', function () {\n      return gulp.src(path.join(conf.paths.src, '/app/**/*.js'))\n        .pipe($.jshint())\n        .pipe($.jshint.reporter('jshint-stylish'))\n\n        // adds the plugin and a dest for files (this is needed when no\n        // preprocessors like ES6 or coffee are used with the generator)\n        .pipe($.angularRelativeTemplateUrl({\n          prefix: 'app/'\n        }))\n        .pipe(gulp.dest(path.join(conf.paths.tmp, '/serve/app')))\n\n        .pipe(browserSync.reload({ stream: true }))\n        .pipe($.size())\n    });\n    \nWhen not using a preprocessor, we also need to rewrite the `listFile()` function in the\n`karma.conf.js` file in order to use the generated files instead of the original ones:\n    \n    function listFiles() {\n      var wiredepOptions = _.extend({}, conf.wiredep, {\n        dependencies: true,\n        devDependencies: true\n      });\n    \n      return wiredep(wiredepOptions).js\n        .concat([\n          // These lines have been changed for relative-templates, from:\n          //\n          //     path.join(conf.paths.src, '/app/**/*.module.js'),\n          //     path.join(conf.paths.src, '/app/**/*.js'),\n          //     path.join(conf.paths.src, '/**/*.spec.js'),\n          //     path.join(conf.paths.src, '/**/*.mock.js'),\n          //\n          path.join(conf.paths.tmp, '/serve/app/**/*.module.js'),\n          path.join(conf.paths.tmp, '/serve/app/**/*.js'),\n          path.join(conf.paths.tmp, '/**/*.spec.js'),\n          path.join(conf.paths.tmp, '/**/*.mock.js'),\n          // This was already there\n          path.join(conf.paths.src, '/**/*.html')\n        ]);\n    }\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Fgulp-angular-relative-template-url","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frixo%2Fgulp-angular-relative-template-url","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frixo%2Fgulp-angular-relative-template-url/lists"}