{"id":14973465,"url":"https://github.com/xierenyuan/rollup-plugin-ng-annotate","last_synced_at":"2026-02-28T20:03:36.891Z","repository":{"id":65472267,"uuid":"92407239","full_name":"xierenyuan/rollup-plugin-ng-annotate","owner":"xierenyuan","description":"ng1 自动引入依赖","archived":false,"fork":false,"pushed_at":"2017-05-26T09:47:48.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T15:45:49.813Z","etag":null,"topics":["angular1","ng-annitate","rollup","rollup-plugin","rollup-plugin-ng-annotate"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/xierenyuan.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}},"created_at":"2017-05-25T13:41:35.000Z","updated_at":"2021-03-15T01:43:44.000Z","dependencies_parsed_at":"2023-01-25T01:45:18.962Z","dependency_job_id":null,"html_url":"https://github.com/xierenyuan/rollup-plugin-ng-annotate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xierenyuan/rollup-plugin-ng-annotate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xierenyuan%2Frollup-plugin-ng-annotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xierenyuan%2Frollup-plugin-ng-annotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xierenyuan%2Frollup-plugin-ng-annotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xierenyuan%2Frollup-plugin-ng-annotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xierenyuan","download_url":"https://codeload.github.com/xierenyuan/rollup-plugin-ng-annotate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xierenyuan%2Frollup-plugin-ng-annotate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29951085,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["angular1","ng-annitate","rollup","rollup-plugin","rollup-plugin-ng-annotate"],"created_at":"2024-09-24T13:48:48.473Z","updated_at":"2026-02-28T20:03:36.787Z","avatar_url":"https://github.com/xierenyuan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rollup-pulgin-ng1-annotate\n\n\u003e 解决 angularjs 1 的依赖注入 在 es6 和 普通的代码的可以使用  Add angularjs dependency injection annotations with ng-annotate\n\n## Install\n\n```js\n$ npm i rollup-pulgin-ng1-annotate -D\nof\n$ yarn add rollup-pulgin-ng1-annotate -D\n```\n\n## Usage\n\n\u003e 如果是es6 必须写在babel 插件之后【__If it is es6 must after Babel__】\n\u003e see demo [examples/test.es6.js or examples/test.js]\n\n``` js\nimport babel from 'rollup-plugin-babel'\nimport nodeResolve from 'rollup-plugin-node-resolve'\nimport commonjs from 'rollup-plugin-commonjs'\nimport {resolve} from 'path'\nexport default {\n  format: 'cjs',\n  entry: resolve(__dirname, './test.es6.js'),\n  dest: resolve(__dirname, './dist/index.js'),\n  plugins: [\n    babel({\n       exclude: 'node_modules/**'\n    }),\n    nodeResolve(),\n    commonjs(),\n    ng()\n  ]\n}\n```\n\n### 来自 ng-annotate docs\n\n\u003e ng-annotate supports ES5 as input so run it with the output from Babel, Traceur, TypeScript (tsc) and the likes. Use __\"ngInject\"__ on functions you want annotated. Your transpiler should preserve directive prologues, if not please file a bug on it.\n\n```js\n'use strict'\nimport A from './1.es6.js'\nclass HelloCtrl {\n    constructor($scope, HelloAccount, $rcTableDelegate, $rcModal) {\n      'ngInject';\n      $scope.hello = ''\n      this.b = ''\n    }\n\n    init() {\n    }\n}\n```\n\n## Options\n\nYou can pass any of the [ng-annotate](https://github.com/olov/ng-annotate/blob/master/OPTIONS.md) options as an object:\n\n```js\n  {\n    include: '**/*.js',\n    exclude: '',\n    // see [ng-annotate] options https://github.com/olov/ng-annotate/blob/master/OPTIONS.md\n    ngConfig: {\n      add: true\n    }\n  }\n```\n\n## 最后ng1 已经是过去式了, 如果可以升级 到ng2 或者换到 vue2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxierenyuan%2Frollup-plugin-ng-annotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxierenyuan%2Frollup-plugin-ng-annotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxierenyuan%2Frollup-plugin-ng-annotate/lists"}