Skip to content
This repository has been archived by the owner on Feb 3, 2022. It is now read-only.

Latest commit

 

History

History

build

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Build and bundle project files for distribution.

Features:

  • Perform a build of HTML files: assets will be copied to the output path and style and script files will be bundled. Generation of favicons and home screen icons is supported, as well as .webmanifest generation.
  • JavaScript and TypeScript files and modules will be transpiled via Babel and bundled with Rollup.
  • CSS and Sass files will be compiled and bundled via PostCSS and Dart Sass.
  • JSON files imported in modules are treated as namespaces.
  • Images and Fonts imported in modules and css will be copied to the outpath path and references will be updated.
  • Internationalization files (.po) will be compiled using gettext into JSON files. You can use it with i18next.

Usage

rna build <input> [...options]

Options

  • --watch Watch sources and rebuild on files changes.
  • --output <file|directory> Specify the output file or directory for the build.
  • --targets Set specific targets for the build using a Browserslist. This query is used by Babel and PostCSS to transpile JavaScript and CSS files in order to be compatible with the specified browsers. Use --no-targets to prevent code transpiling.
  • --name For JavaScript builds, you can specify the name of the global variable to use for the bundle.
  • --format Specify the format of the JavaScript bundle. Available formats are es, umd, iife and cjs.
  • --bundle Should bundle dependencies along the source files.
  • --production Minify the output of the JavaScript and CSS bundles.
  • --no-map Do not produce source map.
  • --no-lint Do not lint files before build.
  • --jsx.pragma The JSX pragma to use.
  • --jsx.pragmaFrag The JSX pragma fragment to use.
  • --jsx.module The module to auto import for JSX pragma.
  • --typings [file] Generate typescript declarations.
  • --analyze Print analytic report for script size.
  • --link <package1,package2|pattern> Symlinked dependencies to build along the main bundle.
  • --serve <directory> Run a Web server with livereload.
  • --port The Web server port to listen (default 3000).
  • --tunnel [subdomain] Create a tunnel with localtunnel.
  • --directory Enable directory mode for file system navigation.
  • --https Should start the server using HTTPS.

See also