/lila

Extensible, multiple entries supporting, tasks based wrapper of gulp, webpack, rollup, etc.

Primary LanguageJavaScriptMIT LicenseMIT

lila

Extensible, multiple entries supporting, tasks based wrapper of gulp, webpack, rollup, etc.

packages

setup

You can install create-lila-app to create a lila application.

However, you can customize your own project:

  1. Install lila-bin. If installed globally, you can run lila commands directly in terminal, and if installed locally, you can run lila commands directly by npm run.
  2. Install lila-core and lila-tasks locally. You should not import lila-core directly, like import lila from 'lila-core', but export default lila => { ... } in lila.js(lila.init.js in windows) or plugin.
  3. Choose appropriate plugins.
  4. Configure init file lila.js(lila.init.js in windows).

base directory structure

|-- /
    |-- src/
    |-- dev/
    |-- build/
  • src: where to place source codes, like html, css, less, js, ts, ...
  • dev: a temporary directory generated while developing
  • build: where production bundles will be placed

If you want custom names, you can modify them by lila.setSettings({src, dev, build}).

how to write plugins

export default lila => {
  // do everything you want with lila api
};

how to load plugins

In lila.js(lila.init.js in windows):

import plugin from 'your-lila-plugin';

export default lila => {
  plugin(lila);

  ...
};

trouble shooting

  • In windows, you have to use lila.init.js instead, and lila.js will not work.
  • In windows, you must run lila command under the same directory with node_modules.