I have project with a lot of less files, I'm used in Web compiler (developer Mads Kristensen) Extension for visual studio 2015.
my way to create compilerconfig.json is to compile single file and then edit manually the file, to work with all the other less files in the project.
I'm sure it's wrong way...
I don't understand, how I can to create new compilerconfig.json file that include all the less files in existing project?
because in this situation when I added new less file the only way to add file is go to compilerconfig.json and add it manually.
we don't have option to create new compilerconfig.json with all the less files in automatically way?
Less Web Compiler
All you need to do after adding a new .less file to your project is right click the new .less file and "Compile File" should be the only option, by selecting that option it will then be added to the compilerconfig.json file. This will not add all the .less files in the project to the config, with a single click, but it will automatically add them with a quick click on each file, and you wont have to be adding them manually.
BEFORE:
[
{
"outputFile": "less/site.css",
"inputFile": "less/site.less"
}
]
AFTER:
[
{
"outputFile": "less/site.css",
"inputFile": "less/site.less"
},
{
"outputFile": "less/theme.css",
"inputFile": "less/theme.less"
}
]
You can also recompile all the files from the Task Runner Explorer window (View -> Other Windows -> Task Runner Explorer). There you should see the compilerconfig.json, below that you will see "LESS", you can "Run" that to compile all, or a select a single file. You can also compile on build.
An alternative method would be to use a gulp file. You can set up a task to get all the less files in your project, without another thought to it after setting it up.
Related
I have an UglifyJS file watcher set up in IntelliJ IDEA, and it works great while I'm editing -- I modify the source js, the minified version gets created next to it automatically.
However, when I run an Ant build, and it copies the minified versions into the build working dir, the watcher "helpfully" creates doubly minified versions of them (*.min.min.js) in the build working dir, not ok.
I've set the Scope of the watcher to the 'src' module, but apparently that doesn't do what you'd think it would, because the doubles get created when Ant copies files into the 'build' module. Happens when I use IDEA to manually copy a single file from src to build too.
I don't see how to set this up to include *.js but exclude *.min.js, which is really the right thing. (Seems so sensible that Uglify should have it built in, but far as I can see it doesn't.)
Other than getting rid of the watcher and scripting the build do the minification, or copying only the original js versions and letting the watcher (re)create the minified ones, what's the best way to go here?
Got this working, thanks to a helpful commenter on the IDEA forum. The key is setting up a custom Scope, which I tried to do before but failed.
Pattern I ended up with was this, for anyone with similar needs:
file[src]:*.js&&!file:*min.js*
Making the 'src' module current then opening the dlg and selecting it from the dropdown in the main watcher config window apparently doesn't actually filter by that module. Clicking the ... btn, then choosing it from the dlg that opens does, plus I added an explicit filename pattern to exclude already minified files too.
Works great now, far as I've tested (both a minimal Ant test and manually copying a file to 'build' in IDEA).
This is an old question, and perhaps the Watchers didn't have this functionality at the time.
Using JetBrains 'macro' codes makes the 'min.min.min.js' problem go away.
$FileNameWithoutAllExtensions$.js -m --source-map -o $ContentRoot$\prod\js\$FileNameWithoutAllExtensions$.min.js
I always set 'Scope' to 'Current File', too; why run uglify on files that haven't been altered? (I'm assuming that any 3rd party JS libraries are already minified).
The following line of Dart code shows true for existing files when run from the Terminal but false when run from IntelliJ or WebStorm. Can someone explain why and how to set up Idea editors so that it will return the same results as the Terminal run.
bool pathExists(String path) => new File(path).existsSync();
Update
After tinkering I've now found out that if I create the project in WebStorm 5 using 'open directory' it works fine for all(WebStorm, IntelliJ, and the Terminal). The problem is when I try to create the project in IntelliJ 12 as there seems to be no equivalent to open directory it seems to try to create a Java project. WebStorm seems to have better support for creating a Dart application from scratch at the moment. See answers below for instructions.
You really should show the whole program and how you run it, otherwise I can only guess. And my guess would be that you are passing a relative path to the function and you run the program from a different directory than IntelliJ.
Let's say I have this Dart program:
import 'dart:io';
bool pathExists(String path) => new File(path).existsSync();
main() {
print(pathExists('books.txt'));
}
This program will print true when the books.txt file exists in the current directory. I happen to have such file in my home directory, so when I do
ladicek#argondie:~$ dart check_file.dart
it will obviously print true. But if I run the same program from another directory, it will surely print false. And that's probably what happens in your case.
You should check the Run/Debug Configuration in IntelliJ, it lets you configure the directory where the program is started.
Following #CrazyCoder's comment: Selecting
Create New Project
then
Static Web/Web Module
and choose your folder at
Project Location
then expand
More Settings
and finally make sure that
Module File Location
is set to where your main() dart file is located. By default it is set to the content root.
Has the same effect as Open Directory. I've tried it and it works fine.
I made a sample project called "Stack", but realized that i needed some more data structures, so i renamed everything - the project, made 2 new folders & their matching groups in XCode, modified the Target Build path to look for "Main/DataStructures-Prefix.pch" instead. But there's one file i don't understand -> earlier, i had gotten a "Stack.1" in my folder, so i just renamed it to "Main.1" and it doesn't seem to be affecting the build process, but i'm pretty skeptical. What does this "Main.1" do? is it the linked intermediate file like in C/C++?
here's a picture:
"Main.1" is a template for creating a "man page" (i.e. an on-line manual page) for your program. You can verify that by calling
man ./Main.1
on the command line in the directory where "Main.1" is located.
If you run
xcodebuild install
on the command line then the manual page is copied to the
$DSTROOT/usr/share/man/man1/
directory, where DSTROOT is the "Installation Build Products Location". The file is not used otherwise in the build process.
If you don't need a man page, you can just remove the file from the Xcode project.
By default svcutil.exe generates proxy class and its .config in C:\Program Files\Microsoft Visual Studio 9.0\VC.
What is syntax for generating a proxy class in a specific project by using svcutil.exe ?
Use the /directory option.
To quote directly from the help which is displayed when you type svcutil /? :
/directory:<directory> - Directory to create files in (default: current directory) (Short Form: /d)
Just to elaborate a little more... svcutil just generates the files, it doesn't manipulate the .proj file to add a file to the project, you have to do that yourself. What you might want to do is:
show all files in the Solution Explorer, then refresh the folder containing the generated files, then select them all and add them to the project (you should remove the existing files before doing a manual generation)
write a little batch script or command line app that iterates the folder the files are created in and inserts entries for them into the .proj file.
if possible use the Add Service Reference option from the context menu in the Solution Explorer, that generates the files and adds them to the project for you
I need to build VC++ project (made in VS2008) from command line using MSBuild with additional .cpp file which isn't part of this project (doesn't listed in section of .vcproj file.
Is there are any way to do this? (e.g. just by passing filename to command line input).
Editing .vcproj file by my script is also is a option but I save it for a worst scenario when there are no way to do it just with MSBuild.
I don't think you can point MSBuild at a project file and tell it to build this project and add another file at the same time. I'd either update the .vcproj file to include the file you're trying to add or go for the script-driven editing approach. Actually, I'd probably just change the .vcproj file as I'd think this is the safer approach and less likely to break something.
You can add the file to the project if it's in the same directory.
If it's shared / in another directory you can try adding as a link.
In the Add / Existing Dialog notice the Arrow on the edge of the add button. Try clicking it.