Disable Elixir sourcemaps only for CSS and enabled for JS - laravel-elixir

Is there a way to disable Elixir generate sourcemaps for CSS only and keep it enabled for JS. Currently when I add below code, sourcemaps are not generated for both CSS and JS.
elixir.config.sourcemaps = false;

Related

Rails: How can I convert bootstrap template with rails application?

I downloaded bootstrap theme files, it includes the static HTML, CSS and js files. If I'm using the same bootstrap theme in rails app, how can I integrate those files with rails application
Broadly/simply:
When using the rails 4-5 asset pipeline:
copy the js files to app\assets\javascript and require in application.js
copy the css files to app/assets/stylesheets and require in application.css
The index.html page (or in general, the static html pages) will have to be split-up into
a "layout", e.g. app/view/layouts/application.html.erb (or use your preferred templating framework, I prefer haml/slim) and edit it to keep header/footer elements only (aka the repeating elements for all pages, or a set of pages)
copy the remainder (the contents) to the main index.html.erb of the controller where you want to copy/use the template

Best way to include Bootstrap in a AngularDart app

I’m creating a web app with AngularDart 5 and Dart SDK 2.0.0-dev.65.0. What is the best way to include Bootstrap in my web app?
Thanks!
There really isn't anything that will stop you from using bootstrap and angular together.
You can link the CSS, and the necessary JS files in your index.html file and they won't conflict as far as I know.
Now there is going to be a lot of overlap between dart:html, and jQuery. Also bootstrap is going to be in the global namespace so it may conflict with CSS styles if you are using other libraries.
Just use the html structure and classes as normal in the angular components. You can use them anywhere because they are in the global namespace.
If you need your dart code to interact with the JS code you can use package:js.

StyleTransformer is not run when BundleTable.EnableOptimizations = false;

We're using script and style bundles to minify and bundle our resources. We're also using the StyleTransformer to transpile our .less files to .css.
coreCsss.Transforms.Add(new StyleTransformer());
coreCss.Include("~/Content/Common/Styles/core.less");
We also have a processor directive to only enable optimisations when building a non-debug configuration.
#if DEBUG
BundleTable.EnableOptimizations = false;
#else
BundleTable.EnableOptimizations = true;
#endif
The intention of the above is to allow us to more easily debug unpackaged and unminified javascript during development.
The problem we have noticed is that with EnableOptimizations disabled, then our .less files are not being transpiled and instead the raw .less is being served to the browser. Is there anyway to disable minification and bundling but still enable transformation? I would guess this is a fairly common scenario.
First, the code you have is completely unnecessary. Out of the box, EnableOptimizations is false in development and true in production. The only reason you might need to set it to something is if you actually wanted to enable the bundling in development (where it's disabled by default). That said, bundling is an all or nothing affair, if StyleTransformer depends on the bundling process to function, then if will have to be enabled in development, or you'll get exactly what you have.
Personally, I would recommend using something like the Web Essentials Visual Studio Extension, which among other things, will auto-compile LESS into CSS on save. Then, you can work with the LESS, and simply reference the CSS version. I'm sure there's other extensions with similar functionality. You can also set up build tasks to run gulp and such, but that's a little more complex.

I'm trying to use bower to write static Web-apps, how should I unify all css and javascript?

I'm writing static webpages, using html, css and javascript.
I use angular and write lot's of components. I'm testing bower to keep track of them. It works fine, however, I would like to compress all javascript and css in one file. I would also like to have a non–minified version of the files.
I recommend using Grunt (or Gulp if that appeals more to you) to bundle & minify your scripts & CSS, http://love2dev.com/#!article/Using-GruntJS-to-Bundle-and-Minify-JavaScript-and-CSS
I am ASP.NET developer so it is pretty easy to load either the individual files for development or the minified versions in production. This is what it looks like in my applications:
if (HttpContext.Current.IsDebuggingEnabled)
{
{CSS or JS Links to individual files go here}
}else{
{minified CSS or JS goes here}
}
}
In the web.config you just flip the debug flag to false for production:
<compilation debug="true" targetFramework="4.5" />

tinymce pre plugin button looks disabled

I am using tinymce in my rails 3.2 application.
I have added pre as a plugin in tinymce.yml in config. But the the button that appears on UI to add the code segment looks disabled. Why? There are no javascript or css errors on my page at all.

Resources