BundleTransformer with LESS - Decent Example Exists anywhere? - less

I really like the idea of this BundleTransformer plugin from NuGet, and I see that they have LESS support. But ...
After weeks of trying, I cannot find any decent example of how to use it. The documentation is unclear, to say the very least. This is the closest I could find, which does not compile or work.
who-could-ask-for-more-with-less-css
Well, the simple answer is that I could ask for more.
Can someone please assist me with the simple task of creating a bundle that has .less files in it, that will run? I am completely lost.

I would suggest reading the wiki page for bundle transformer and also, as the wiki page suggests, make sure you are familiar with ASP.NET bundling and minification.
If you follow the examples of usage you should be up and running.

I know this is an older post but figured I'd chime in. The Bundle Transformer Codeplex discussion board (Feb 2015) mentions that BundleTransformer is no longer considered a modern client-side build tool and they are recommending you go with Gulp or Grunt - which both have support starting in Visual Studio 2013.3 via VSIX extensions and more baked in to VS2014. FYI -This Scott Hanselman post explains how to get up and going with Grunt and Gulp in Visual Studio. I think if you're using BundleTransformer for simple Less compilation it works fine, but doesn't allow you to do things like generate CSS Sourcemaps which make your browser's dev tools aware of the Less source files, which in my humble opinion is critical for using a CSS preprocessor - the ability to see the LESS line numbers of your source files in the styles pane.

Related

requirejs support for remotely loaded dojo with ArcGIS/ESRI

I'm working on a project with ArcGIS/ESRI in WebStorm. According to the documentation, "Dojo is included with the ArcGIS JavaScript API so there is no need to host/reference/install it." This means WebStorm has no idea what require is:
How do I add support without installing Dojo/require?
Was just going to comment, but can't yet?! Anyway, I had to reengineer my web-site dev-ops to account for the ESRI javascript API. I am using 4.6 though...
The API, which includes dojo, may be installed, but it has to be configured into your site. Once you reference dojo/dojo.js, all will be good. But you need the config set-up first.
Start here:
https://blogs.esri.com/esri/arcgis/2015/11/13/using-bower-for-custom-builds-of-arcgis-api-for-javascript/
https://blogs.esri.com/esri/arcgis/2015/11/13/using-bower-for-custom-builds-of-arcgis-api-for-javascript/
There is a link to the API javascript resources. This will really help understand the process!
https://github.com/Esri/jsapi-resources
Also don't miss:
https://dojotoolkit.org/documentation/tutorials/1.10/modules_advanced/
https://dojotoolkit.org/documentation/tutorials/1.10/dojo_config/
http://dojotoolkit.org/documentation/tutorials/1.10/build/
I am just getting this stuff "almost" working. And actually had a build question to post and saw this. Hope it helps. I was using AMD and thought I had to go the requirejs route, but the dojo stuff worked out better for me. Check them both out and see what works for you! Good Luck!

How to start a simple Gradle+JavaFX+OSGi appliaction

I'm trying to build a simple JavaFX application in IntelliJ environment using Gradle and OSGi, but I could't find a simple working example anywhere.
Most of the solutions I've found are not Gradle based or they use some additional tools, or they are outdated and they simply don't run, or they import some magical "hack code" from github etc.
The tools I've found for similar purpose e.g. e(fx)clipse, bndtools are probably not important if I use IntelliJ. Moreover the bndtools tutorial is very wordy and I couldn't find a good starting point or quickstart to try those things out.
I know the basics about Gradle and OSGi and according to information I've found, it does not seem to be an easy task to solve.
Are there any (good) tutorial(s) or quickstart(s) about how to start this kind of project properly? A simple working example would be very useful.
The e(fx)clipse project is a good starting point and provides many useful features for using JavaFX and OSGi.
See http://www.eclipse.org/efxclipse/index.html .
The blog of one of the developers has also many useful tips, https://tomsondev.bestsolution.at/ .

Visual Studio 2017 (ASP.NET Core) and Aurelia (ES6) from scratch manually?

