2.4.1 • Published 6 years ago

dixi v2.4.1

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

Build Status Dependency Status

It is a tool for assembling prototypes and simple web pages, based on Gulp and Webpack.

Getting Started

Installation

$ npm i -g dixi

Usage

Run init command in the project root directory:

$ dixi init

Set the base options in dixi.config.js file. (See options)

Start server and watchers:

$ dixi run

Documentation

Project structure

.
├─ app                   
│   ├─ src
│   │   ├─ twig
│   │   ├─ icons
│   │   ├─ js
│   │   ├─ scss
│   │   ├─ static
│   │   └─ data.json
│   ├─ dev          
│   └─ build
├─ dixi.config.js
└─ package.json

Commands

$ dixi # Reference

$ dixi init  # Initialize project

$ dixi run  # Start server and watchers

$ dixi build # Build project

Options

enableRevision

Static asset revisioning by appending content hash to filenames.

createArchive

Creates zip archive with production files.

includeSources

Copies the source files to the assembly folder.

browsersList

  • value <Array>
  • default ['defaults']

Browsers list for babel-preset-env and autoprefixer. See browserslist for more info.

extend(cfg, gulp, Message)

  • cfg <Object> Configuration object.
  • gulp <Function> Gulp Instance.
  • Message <Class> Messages class.
  • return: <Object> Return configuration object (required)

This function allows you to change the configuration, create custom tasks, change the task queue, and so on.

const baseOptions = {

    extend: (cfg, gulp, Message) =>
    {
    	gulp.task('customTask', () =>
        {
    		Message.log('Custom task.');

    		return Promise.resolve();
    	});

    	cfg.builder.tasks.build.push('customTask');

    	return cfg;
    }
};