Use submodule for Codesign, don't include the sources.
Currently, a copy of the Codesign implementation sits in src/WebUI/wwwroot/lib/co-design. This should be a submodule, or maybe a ~~subtree~~ worktree?
I'm on it.
Yes!
Not sure, whether and how it can be done, but ideally you would always link/include the latest version.
Latest tagged version or master?
(how bleeding edge is master?) @luap42
What I was thinking about was to setup a submodule somewhere, e.g. Dependencies/co-design and then have msbuild copy the files into wwwroot/lib/co-design before starting the application. I did something similar in this project.
The question is whether the dist folder is kept up-to-date or if the build script would have to run the SCSS compiler first. In that case #31 would be blocking this, because otherwise the install instructions and the project would get out of sync. (People would have to install a SCSS compiler.)
@ranolfi master is equivalent to the most up-to-date released version and equivalent to the live website. Differences would only be if the app compiles at the exact moment between merging into master and tagging. Develop contains not-yet-live stuff.
I have this mostly completed in asynts/codidact-core:asynts/45/use-submodule-for-codesign, just need to test this (can't do this now). I'll create a pull request later.
BTW Co-Design is now available on npm, which might simplify this a bit:
(Source code) https://unpkg.com/@codidact/[email protected]/dist/codidact.css
(Registry) https://www.npmjs.com/package/@codidact/co-design
Core is not using npm for anything else so far, right? Would you be able to make a NuGet package instead? That'd be the canonical way of managing dependencies for .NET projects and solutions.
Core is not using npm for anything else so far, right? Would you be able to make a NuGet package instead? That'd be the canonical way of managing dependencies for .NET projects and solutions.
That would not be the canonical way of managing FRONTEND dependencies. NPM is advisable. Please don't do this.
I don't agree. Why adding yet another package management dependency to the build process... for this?
Bootstrap, jQuery, Modernizr and dozens of other "frontend" packages, including fonts, are available from NuGet and included by default in Microsoft's sample projects.
I don't agree. Why adding yet another package management dependency to the build process... for this?
Bootstrap, jQuery, Modernizr and dozens of other "frontend" packages, including fonts, are available from NuGet and included by default in Microsoft's sample projects.
- The older sample projects use NuGet as the package manager. All the newer ones use npm. They even improved the support for it.
- If you want to include in the future, any extra package like a SCSS compiler or babel - it wont be in NuGet. In fact most of the things are not on NuGet
- Configuring Task runner with NuGet is a bit of trouble. All their current documentation suggests to use npm https://docs.microsoft.com/en-us/aspnet/core/client-side/using-grunt?view=aspnetcore-3.1
Core is not using npm for anything else so far, right? Would you be able to make a NuGet package instead? That'd be the canonical way of managing dependencies for .NET projects and solutions.
@ranolfi I was about to point out the same thing, then I found this:
https://stackoverflow.com/q/57038463/8746648
I couldn't find an official source for this, but it seems like NuGet isn't meant for this.
Interesting, it seems I stand corrected. Thanks, fellows.
May I drop some additional references here for my future self?
- https://stackoverflow.com/questions/49208056/how-to-use-npm-and-install-packages-inside-visual-studio-2017
and...
- https://www.nuget.org/packages/Npm/ =)
https://www.nuget.org/packages/Npm/
@ranolfi It would be really nice if it were possible to install npm with the NuGet package manager, however, that NuGet package you linked was last updated in 2015. It's too good to be true!
I've put forward a request/suggestion for @luap42 to make the necessary adjustments to co-design so that annotated tags can be maintained from there in the form of dist/<version> (1), and pulled here as a subtree (2).
The relevant steps are:
-
(from 'co-design')
git checkout tags/v0.4.0 git subtree split -b dist --prefix=dist git checkout dist git tag -a "dist/v0.4.0" -m "deliverables for v0.4.0 from 149073b7" git push --tags git branch -D dist -
(from 'core')
git subtree add --prefix src/WebUI/wwwroot/deps/co-design [email protected]:codidact/co-design.git dist/v0.4.0 --squash -m "Add 'co-design' dependency as a git subtree (@tags/dist/v0.4.0)"
https://github.com/codidact/authentication/pull/9#discussion_r398059024