Is there a tutorial somewhere that shows you how to install & build Aurelia MANUALLY in Visual Studio 2017?
Why do this?
Ideally I'd like to use bundleconfig.json for as much as I can and
use gulp for those things I can't do in bundleconfig.json.
I'll learn every aspect of the build/bundle/package process as possible instead of having a tool set that up for me. (Makes things
easier to troubleshoot if I know how it is all setup.)
I won't be dependent on CLIs and packages that are not kept up to date. (Several that I've looked at are based on VS 2017 RCs).
I've tried several CLIs and "skeleton" projects but they all have their issues. Some haven't been updated to use the latest csproj.
Aurelia CLI: Project/Folder structure doesn't mirror any standard way of building SPAs that I've seen. Also doesn't mirror what you get when using Aurelia's own "Skeleton Project."
dotnew new spa templates: Though the most promising it's typescript only and not ES6. (Maybe there is a way to switch it easily?)
Aurelia's Skeleton Projects It adds dependencies that I do not need. It also does not work out of the box.
So here is what I've determined since originally writing this question.
My original thoughts with lessons learned:
Why do this?
Ideally I'd like to use bundleconfig.json for as much as I can and
use gulp for those things I can't do in bundleconfig.json.
Answer: I was only doing this because I was trying to embed Aurelia inside of a web api project in Visual Studio. I recommend you don't do this and instead keep it as a separate project. (Separation of concerns)
I'll learn every aspect of the build/bundle/package process as possible
instead of having a tool set that up for me. (Makes things easier to
troubleshoot if I know how it is all setup.)
Answer: Though building from scratch would help me learn about this more it isn't a major roadblock. I was just inexperienced with more modern UI frameworks and their corresponding build processes. (RTFM)
I won't be dependent on CLIs and packages that are not kept up to date. (Several that I've looked at are based on VS 2017 RCs).
Answer: - That happens no matter what route you go. You can wait for a library to mature more if this is a big concern.
The bottom line is my question was based on some incorrect thinking. If you are trying to go this route you really need to ask yourself why and determine if it is worth it. To me it was not. Just go with what works, learn and move on. Oh and don't resist Typescript!
npm install aurelia-cli#0.30.1 --global
create new vs solution in 2017 (ASP.NET Core Web App)
with command prompt, cd into the solution root dir (not wwwroot)
au new --here
select RequireJS or SystemJS (my personal preference)
select option 2, asp.net core
select the remaining options.
Run f5 in VS2017.

CSS Preprocessor with MAMP & Sublime Text

I have just jumped on the Sublime text wagon and really want to optimise my workflow using LESS. I have looked for a plugin that performs the compiling clientside, in fact I could just add the less.js file to all projects, but I can't find anything to explain how to get it to work.
Also I was thinking that it would be best to install something on the Apache server that comes with MAMP to do it server-side and then I wouldn't have to worry about adding certain files and copy the preprocessed client-side code for the production website.
I use CodeKit (Mac Only), which does what you want SO WELL, plus so much more. I really can't say enough good things about it. I'd recommend checking out the site and the videos to see what it offers.
There is also this ST2 plugin:
https://github.com/BBB/sublime-text-2-plugins
I haven't used it personally because of how well CodeKit works. But it is another option.
Just to clarify, these aren't options that install and run on MAMP, but I think once you check them out you'll see they still provide a solution that doesn't require you to add extra files to your projects.

Harvesting a .csproj with heat.exe in Visual Studio 2008 and WiX(v3)

I found that Wix v3 uses a tool (heat.exe) to "harvest" information into WiX fragments. Either I am looking in the wrong location, or this is thinly documented.
What is the best way to auto-generate a WiX fragment (likely using heat.exe) for a complex folder structure that contains media files:
Of varying types (ico/png/xaml/etc)
That may change regularly (names/locations/adds/removes)
That are classified as "Content" and included in a .csproj
such that they can be built into an installer via WiX and would withstand upgrades and patches with decorum?
Background Information
I found heat.exe, which seems to solve the autogenerate WiX fragment requirement
In getting the "dir" harvester working, I noticed the "project" harvester (commandline help)
Media is already in C# project file, and so noted that "-pog:Content" might do very well
Cursory search found out of date documentation that didn't mention "project" harvester
Realized entire project installer could probably done with "project" harvester, but was unsure how well this was supported, and what the pitfalls were.
Saw the generation of "PUT-GUID-HERE" and realized that autogeneration of guids would likely have upgrade/patch implications.
Realized that there must be people who use these tools for similar purposes and could probably point me in the right direction.
It was (fairly) pointed out that v3 is not yet "done" (thus the scarceness of documentation and tutorials). The sense that I get now is that it is non-trivial to automate this in my build scripts, and the tools are growing right now to ease this.
In my experience John Robbins' Paraffin solves alot of the issues with tallow.exe (heat.exe in v3). I'm not sure if Paraffin plays nicely with v3, but it might be worth checking out.
FYI, I've used Paraffin in a build process and it allowed me to remove the previous 2-3 step cleanup process that involved a powershell script.
For the upgrade implications of auto-generated setups, read this. The take-home message:
Windows Installer doesn’t let you
remove components in a minor upgrade
It is hard to guarantee that components continue to exist if you generate your setup automatically. Therefore you have to chose between auto-generation of components and the ability to do minor upgrades.
If you have some auto-generated components, then just stick to major upgrades. You can use this sample by Rob as an example.
Thanks for the background, I wasn't aware that they were working on a new version of Wix. According to the project page, it isn't RTM yet, so that may explain the problems you're having. I hope to hear from the WIX developers in one of the replies.
I can't help you use the under-development heat.exe features. However, I have been in your situation and my solution was to create a tool that took directory and file information as input and generated valid wix project files as output. A .vsproj file is just an XML file, and you can use XSL, C#'s LINQ, PowerShell, or a number of other tools to do the work. I personally have used (pre-LINQ) C#/XMLDOM to parse VS project files for this purpose.
Good Luck,
Dave
For documentation, check out the help file that is installed with WiX - WiX.chm provides the most up to date information (along with the command line -help option).