Giter VIP home page Giter VIP logo

ncat's Introduction

ncat

Node CLI to concatenate multiple files, with their sourcemaps and optionally stdin, a banner and a footer.

Travis AppVeyor Codecov Greenkeeper badge license

Installation

$ npm i -g|-D ncat

Usage

$ ncat [<FILES ...>] [OPTIONS] [-o|--output <OUTPUT_FILE>]

The arguments may be a list of files:

$ ncat file_1.js file_2.js -o dist/bundle.js

or a list of globs:

$ ncat 'src/**/*.js !**/rainbow.js' src/**/{cake,unicorn}.css -o dist/bundle.js

If file is a single dash (-) ncat reads from the standard input:

$ echo 'Insert between file_1.js and file_2.js' | ncat file_1.js - file_2.js -o dist/bundle.js

If -o|--output is omitted ncat writes to the standard input:

$ ncat file_1.js file_2.js | uglifyjs > dist/bundle.min.js

Options

Name Type Default Description
-o, --output {String} undefined Output File
-m, --map {Boolean} false Create an external sourcemap (including the sourcemaps of existing files)
-e, --map-embed {Boolean} false Embed the code in the sourcemap (only apply to code without an existing sourcemap)
-b, --banner {Boolean|String} false Add a banner built with the package.json file. Optionally pass the path to a .js file containing custom banner that can be called with require()
-f, --footer {String} undefined The path to .js file containing custom footer that can be called with require()
-h, --help {Boolean} false CLI Help
-v, --version {Boolean} false CLI Version

Examples

Concatenate files and standard input

Files

---------- file_1.min.js ----------
< First part of JS code (minified) ... >

---------- file_2.js ----------
<Second part of JS code ... >

Command

$ uglifyjs file_2.js | ncat file_1.min.js - --output dist/bundle.js

Result

---------- dist/bundle.js ----------
< First part of JS code (minified) ... >

< Second part of JS code (minified) ... >

Concatenate with sourcemaps

Files

---------- file_1.js ----------
< First part of JS code ... >

/*# sourceMappingURL=file_1.js.map */

---------- file_1.js.map ----------
{"version": 3,"file": "file_1.js", ... }

---------- file_2.js ----------
< Second part of JS code ... >

/*# sourceMappingURL=file_2.js.map */

---------- file_2.js.map ----------
{"version": 3,"file": "file_2.js", ... }

Command

$ ncat file_1.js file_2.js --map --output dist/bundle.js

Result

---------- dist/bundle.js ----------
< First part of JS code ... >

< Second part of JS code ... >

/*# sourceMappingURL=bundle.map */

---------- bundle.js.map ----------
{"version": 3,"file": "bundle.js", ... }

Add a banner to a file

Files

---------- bootstrap.js ----------
< JS code ... >

Command

$ ncat bootstrap.js --banner --output dist/bundle.js

Result

---------- dist/bundle.js ----------
/*!
 * Bootstrap v4.0.0
 * https://getbootstrap.com
 *
 * Copyright 2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
 * Licensed under MIT license
 */

< JS code ... >

Add a custom banner and footer to a file

Files

---------- bootstrap.js ----------
< JS code ... >

---------- build/banner.js ----------
const pkg = require('read-pkg-up').sync().pkg;
module.exports =
`/*!
 * ${pkg.name} v${pkg.version} (${pkg.homepage})
 *
 * Copyright (c) 2011-${new Date().getFullYear()} ${pkg.author.name}
 * Licensed under the ${pkg.license} license */

(function () {`;

---------- build/footer.js ----------
module.exports = `
})()`

Command

$ ncat bootstrap.js --banner build/banner.js --footer build/footer.js --output dist/bundle.js

Result

---------- dist/bundle.js ----------
/*!
 * Bootstrap v4.0.0 (https://getbootstrap.com)
 *
 * Copyright (c) 2011-2017 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
 * Licensed under the MIT license */

(function () {
< JS code ... >
})()

ncat's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar pvdlg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ncat's Issues

An in-range update of chalk is breaking the build 🚨

Version 2.3.1 of chalk was just published.

Branch Build failing 🚨
Dependency chalk
Current Version 2.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

chalk is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/appveyor/branch Error starting AppVeyor build Details
  • βœ… continuous-integration/travis-ci/push The Travis CI build passed Details

Commits

