Octopack 2.0 is breaking our minification process

Hi

Using octopack 2.0 we can’t now include files in the package which aren’t in our project file. These minified css files are created when we build.

What’s the best way to deal with this?

Thanks

Hi Rich,

Thanks for letting me know. I’m trying to think of the best way to handle this.

A solution I’m considering is to allow you to pass a set of additional files that you want to include the package. It would mean modifying your .csproj file to specify something like this:

 <Target Name="AdditionalOctoPackFiles">
     <ItemGroup>
        <OctoPackInclude Include="somepath/*.min.css" />
     </ItemGroup>
 </Target>

OctoPack would take any additional packages defined in that group and would automatically include them in the package (in this case it would grab your minified css files). Would that be a workable solution?

Paul

Paul

That would save some legwork in a very elegant fashion. We would love to see this!

Thanks

Richard

Any motion on this? Seems like it would be a fairly common issue as I’m running into the same thing.

For the moment, can you not use also similar concepts in a custom xxx.nuspec that you pass to OctoPack , i.e.

<files>
    <file src="bin\Release\*.dll" target="bin\" />
    <file src="bin\Release\*.exe" target="bin\" />
    <file src="resources\*" target="resources\" />
    <file src="bin\Release\*.css" target="resources\" />
</files>

You can also include the minified files in to the project, but not have them in source control. (Which forces them to be not readonly). As part of your build (the pre build step), run the minification process (so the files are generated) and then following that, as part of the web publish process they will be included in the build.

We have been successfully using this with YUI and Octopack for a while now, without any issues. (Running on TFS build).