🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

build-keys

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build-keys

Get the paths of files from your build

1.0.0
latest
Source
npm
Version published
Weekly downloads
6
50%
Maintainers
1
Weekly downloads
 
Created
Source

build-keys Build status for build-keys

Get the paths of files from your build

Why?

  • Useful for copying build artifacts.
  • Agnostic of how the files were written.
  • Excludes directories, perfect for Amazon S3.

Install

npm install build-keys --save

Usage

Get it into your program.

const buildKeys = require('build-keys');

Get a list of the filepaths that exist within the most recent build, excluding directories.

buildKeys.latest().then((keys) => {
    console.log('keys:', keys);
    // [
    //     'master/1.0.0/foo.js',
    //     'master/latest/foo.js'
    // ]
});

API

buildKeys.latest(option)

Returns a Promise<Array> of paths for files within the latest build. Does not include directories. Designed for use with Amazon S3.

option

Type: object

Settings and known build data.

cwd

Type: string
Default: process.cwd()

The parent directory of the build root.

branch

Type: string

Match the files from the given branch name, rather than the most recently built branch.

version

Type: string

Match the files from the given version, rather than the most recently built version of the branch.

includeBranchLatest

Type: boolean
Default: true

Whether to also match the files at the <branch>/latest path.

Contributing

See our contributing guidelines for more details.

  • Fork it.
  • Make a feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request.

License

MPL-2.0 © Seth Holladay

Go make something, dang it.

Keywords

build

FAQs

Package last updated on 06 Sep 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