The new version differs by 8 commits.

  • ae8a03f 2.3.1
  • b55dd79 Force bump dependencies
  • 678152c Update chalk to use the latest updates to supports-color (#247)
  • 011dd04 Fix usage example in the readme (#251)
  • 6554030 Use svg screenshot
  • bc3dd75 Update usage stats in the readme (#242)
  • a8c60e3 Fix spelling error in readme (#232)
  • 5392313 Correct HSV and HWB examples

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

An in-range update of semantic-release is breaking the build 🚨

Version 15.7.0 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.6.6
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v15.7.0

15.7.0 (2018-07-10)

Bug Fixes

  • do not set path to plugin config defined as a Function or an Array (f93eeb7)

Features

  • allow to define multiple generateNotes plugins (5989989)
Commits

The new version differs by 12 commits.

  • 24ce560 refactor: build plugin pipeline parameters at initialization
  • eb26254 refactor: use Object.entries rather than Object.keys
  • 50061bb refactor: remove unnecessary object destructuring
  • 5989989 feat: allow to define multiple generateNotes plugins
  • 576eb60 refactor: simplify plugin validation
  • f7f4aab refactor: use the lastInput arg to compute the prepare pipeline next input
  • 12de628 refactor: fix incorrect comments in lib/plugins/pipeline.js
  • d303286 docs: fix default value for analyzeCommits plugin
  • ed9c456 refactor: always return an Array of results/errors from a plugin pipeline
  • cac4882 docs: clarify verifyRelease plugin description
  • 09348f1 style: disable max-params warning for lib/plugins/normalize.js
  • f93eeb7 fix: do not set path to plugin config defined as a Function or an Array

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

An in-range update of semantic-release is breaking the build 🚨

Version 15.6.0 of semantic-release was just published.

Branch Build failing 🚨
Dependency [semantic-release](https://github.com/semantic-release/semantic-release)
Current Version 15.5.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details

Release Notes v15.6.0

15.6.0 (2018-06-19)

Features

  • allow to disable the publish plugin hook (4454d57)
Commits

The new version differs by 1 commits.

  • 4454d57 feat: allow to disable the publish plugin hook

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of prettier is breaking the build 🚨

Version 1.7.1 of prettier just got published.

Branch Build failing 🚨
Dependency prettier
Current Version 1.7.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

As prettier is β€œonly” a devDependency of this project it might not break production or downstream projects, but β€œonly” your build or test tools – preventing new deploys or publishes.

I recommend you give this issue a high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build is in progress Details
  • ❌ continuous-integration/appveyor/branch AppVeyor build failed Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of semantic-release is breaking the build 🚨

Version 15.9.6 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.9.5
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).
  • βœ… continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).

Release Notes v15.9.6

15.9.6 (2018-08-08)

Bug Fixes

  • do not convert ssh repositoryUrl to https (b895231)
Commits

The new version differs by 3 commits.

  • b895231 fix: do not convert ssh repositoryUrl to https
  • 8b8e40c docs(plugins): add semantic-release-firefox
  • 06695a1 chore(package): update xo to version 0.22.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of semantic-release is breaking the build 🚨

Version 15.4.1 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.4.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Release Notes v15.4.1

15.4.1 (2018-05-09)

Bug Fixes

  • use git rev-parse origin/${branch} to verify origin head (d7081fa)
Commits

The new version differs by 1 commits.

  • d7081fa fix: use git rev-parse origin/${branch} to verify origin head

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of codecov is breaking the build 🚨

The devDependency codecov was updated from 3.6.4 to 3.6.5.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

codecov is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 2 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of semantic-release is breaking the build 🚨

Version 15.9.5 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.9.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… continuous-integration/appveyor/branch: AppVeyor build succeeded (Details).
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes v15.9.5

15.9.5 (2018-08-05)

Bug Fixes

  • do not clone stdout/stderr passed to pugins (63d422e)
Commits

The new version differs by 1 commits.

  • 63d422e fix: do not clone stdout/stderr passed to pugins

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

An in-range update of semantic-release is breaking the build 🚨

Version 15.6.3 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 15.6.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details

Release Notes v15.6.3

15.6.3 (2018-07-02)

Bug Fixes

  • fetch all tags even if the repo is not shallow (45eee4a)
Commits

The new version differs by 2 commits.

  • 45eee4a fix: fetch all tags even if the repo is not shallow
  • 2d3a5e5 test: harmonize git-utils functions name

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of semantic-release is breaking the build 🚨

Version 15.5.3 of semantic-release was just published.

Branch Build failing 🚨
Dependency [semantic-release](https://github.com/semantic-release/semantic-release)
Current Version 15.5.2
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details

Release Notes v15.5.3

15.5.3 (2018-06-15)

Bug Fixes

  • package: update p-locate to version 3.0.0 (0ab0426)
Commits

The new version differs by 3 commits.

  • 0ab0426 fix(package): update p-locate to version 3.0.0
  • f9d9144 docs: Add a troubleshooting section about squashed commits
  • 11cef46 chore(package): update sinon to version 6.0.0

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of semantic-release is breaking the build 🚨

Version 12.2.5 of semantic-release was just published.

Branch Build failing 🚨
Dependency semantic-release
Current Version 12.2.4
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

semantic-release is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • βœ… continuous-integration/appveyor/branch AppVeyor build succeeded Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Commits

The new version differs by 3 commits.

  • 0d2d1f2 fix: fix the --no-ci arg parsing
  • 7e860c7 docs(travis): recommend to use the deploy step instead of script
  • e0fa20b ci(travis): use Build Stages

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of yargs is breaking the build 🚨

The dependency yargs was updated from 13.2.2 to 13.2.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

yargs is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build is in progress (Details).
  • ❌ continuous-integration/appveyor/branch: AppVeyor build failed (Details).

Commits

The new version differs by 14 commits.

  • a6e67f1 chore(release): 13.2.4
  • fc13476 chore: update standard-verison dependency
  • bf46813 fix(i18n): rename unclear 'implication failed' to 'missing dependent arguments' (#1317)
  • a3a5d05 docs: fix a broken link to MS Terminology Search (#1341)
  • b4f8018 build: add .versionrc that hides test/build
  • 0c39183 chore(release): 13.2.3
  • 08e0746 chore: update deps (#1340)
  • 843e939 docs: make --no- boolean prefix easier to find in the docs (#1338)
  • 84cac07 docs: restore removed changelog of v13.2.0 (#1337)
  • b20db65 fix(deps): upgrade cliui for compatibility with latest chalk. (#1330)
  • c294d1b test: accept differently formatted output (#1327)
  • ac3f10c chore: move .hbs templates into .js to facilitate webpacking (#1320)
  • 0295132 fix: address issues with dutch translation (#1316)
  • 9f2468e doc: clarify parserConfiguration object structure (#1309)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.