Coder Social home page Coder Social logo

aria-build's Introduction

Coverage Status Build Status npm version License: MIT

aria-build

Zero configuration CLI bundler or packager for typescript and javascript

Installation

  npm install --save-dev aria-build aria-fs typescript [email protected]

Usage

aria-build -d -f es --compress

CLI Options

  Usage
    $ aria-build [options]

  For more info, run any command with the `--help` flag
    $ aria-build --help

  Options
    -d, --declaration    Generates corresponding .d.ts file  (default false)
    -f, --format         build specified formats  (default es,cjs)
    -i, --entry          Entry module(s)
    -o, --output         Directory to place build files into  (default dist)
    -c, --config         config file of aria-build. i.e aria.config.ts
    --swc                Enabled swc plugin to transform ts,js,jsx,tsx
    --esbuild            Enabled esbuild plugin to use transform ts,js,jsx,tsx
    --external           Specify external dependencies
    --dts-only           Generate Declation types only (default false)
    --resolve            Resolve dependencies
    --clean              Clean the dist folder default  (default dist)
    --globals            Specify globals dependencies
    --sourcemap          Generate source map  (default false)
    --name               Specify name exposed in UMD builds
    --compress           Compress or minify the output  (default false)
    -v, --version        Displays current version
    -h, --help           Displays this message

API Setup

import { bundle, TSRollupConfig, clean } from 'aria-build'

(async function() {
  const pkg = require('./package.json')

  const external = [
    ...Object.keys(pkg.dependencies)
  ]

  const config: TSRollupConfig = {
    input: './src/index.ts',
    external,
    output: [
      {
        file: './dist/aria-build.es.js',
        format: 'es'
      },
      {
        file: './dist/aria-build.js',
        format: 'cjs'
      }
    ],
    tsconfig: {
      compilerOptions: {
        declaration: true
      }
    }
  }
  
  await clean('dist')
  await bundle({ config, esbuild: true, write: true })
})()

aria-build's People

Contributors

aelbore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aria-build's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.