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

Templates and Styles not inlined in NPM packages #27

Closed
mbellezi opened this issue Jul 27, 2016 · 4 comments
Closed

Templates and Styles not inlined in NPM packages #27

mbellezi opened this issue Jul 27, 2016 · 4 comments
Milestone

Comments

@mbellezi
Copy link

Greetings,

I'm trying to use the Covalent components within my app using the NPM packages but I'm having a problem. The component's code is already transpiled to Javascript but the styles and templates were not converted to a inline version inside the Javascript file. As a result, when I use the components, the loader does not find the styles and templates.
The Angular Material 2 NPM packages algo have the transpiled versions, but the templates and styles are inlined.
I'm using webpack to bundle and did not found a work around this problem. Do you have any thoughts about how this can be solved, or could you provide the inlined versions in a future release?

Regards

@emoralesb05
Copy link
Contributor

Hey @mbellezi
Right now we arent in-lining the css/html into the js file since we are waiting for typescript 2.0.0 which will allow html/css file imports.. also we are kinda hoping CLI will handle this allowing a more official solution.

We dont want to do a custom solution (search and replace with code) in the building process like angular2-material since it will only be temporary.

But if it takes too long for an official solution to come and people need it, we might have to revisit this.

@mbellezi
Copy link
Author

Ok. Until a solution is not available, I will manually import the platform/core folder from the Covalent github project as it is in Typescript. The NPM can't be used without a preprocessing step.
One other thing I found strange is the use in the styleUrls referencing the css files instead of the scss files. As the CLI docs states you could reference the scss for the sass processor to work. In my case, in webpack, I have to write a preprocessor step to rename the .css includes to .sass in the Covalent folder.

@kyleledbetter
Copy link
Contributor

@mbellezi

found strange is the use in the styleUrls referencing the css

It's the standard I've seen to reference compiled CSS in styleUrls, and we try to follow the official material2 repo as closely as possible like: https://github.com/angular/material2/blob/master/src/components/button/button.ts#L29

on the topic SCSS however, I've opened an issue to ship the SCSS and CSS in case you'd want to pull in the source SCSS files in your app #28

@emoralesb05 emoralesb05 mentioned this issue Sep 14, 2016
3 tasks
@emoralesb05
Copy link
Contributor

html and styles inlined in #78

@emoralesb05 emoralesb05 added this to the Alpha 0.7 milestone Sep 14, 2016
kriswinbush pushed a commit to kriswinbush/covalent that referenced this issue Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants