panzerdp/voca

Custom build tool

panzerdp opened this issue · 1 comments

Voca library needs a custom build tool to generate configured builds.

Rough the command npm run build should implement the following settings:

  • Accept the list of functions that must be included,
    e.g. --functions sprintf,camelCase,insert,latinise
  • Accept the list of function categories that must be included,
    e.g. --categories escape,format
  • Accept the list of functions that must be excluded (used in combination with categories),
    e.g.--exclude-functions insert,latinise
  • Accept an exported format cjs (CommonJS), umd (Universal Module Definition), iife, es,
    e.g. --format cjs
  • Accept a minification parameter,
    e.g. --minify
  • Accept a FP build parameter:
    e.g. --fp
  • Accept an output file path parameter:
    e.g. --output dist/voca.cust.build.js

For instance the following command creates a fp build exported as CommonJS of sprintf() and latinise() functions:

npm run build --functions sprintf,latinise --format cjs --fp

Decided for now to delay the implementation. May be reopened in case of necessity.