私がフォローした元のソース: http://blog.dotsmart.net/2010/11/26/running-the-less-js-command-line-compiler-on-windows/
* .cmdファイルの実行に少し問題があるので、cmdを使用してコンピューター上のどこでも実行できます。私が正確に望んでいるのは、オプションの引数をサポートし、lessc.wsf(Windows Script Host用のLess.jsコンパイラ)を使用してlesscssを純粋なcssに変換するless.cmdファイルを実行することです。
lessc.cmdには次のものが含まれます。
::For convenience
@cscript //nologo "%~dp0lessc.wsf" %*
lessc.wsfにはこれが含まれています:http://pastebin.com/D4pUSGZ6
私がこれまでにしたこと:
lessc.cmdへの絶対パスをPATHシステム変数に追加し、PATHTEXTシステム変数の.cmdを先頭に移動しました。
またこれをしました:
From a command prompt;
assoc .cmd
should return with
..cmd=cmdfile
If not
assoc .cmd=cmdfile
to restore the default file type association.
ftype cmdfile
should return with
cmdfile="%1" %*
If not
ftype cmdfile="%1" %*
to restore the default "Open" action for the file type.
cmdの絶対パスを使用してcmdファイルにアプローチしない限り、これはまだ機能しません。他の場所にlesscと入力すると、次のようになります。
C:\Intel Intel is not recognized as an internal or external command, operable program or batch file.
、変更が有効になることを確認するために、コンピューターを複数回再起動しました。
誰かが答えを持っていることを願っています。