Coder Social home page Coder Social logo

msbuild-tailwindcss's Introduction

LinkedIn Stack Overflow

Metrics

msbuild-tailwindcss's People

Contributors

annabarnes1138 avatar bambutz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

msbuild-tailwindcss's Issues

the result .min.css file is only 4kb in size and does not work

Thank you for providing that package. Not having to use a package.json is a huge benefit.
Unfortunately it does not work in my case because the system builds a styles.min.css file which does not have the needed classes.
is it possible that the tailwind config does not support .cshtml files?

Doesn't work because this plugin requires its own NPM installation within Nuget

The build process fails because the plugin is looking for NPM / Modues in the wrong directory ...

NPM together with Tailwind is installed in relation to the SLN file .. maybe this plugin should look for that ?

Rebuild started...
1>------ Rebuild All started: Project: ParkWebApp.Shared, Configuration: Debug Any CPU ------
1> ParkWebApp.Shared -> C:\develop\Parkerings-MobilWebApp\ParkWebApp.Shared\bin\Debug\ParkWebApp.Shared.dll
2>------ Rebuild All started: Project: ParkWebApp, Configuration: Debug Any CPU ------
3>------ Rebuild All started: Project: ParkWebApp.Api, Configuration: Debug Any CPU ------
2> CompileTailwindCSS: Cleaning
2> CompileTailwindCSS: Cleaning C:\develop\Parkerings-MobilWebApp\packages\BamButz.MSBuild.TailwindCSS.1.3.0\build../pa
2> ckage-lock.json
2> CompileTailwindCSS: Cleaning C:\develop\Parkerings-MobilWebApp\packages\BamButz.MSBuild.TailwindCSS.1.3.0\build../ta
2> ilwind.config.js
2> ParkWebApp -> C:\develop\Parkerings-MobilWebApp\ParkWebApp\bin\ParkWebApp.dll
2> internal/modules/cjs/loader.js:883
2> throw err;
2> ^
2>
2>EXEC : error : Cannot find module 'C:\develop\Parkerings-MobilWebApp\packages\BamButz.MSBuild.TailwindCSS.1.3.0\node_mo
2>dules\npm\bin\npm-cli.js'
2> at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
2> at Function.Module._load (internal/modules/cjs/loader.js:725:27)
2> at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
2> at internal/main/run_main_module.js:17:47 {
2> code: 'MODULE_NOT_FOUND',
2> requireStack: []
2> }
2> internal/modules/cjs/loader.js:883
2> throw err;
2> ^
2>
2>EXEC : error : Cannot find module 'C:\develop\Parkerings-MobilWebApp\packages\BamButz.MSBuild.TailwindCSS.1.3.0\node_mo
2>dules\npm\bin\npm-cli.js'
2> at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
2> at Function.Module._load (internal/modules/cjs/loader.js:725:27)
2> at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
2> at internal/main/run_main_module.js:17:47 {
2> code: 'MODULE_NOT_FOUND',
2> requireStack: []
2> }
2>C:\develop\Parkerings-MobilWebApp\packages\BamButz.MSBuild.TailwindCSS.1.3.0\build\BamButz.MSBuild.TailwindCSS.targets(
2>31,9): error MSB3073: The command ""npm" install" exited with code 1.
3> ParkWebApp.Api -> C:\develop\Parkerings-MobilWebApp\ParkWebApp.Api\bin\ParkWebApp.Api.dll

Support tailwind configurations

I received a request for how to use a custom configuration.

It should be sufficient to create a tailwind.config.js in the project and use it in the PostCSS call if available.

Config not being used on Windows

I have a config.js in the root of the project but it doesn't seem to be apply my config but building the css file works fine.

It works when I build the same project on Linux (Rider and dotnet cli) but doesn't work on Windows (Visual Studio and dotnet cli). My colleague also has the same issue on his machine.

Some home debugging this would be appreciated 😄

no npm-cli.js in relation path

I got the error message when I compiler project

Cannot find module 'D:\Projects\Demo1\packages\BamButz.MSBuild.TailwindCSS.1.3.0\node_modules\npm\bin\npm-cli.js'	
Cowell.eWebNet.Apps.eWebFront	D:\Projects\Demo1\EXEC

Adding double-quotes around the NPM call stops it working

This is really a dup of #11, but I have hit the same problem myself, and I saw someone else did yesterday, and I've worked through what it is.

There are two places in the .targets file which invoke NPM, like this:

Command=""$(NodeCli)" install"

This gives the same result as if one went to the command line and typed

"npm" install

Unfortunately, this command (with the quotes around npm) will not work - npm/node is invoked, but fails to run, with the sort of error messages which people are reporting in #11. I have not bothered to get to the bottom of this - presumably the double quotes cause something to fail in the npm command-line parsing process.

Anyway, for me, just changing the two places in the .targets file to remove the " parts has made things work.

Given that the target already makes the assumption that you can just run node -v to check for the presence of Node somewhere on the path, it's probably safe to assume that you can also run npm install, at least in most normal circumstances.

I will put in a PR if it's helpful, but there probably was a reason why the " got added, so maybe they need to stay in there but be moved somewhere else?

Dev Experience

I get that this would automate the npm part of the build during .NET build process, but how would you deal with incremental builds during development?

Use a specific folder for npm package installation

Currently, the package is installing the NPM packages inside his specific NuGet package folder (E.g. C:\Users\USER\.nuget\packages\BamButz.MSBuild.TailwindCSS\VERSION) this should be changed to a specific folder that will be used by all future versions.

I could imagine that this could be solved via a task in C#, but an implementation directly in the targets would also be sufficient.

Fresh install fails with build error

Hi there,

I installed your package in a fresh .NET 6 razor page app, but when running dotnet run, it fails with the following error:

EXEC : Input error : Must use --dir or --replace with multiple input files [XX.csproj]
/Users/alex/.nuget/packages/bambutz.msbuild.tailwindcss/1.3.1/build/BamButz.MSBuild.TailwindCSS.targets(50,9): error MSB3073: The command "npm run postcss -- "" --config "/Users/alex/.nuget/packages/bambutz.msbuild.tailwindcss/1.3.1/build/../" -o ".min.css"" exited with code 1.

Not sure how I can debug this – perhaps someone could poke me in the right direction?

Thank you!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.