Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

many-to-one

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

many-to-one

Sync and keep in sync multiple files to one file

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

many-to-one

Edit many files as one. Easily search, replace, move code across several files.

Demo

demo gif

Install

npm install -g many-to-one

Use:

many-to-one src/ bundle.js

Features

  • Syncs all files into one, obeying the order you supply them in
  • Unwatches files you remove from the bundle
  • Creates files you add to the bundle that don't exist
  • Starts watching files you add to the bundle
  • Updates the bundle if you're syncing a folder and add or remove a file in it
  • Can mangle the file names in the bundle if having them is annoying (for search/replace)
  • Supports any language by using different comment syntax

Docs

many-to-one --help
Usage: many-to-one [options] SOURCE ... TARGET

  SOURCE is a path to a file or directory, or a glob
  TARGET is a path to a file that will consist of the combined contents
    of all the files specified by SOURCEs

The command will keep watching both the SOURCEs and the TARGET and sync
them when either change.

Options:
  --comment, -c  The comment syntax used for file headers.
                                                        [string] [default: "//"]
  --ignore, -i   Don't consider these paths/globs for SOURCE files
  --mangle, -m   Mangle the actual source file names in TARGET's headers.
                                                                       [boolean]
  --token, -t    The end token distinguishing file headers from other comments.
                                             [string] [default: "-------------"]
  --verbose, -v  Log watching status.                                  [boolean]
  --help                                                               [boolean]

Examples

Sync a, b and c to bundle, in order b, c, a.

many-to-one b.js c.js a.js bundle.js

Use different comment syntax for other languages.

many-to-one -c '#' src/ bundle.coffee
many-to-one -c '--' src/ bundle.hs

Use different token to end file headers.

many-to-one -t '!!!' src/ bundle.js

You can use block comments too

many-to-one -c '/*' -t '*/' src/ bundle.js

Exclude some files from syncing.

many-to-one -i src/vendor.js src/ bundle.js

Keywords

sync

FAQs

Package last updated on 11 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts