0.0.11 • Published 12 months ago

@canlooks/compiler v0.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

@canlooks/compiler

This is a compile tools for canlooks

Installation

npm i @canlooks/compiler

Command Line

Usage: canlooks-compiler [action] [module] [options]

Arguments:
  action                 Available actions: "clean", "core", or specify directory of the module

Options:
  -v, --version          output the version number
  -c, --config <config>  Configuration file name (default: "canlooks.config.json")
  -d, --dir <dir>        Directory name of compiled files (default: "dist")
  -h, --help             display help for command

API Example

import compiler from '@canlooks/compiler'

// compile core and all modules
compiler()

// clean compiled files
compiler('clean')

// compile core
compiler('core')

// compile module
compiler('myModuleName')

Configuration

The properties of canlooks.config.json are as follows:

nametypedefaultdescription
publicstring"public"This directory will copy to "dir" folder as is.
dirstring"dist"Name of the directory where the compiled file is stored
includesstring[]"*/tsconfig.json"Default rule: Folders whose contain the tsconfig.json file are treated as module
excludesstring[]"node_modules", "src", "test", "dist"
modulesstring[]undefinedUsing specified module only, includes and excludes are ignored

canlooks.config.js

// object
module.exports = {
  public: 'public',
  dir: 'dist',
  includes: ['*/tsconfig.json'],
  excludes: ['node_modules', 'src', 'test', 'dist'],
  modules: [],
}

// function
module.exports = () => {
  return {
    public: 'public',
    dir: 'dist',
    includes: ['*/tsconfig.json'],
    excludes: ['node_modules', 'src', 'test', 'dist'],
    modules: [],
  }
}
0.0.11

12 months ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago