Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ng generate doesn't create css files when -sw is used to create the project #10722

Closed
judasane opened this issue May 8, 2018 · 3 comments
Closed

Comments

@judasane
Copy link

judasane commented May 8, 2018

Versions


Angular CLI: 6.0.0
Node: 8.10.0
OS: win32 x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/update                0.6.0
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0```

### Repro steps
<!--
Simple steps to reproduce this bug.
Please include: commands run, packages added, related code changes.
A link to a sample repo would help too.
-->
* ng new name-of-project -sw
* cd name-of-project
* ng generate component name-of-component

Observed behavior

CREATE src/app/name-of-component/name-of-component.component.html (36 bytes)
CREATE src/app/name-of-component/name-of-component.component.spec.ts (693 bytes)
CREATE src/app/name-of-component/name-of-component.component.ts (273 bytes)
UPDATE src/app/app.module.ts (518 bytes)

It doesn't create the css file

Desired behavior

CREATE src/app/name-of-component/name-of-component.component.spec.ts (693 bytes)
CREATE src/app/name-of-component/name-of-component.component.ts (311 bytes)
CREATE src/app/name-of-component/name-of-component.component.css (0 bytes)
UPDATE src/app/app.module.ts (518 bytes)

When I use generate component expect to get a whole new component, but this is like if i used a flag for create styles in the .ts file
@clydin
Copy link
Member

clydin commented May 8, 2018

-sw is the equivalent of -s -w. -s is the short option for inline styles. -w is not actually an option and should error but currently does not. The lack of an error for -w is a defect and will be corrected.

@judasane
Copy link
Author

judasane commented May 9, 2018

@clydin , -sw used to be the alias for --service-worker in previous versions. like This page shows (I didn't find official documentation for version 5 because it's not shown anymore in the official page. It jumps from 4 to 6)

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants