{"id":14967814,"url":"https://github.com/fantasywind/generator-angular-jade-stylus","last_synced_at":"2025-10-01T06:31:57.243Z","repository":{"id":15814204,"uuid":"18553834","full_name":"fantasywind/generator-angular-jade-stylus","owner":"fantasywind","description":"Change repo to https://github.com/fantasywind/generator-angular-jscg","archived":false,"fork":true,"pushed_at":"2015-11-01T15:08:04.000Z","size":1380,"stargazers_count":25,"open_issues_count":4,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-16T14:46:18.952Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"yeoman/generator-angular","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fantasywind.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":"contributing.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-08T10:12:28.000Z","updated_at":"2019-05-11T15:58:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fantasywind/generator-angular-jade-stylus","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasywind%2Fgenerator-angular-jade-stylus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasywind%2Fgenerator-angular-jade-stylus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasywind%2Fgenerator-angular-jade-stylus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasywind%2Fgenerator-angular-jade-stylus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fantasywind","download_url":"https://codeload.github.com/fantasywind/generator-angular-jade-stylus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234837049,"owners_count":18894524,"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-09-24T13:38:38.950Z","updated_at":"2025-10-01T06:31:51.891Z","avatar_url":"https://github.com/fantasywind.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AngularJS generator with Jade and Stylus \n\n\u003e Yeoman generator for AngularJS - lets you quickly set up a project with sensible defaults and best practises.\n\n\n## Usage\n\nInstall `generator-angular`:\n```\nnpm install -g generator-angular-jade-stylus\n```\n\nMake a new directory, and `cd` into it:\n```\nmkdir my-new-project \u0026\u0026 cd $_\n```\n\nRun `yo angular`, optionally passing an app name:\n```\nyo angular-jade-stylus --coffee --jade --stylus [app-name]\n```\n\n\u003e You should add --jade and --stylus to enable jade / stylus template\n\nRun `grunt` for building and `grunt serve` for preview\n\n\n## Generators\n\nAvailable generators:\n\n* [angular-jade-stylus](#app) (aka [angular-jade-stylus:app](#app))\n* [angular-jade-stylus:controller](#controller)\n* [angular-jade-stylus:directive](#directive)\n* [angular-jade-stylus:filter](#filter)\n* [angular-jade-stylus:route](#route)\n* [angular-jade-stylus:service](#service)\n* [angular-jade-stylus:provider](#service)\n* [angular-jade-stylus:factory](#service)\n* [angular-jade-stylus:value](#service)\n* [angular-jade-stylus:constant](#service)\n* [angular-jade-stylus:decorator](#decorator)\n* [angular-jade-stylus:view](#view)\n\n**Note: Generators are to be run from the root directory of your app.**\n\n### App\nSets up a new AngularJS app, generating all the boilerplate you need to get started. The app generator also optionally installs Bootstrap and additional AngularJS modules, such as angular-resource (installed by default).\n\nExample:\n```bash\nyo angular-jade-stylus\n```\n\n### Route\nGenerates a controller and view, and configures a route in `app/scripts/app.js` connecting them.\n\nExample:\n```bash\nyo angular-jade-stylus:route myroute\n```\n\nProduces `app/scripts/controllers/myroute.js`:\n```javascript\nangular.module('myMod').controller('MyrouteCtrl', function ($scope) {\n  // ...\n});\n```\n\nProduces `app/views/myroute.html`:\n```html\n\u003cp\u003eThis is the myroute view\u003c/p\u003e\n```\n\n### Controller\nGenerates a controller in `app/scripts/controllers`.\n\nExample:\n```bash\nyo angular-jade-stylus:controller user\n```\n\nProduces `app/scripts/controllers/user.js`:\n```javascript\nangular.module('myMod').controller('UserCtrl', function ($scope) {\n  // ...\n});\n```\n### Directive\nGenerates a directive in `app/scripts/directives`.\n\nExample:\n```bash\nyo angular-jade-stylus:directive myDirective\n```\n\nProduces `app/scripts/directives/myDirective.js`:\n```javascript\nangular.module('myMod').directive('myDirective', function () {\n  return {\n    template: '\u003cdiv\u003e\u003c/div\u003e',\n    restrict: 'E',\n    link: function postLink(scope, element, attrs) {\n      element.text('this is the myDirective directive');\n    }\n  };\n});\n```\n\n### Filter\nGenerates a filter in `app/scripts/filters`.\n\nExample:\n```bash\nyo angular-jade-stylus:filter myFilter\n```\n\nProduces `app/scripts/filters/myFilter.js`:\n```javascript\nangular.module('myMod').filter('myFilter', function () {\n  return function (input) {\n    return 'myFilter filter:' + input;\n  };\n});\n```\n\n### View\nGenerates an HTML view file in `app/views`.\n\nExample:\n```bash\nyo angular-jade-stylus:view user\n```\n\nProduces `app/views/user.html`:\n```html\n\u003cp\u003eThis is the user view\u003c/p\u003e\n```\n\n### Service\nGenerates an AngularJS service.\n\nExample:\n```bash\nyo angular-jade-stylus:service myService\n```\n\nProduces `app/scripts/services/myService.js`:\n```javascript\nangular.module('myMod').service('myService', function () {\n  // ...\n});\n```\n\nYou can also do `yo angular-jade-stylus:factory`, `yo angular-jade-stylus:provider`, `yo angular-jade-stylus:value`, and `yo angular-jade-stylus:constant` for other types of services.\n\n### Decorator\nGenerates an AngularJS service decorator.\n\nExample:\n```bash\nyo angular-jade-stylus:decorator serviceName\n```\n\nProduces `app/scripts/decorators/serviceNameDecorator.js`:\n```javascript\nangular.module('myMod').config(function ($provide) {\n    $provide.decorator('serviceName', function ($delegate) {\n      // ...\n      return $delegate;\n    });\n  });\n```\n\n## Options\nIn general, these options can be applied to any generator, though they only affect generators that produce scripts.\n\n### CoffeeScript\nFor generators that output scripts, the `--coffee` option will output CoffeeScript instead of JavaScript.\n\nFor example:\n```bash\nyo angular-jade-stylus:controller user --coffee\n```\n\nProduces `app/scripts/controller/user.coffee`:\n```coffeescript\nangular.module('myMod')\n  .controller 'UserCtrl', ($scope) -\u003e\n```\n\nA project can mix CoffeScript and JavaScript files.\n\nTo output JavaScript files, even if CoffeeScript files exist (the default is to output CoffeeScript files if the generator finds any in the project), use `--coffee=false`.\n\n### Minification Safe\n\n**Removed**\n\n[Related Issue #452](https://github.com/yeoman/generator-angular/issues/452): This option has been removed from the generator. Initially it was needed as ngMin was not entirely stable. As it has matured, the need to keep separate versions of the script templates has led to extra complexity and maintenance of the generator. By removing these extra burdens, new features and bug fixes should be easier to implement. If you are dependent on this option, please take a look at ngMin and seriously consider implementing it in your own code. It will help reduce the amount of typing you have to do (and look through) as well as make your code cleaner to look at.\n\nBy default, generators produce unannotated code. Without annotations, AngularJS's DI system will break when minified. Typically, these annotations that make minification safe are added automatically at build-time, after application files are concatenated, but before they are minified. The annotations are important because minified code will rename variables, making it impossible for AngularJS to infer module names based solely on function parameters.\n\nThe recommended build process uses `ngmin`, a tool that automatically adds these annotations. However, if you'd rather not use `ngmin`, you have to add these annotations manually yourself. **One thing to note is that `ngmin` does not produce minsafe code for things that are not main level elements like controller, services, providers, etc.:\n\n```javascript\nresolve: {\n  User: function(myService) {\n    return MyService();\n  }\n}\n```\n\nwill need to be manually done like so:\n```javascript\nresolve: {\n  User: ['myService', function(myService) {\n    return MyService();\n  }]\n}\n```\n\n\n### Add to Index\nBy default, new scripts are added to the index.html file. However, this may not always be suitable. Some use cases:\n\n* Manually added to the file\n* Auto-added by a 3rd party plugin\n* Using this generator as a subgenerator\n\nTo skip adding them to the index, pass in the skip-add argument:\n```bash\nyo angular-jade-stylus:service serviceName --skip-add\n```\n\n## Bower Components\n\nThe following packages are always installed by the [app](#app) generator:\n\n* angular\n* angular-mocks\n* angular-scenario\n\n\nThe following additional modules are available as components on bower, and installable via `bower install`:\n\n* angular-cookies\n* angular-loader\n* angular-resource\n* angular-sanitize\n\nAll of these can be updated with `bower update` as new versions of AngularJS are released.\n\n## Configuration\nYeoman generated projects can be further tweaked according to your needs by modifying project files appropriately.\n\n### Output\nYou can change the `app` directory by adding a `appPath` property to `bower.json`. For instance, if you wanted to easily integrate with Express.js, you could add the following:\n\n```json\n{\n  \"name\": \"yo-test\",\n  \"version\": \"0.0.0\",\n  ...\n  \"appPath\": \"public\"\n}\n\n```\nThis will cause Yeoman-generated client-side files to be placed in `public`.\n\n## Testing\n\nRunning `grunt test` will run the unit tests with karma.\n\n## Contribute\n\nSee the [contributing docs](https://github.com/yeoman/yeoman/blob/master/contributing.md)\n\nWhen submitting an issue, please follow the [guidelines](https://github.com/yeoman/yeoman/blob/master/contributing.md#issue-submission). Especially important is to make sure Yeoman is up-to-date, and providing the command or commands that cause the issue.\n\nWhen submitting a PR, make sure that the commit messages match the [AngularJS conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/).\n\nWhen submitting a bugfix, write a test that exposes the bug and fails before applying your fix. Submit the test alongside the fix.\n\nWhen submitting a new feature, add tests that cover the feature.\n\n## License\n\n[BSD license](http://opensource.org/licenses/bsd-license.php)\n\nPatches license on [MIT](http://chaiyu.mit-license.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantasywind%2Fgenerator-angular-jade-stylus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffantasywind%2Fgenerator-angular-jade-stylus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantasywind%2Fgenerator-angular-jade-stylus/lists"}