Скомпилируйте бездействующие файлы в .css после каждого обновления

Если вы используете Ubuntu, просто дважды щелкните пакет deb (i386 для 32-битного или amd64 для 64-битного), и он будет автоматически установлен с помощью программного обеспечения Ubuntu Software Center.

Убедитесь, что вы подключены к Интернету, в случае, если зависимости не удовлетворяются, он автоматически загрузит их для Интернета.

1
задан 14 May 2014 в 18:40

2 ответа

Проще говоря, аргумент -w не существует.

$ lessc --help
usage: lessc [option option=parameter ...] <source> [destination]

If source is set to `-' (dash or hyphen-minus), input is read from stdin.

options:
  -h, --help              Print help (this message) and exit.
  --include-path=PATHS    Set include paths. Separated by `:'. Use `;' on Windows.
  -M, --depends           Output a makefile import dependency list to stdout
  --no-color              Disable colorized output.
  --no-ie-compat          Disable IE compatibility checks.
  -l, --lint              Syntax check only (lint).
  -s, --silent            Suppress output of error messages.
  --strict-imports        Force evaluation of imports.
  --verbose               Be verbose.
  -v, --version           Print version number and exit.
  -x, --compress          Compress output by removing some whitespaces.
  --yui-compress          Compress output using ycssmin
  --max-line-len=LINELEN  Max line length used by ycssmin
  -O0, -O1, -O2           Set the parser's optimization level. The lower
                          the number, the less nodes it will create in the
                          tree. This could matter for debugging, or if you
                          want to access the individual nodes in the tree.
  --line-numbers=TYPE     Outputs filename and line numbers.
                          TYPE can be either 'comments', which will output
                          the debug info within comments, 'mediaquery'
                          that will output the information within a fake
                          media query which is compatible with the SASS
                          format, and 'all' which will do both.
  -rp, --rootpath=URL     Set rootpath for url rewriting in relative imports and urls.
                          Works with or without the relative-urls option.
  -ru, --relative-urls    re-write relative urls to the base less file.
  -sm=on|off              Turn on or off strict math, where in strict mode, math
  --strict-math=on|off    requires brackets. This option may default to on and then
                          be removed in the future.
  -su=on|off              Allow mixed units, e.g. 1px+1em or 1px*1px which have units
  --strict-units=on|off   that cannot be represented.

Report bugs to: http://github.com/cloudhead/less.js/issues
Home page: <http://lesscss.org/>

Однако вы можете использовать inotify для наблюдения за изменениями, и это выполняется примерно так, как вы хотите:

Для лучшей долгосрочной стратегии вы можете посмотреть на Grunt, у которого есть собственный режим просмотра.

4
ответ дан 24 May 2018 в 17:36
  • 1
    Мне жаль, но я использую это для простого интерфейса HTML / css проекта. это не Ruby или узел. – STEEL 25 September 2013 в 16:21
  • 2
    Так? Это всего лишь инструмент, с помощью которого можно создать свой CSS (и в случае с хрюканьем, обработать ваши активы). Он не имеет ничего общего с производственным стеком. – Oli♦ 25 September 2013 в 16:25
  • 3
    Я до сих пор не получил тебя. Посмотрите, как вы это указали, где я могу его добавить. Я скоро проверю хрюканье – STEEL 25 September 2013 в 16:52
  • 4
    Это баш ... Ты бы засунул его в терминал и запустил. Вы можете удалить строки, если хотите. – Oli♦ 25 September 2013 в 16:56
  • 5
    Спасибо, что сработало. Мне просто нужно было установить инструменты inotify и запустить ваши строки. :) – STEEL 26 September 2013 в 09:58

Использовать less-watch-compiler:

Установить глобально

$ (sudo) npm install -g less-watch-compiler

Установить глобально

$ less-watch-compiler FOLDER_TO_WATCH FOLDER_TO_OUTPUT

Использование с основной файл

$ less-watch-compiler FOLDER_TO_WATCH FOLDER_TO_OUTPUT main.less
1
ответ дан 24 May 2018 в 17:36

Другие вопросы по тегам:

Похожие вопросы: