quick-temp

WebJar for quick-temp

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

quick-temp
Last Version

Last Version

0.1.8
Release Date

Release Date

Type

Type

jar
Description

Description

quick-temp
WebJar for quick-temp
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/joliss/node-quick-temp

Download quick-temp

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/quick-temp/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>quick-temp</artifactId>
    <version>0.1.8</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/quick-temp/
implementation 'org.webjars.npm:quick-temp:0.1.8'
// https://jarcasting.com/artifacts/org.webjars.npm/quick-temp/
implementation ("org.webjars.npm:quick-temp:0.1.8")
'org.webjars.npm:quick-temp:jar:0.1.8'
<dependency org="org.webjars.npm" name="quick-temp" rev="0.1.8">
  <artifact name="quick-temp" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='quick-temp', version='0.1.8')
)
libraryDependencies += "org.webjars.npm" % "quick-temp" % "0.1.8"
[org.webjars.npm/quick-temp "0.1.8"]

Dependencies

compile (3)

Group / Artifact Type Version
org.webjars.npm : mktemp jar [0.4.0,0.5)
org.webjars.npm : rimraf jar [2.5.4,3)
org.webjars.npm : underscore.string jar [3.3.4,3.4)

Project Modules

There are no modules declared in this project.

node-quick-temp

Create and remove temporary directories. Useful for build tools, like Broccoli plugins. Smart about naming, and placing them in ./tmp if possible, so you don't have to worry about this.

Installation

npm install --save quick-temp

Usage

var quickTemp = require('quick-temp');

Creating a temporary directory

To make a temporary and assign its path to this.tmpDestDir, call either one of these:

quickTemp.makeOrRemake(this, 'tmpDestDir');
// or
quickTemp.makeOrReuse(this, 'tmpDestDir');

If this.tmpDestDir already contains a path, makeOrRemake will remove it first and then create a new directory, whereas makeOrReuse will be a no-op.

Both functions also return the path of the temporary directory.

An optional third argument lets you override the class-name component of the temporary directory name:

quickTemp.makeOrRemake(this, 'tmpDestDir', 'TreeMerger');
quickTemp.makeOrRemake(this, 'tmpDestDir', this.constructor.name); // default

Removing a temporary directory

To remove a previously-created temporary directory and all its contents, call

quickTemp.remove(this, 'tmpDestDir');

This will also assign this.tmpDestDir = null. If this.tmpDestDir is already null or undefined, it will be a no-op.

Versions

Version
0.1.8
0.1.3
0.1.0