Giter Site home page Giter Site logo

egg-tmpfs's Introduction

egg-tmpfs

Greenkeeper badge

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-tmpfs --save

Usage

// {app_root}/config/plugin.js
exports.tmpfs = {
  enable: true,
  package: 'egg-tmpfs',
};

Configuration

// {app_root}/config/config.default.js
exports.tmpfs = {
  baseTmpPath: '/foo/bar',
};

see config/config.default.js for more detail.

api

ctx.tmpfs.ensureDir(dir[,options][,callback])

same as fsextra.ensureDir, but path will based on config.tmpfs.baseTmpPath, and the created folder will be auto cleand when request is finished or errored.

ctx.tmpfs.mark(path)

just incase you have to use original node fs module, then you can create file first, then mark it need to be delete.

ctx.tmpfs.unmark(path)

to revert what ctx.tmpfs.mark(path) did.

ctx.tmpfs.clean()

clean all tmp folders, return a Promise

Generally, you do not need to use this :) egg-tmpfs will auto call clean.

Example

see test

Questions & Suggestions

Please open an issue here.

License

MIT

egg-tmpfs's People

Contributors

paranoidjk avatar greenkeeper[bot] avatar

Stargazers

CodeFarmer avatar Roman avatar  avatar  avatar Charles avatar

Watchers

James Cloos avatar

Forkers

paperscz

egg-tmpfs's Issues

An in-range update of @types/fs-extra is breaking the build 🚨

The dependency @types/fs-extra was updated from 5.0.4 to 5.0.5.

🚨 View failing branch.

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

@types/fs-extra 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 failed (Details).

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 egg-ci is breaking the build 🚨

The devDependency egg-ci was updated from 1.9.2 to 1.10.0.

🚨 View failing branch.

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

egg-ci 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 failed (Details).

Commits

The new version differs by 2 commits.

  • fc6ecf9 Release 1.10.0
  • b222662 test: travis ci support windows now (#24)

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 egg is breaking the build 🚨

The devDependency egg was updated from 2.11.0 to 2.11.2.

🚨 View failing branch.

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

egg 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 failed (Details).

Release Notes for 2018-09-19, Version 2.11.2 @XadillaX

Notable changes

  • fix

    • typescript: add missing 'ignore', 'match'
  • refactor

    • separate dumping config object and config file

Commits

Commits

The new version differs by 7 commits.

  • fc45504 Release 2.11.2 (#3017)
  • 1d30166 refactor: separate dumping config object and config file (#3014)
  • e3f183e fix (typescript): Add missing 'ignore','match' (#3010)
  • d8c865a Release 2.11.1 (#3005)
  • eed74e8 chore: update deps, debug@4 and coffee@5 (#2995)
  • a8a3dfb fix(httpclient): can't use runInBackground in agent (#3003)
  • 4faf68f doc (loader.md): Add missing English translations (#2996)

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.