Skip to content

gethop-dev/duct.module.cljs-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Clojars Project

duct.module.cljs-compiler

Duct module for configuring a ClojureScript compiler.

Installation

Clojars Project

Usage

After adding the dependency add the following key to your config.edn module configuration:

:dev.gethop.duct.module/cljs-compiler {}

The module accepts a :environments key which is a map with multiple environments configuration (dev, test, prod, etc.). Each environment has a mandatory key :compiler and a optional key :compiler-config. The former is the compiler you want to use for the given environment, and the latter is the configuration for the compiler.

Currently the module supports two compilers:

The module already provides a default configuration that is sensible enough for a development (using figwheel) and a production (using closure-compiler).

Here is a sample configuration:

:dev.gethop.duct.module/cljs-compiler
{:environments {:development {:compiler :figwheel-main
                              :compiler-config {:options {:main foo.client}}}
                :production {:compiler :closure-compiler
                             :compiler-options {:build-options {:main foo.client}}

Bear in mind that each :compiler-config is specific to the :compiler technology. So please refer to their documentation to view all the possible configuration options.

License

Copyright (c) 2022 Magnet S. Coop

The source code for the library is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.

About

Duct module to configure a ClojureScript compiler.

Resources

License

Stars

Watchers

Forks

Packages

No packages published