Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Novivia's module building tool.

License

NotificationsYou must be signed in to change notification settings

Novivia/tools.module-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

npm install @novivia/build-module --save-dev

Usage on the command-line

Usage: build-module <command> [options]Commands:  build    Build the module to a .tar.gz file  publish  Publish the module from a .tar.gz file  release  Bumps the version, builds the tarball and publishes itOptions:  -s, --silent   Don't output anything  -v, --verbose  Be explicit about everything  -h, --help     Show help  --version      Show version number

Build a module

Options:  -b, --babel    Provide a pattern to compile with Babel  -p, --package  Provide a pattern to package  -r, --runtime  Force to use the Babel runtime even if it can't be found during compilation    [default: true]  -h, --help     Show help

You can specify the-b and-p options as many times as you desire. Theyaccept either a glob pattern or a JavaScript regular expression.

Please note that for files that are matched by any of the Babel patterns, theywill get compiled and put in the right place, but the originals will not becopied over even if they are matched by any of the-p patterns.

By default, files matching the following glob are compiled using Babel:lib/**/*.js.

By default, files matching any of the following globs are copied over to thepackage:

  • lib/**!(*.js~)
  • index.js
  • package.json
  • CHANGELOG*
  • CONTRIBUTING*
  • LICENSE*
  • README*

Publish a module

Options:  -c, --clean        Remove the file after publication         [default: true]  -m, --most-recent  If no file is specified, use the most recent matching the pattern  -h, --help         Show help

If a file is provided as an argument, the tool will attempt to publish it tonpm. Otherwise, it will automatically publish the .tar.gz file it recognizes ascoming from itself. If more than one matches, it will list them, allowing theuser to select one, unless the ̀-m` option was specified, in which case it willpublish the most recent one.

Release a module

This command first executesnpm version with the same argument that youprovided to it to bump the version, sobuild-module release patch wouldexecutenpm version patch. It then builds & publishes the module, with atwist: it leveragesnpm run build andnpm run pub to do so, meaning that youstill get to leverage whatever options you put in your package file for thesetwo.

This command is essentially equivalent to

npm patch<version>&& npm run build&& npm run pub

with the exception that it clarifies and tries to prevent some common mistakesaround the use of npm.

Usage with the programmatic API

Not yet.

Roadmap

  • Tests.
  • Programmatic API.
  • Entry point for negative globs.
  • Resulting path rewrite.

About

Novivia's module building tool.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp