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

Sass and TFS #881

Closed
twilly86 opened this issue Apr 9, 2014 · 10 comments
Closed

Sass and TFS #881

twilly86 opened this issue Apr 9, 2014 · 10 comments

Comments

@twilly86
Copy link

twilly86 commented Apr 9, 2014

How does everyone handle SASS and TFS version control? I work on a team of 4 where we are all modifying sass files and checking into TFS. We are getting a huge amount of conflicts on sourcemap files and on compiled css files.

I've tried implementing this solution, but the process still requires a lot of manual intervention which then causes problems.
http://windperson.wordpress.com/2013/12/19/visual-studio-sass-compile-msbuild-task/

I can get the sass build working on the server, however web essentials overrides tfignore settings. I tried to ignore all .css and .css.map files however when Web Essentials saves a new .scss file, it auto creates the .css file and then adds it to source control, overriding the ignore settings in .tfignore. Then I need to manually back out the TFS add.

Ideal solution would be to generate .css and .css.map files locally, add them to the project, do not add them to source control, and then have the build re-generate the .css and .css.map files on the build server. I have this working except for un-doing the add to source control.

Thanks!

@joneff
Copy link

joneff commented Apr 9, 2014

WE has an option to NOT compile sass files: Web Essentials -> Sass -> Compilation -> Compile files on save.

Btw, Stack overflow tends to be way more useful for questions -- http://stackoverflow.com/questions/tagged/web-essentials.

@am11
Copy link
Contributor

am11 commented Apr 15, 2014

@madskristensen, @SLaks, is it possible to avoid adding the .css and .map files to source control?

This feature request is referring to TFS only. It could be extended to other source-controls as well (such as git, cvs etc.).

@madskristensen
Copy link
Owner

yes, if they are not added to the project, then they are not added to source control

@am11
Copy link
Contributor

am11 commented Apr 15, 2014

@twilly86, if you disable compilation (see @joneff answer above), does it still modify the source control?

If no, then this issue is resolved as "answered" and can be closed.

@madskristensen
Copy link
Owner

Closed due to inactivity

@tysonmatanich
Copy link
Contributor

Related to #589

@iambacon
Copy link

@madskristensen

yes, if they are not added to the project, then they are not added to source control

Web Essentials seems to automatically add them to the project regardless. Yes I want them to compile on save locally, but I don't want this to be added to the project or commited to source control (gitignore does not solve this).

SO question

@GaryB432
Copy link

Any further thoughts on this? What is the best practice workflow for TFS and Web Essentials SCSS? I think I want the .css and .map files excluded from my csproj (and therefore from TFS), then my SCSS processed on my TFS build server as part of my build. (How? Install Web Essentials on the TFS build server? Make/find a msbuild target? Use node.js and another pre-processor on the build server? Should I be advocating switching our large asp.net development operation to newer tools like node and gulp? Or can we make TFS work with Web Essentials SCSS?)

@joneff
Copy link

joneff commented Mar 30, 2015

You don't really need WE installed on the build machine, rather you need a Scss compiler. I've found darrenkopp/libsass-net particularly useful.

On excluding files... You could delete all your current css/map files and disable the compilation of Scss in WE to produce both .css and .map files. Also, make sure you enable "view hidden files" (or something similar) in the project explorer, so you can find any stray .css files that might have snuck back into your project.

My personal workflow is to have both Scss and Css files under source control with no compile action both in the project (wilcard ) and WE. I use the console ruby version to compile the files and then checkin the compiled files. That saves me lots of time, as I happen to have a couple of hundred files in the project and I don't want them compiled on build.

@am11
Copy link
Contributor

am11 commented Mar 31, 2015

+1, @darrenkopp's libsass-net uses the latest version of libsass (current stable v3.1.0) as the node-sass. (omitting node-sass' alphas and betas). Also libsass-net is used by Sass Studio and many other downstreams.

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

7 participants