@af-modules/compiler

1.2.3 • Public • Published

AF Compiler Codacy Badge

This compiler compiles any project that targets a JavaScript runtime. Other files than source code, like sass or less, can also be required and compiled in your project, even though it's not recommended.

The compiler is able to be used in a gulp .pipe(), but it is not required to use it that way. (Don't .pipe(Gulp.dest(...)) since the compiler will already write the resulting bundles.)

Installation

npm i --save-dev @af-modules/compiler

How to use

const compilerBuilder = require('@af-modules/compiler');

const compilerConfig = { 
    cacheDir: '.cache/', 
    compilers: ['js'],
    extensions: ['js'],
    linkExtensions: ['js'], 
    outDir: 'dist/',
};

const compiler = compilerBuilder(compilerConfig);

compiler({
    module: 'app',
    entry: 'src/app.js',
    context: 'src/',
    target: 'web',
});

Package Sidebar

Install

npm i @af-modules/compiler

Weekly Downloads

2

Version

1.2.3

License

CC-BY-SA-4.0

Last publish

Collaborators

  • titannano