Comparing version
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="0.2.2"></a> | ||
## [0.2.2](https://github.com/rolldown/rolldown/compare/v0.2.1...v0.2.2) (2017-01-03) | ||
### Bug Fixes | ||
* **package:** use "tmp-file" instead ([c69aa82](https://github.com/rolldown/rolldown/commit/c69aa82)) | ||
<a name="0.2.1"></a> | ||
@@ -7,0 +17,0 @@ ## [0.2.1](https://github.com/rolldown/rolldown/compare/v0.2.0...v0.2.1) (2017-01-03) |
@@ -10,6 +10,5 @@ /*! | ||
import extend from 'extend-shallow'; | ||
import tmpFile from 'tmp-file'; | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
import uuid from 'uuid'; | ||
import { tmpdir } from 'os'; | ||
@@ -22,10 +21,2 @@ const arrayify = (val) => { | ||
const tempfile = (contents) => new Promise((resolve, reject) => { | ||
const tmpfile = path.join(tmpdir(), uuid.v4() + '.js'); | ||
fs.writeFile(tmpfile, contents, (err) => { | ||
if (err) { return reject(err) } | ||
resolve(tmpfile); | ||
}); | ||
}); | ||
const loadPackage = () => new Promise((resolve, reject) => { | ||
@@ -89,3 +80,3 @@ const fp = path.join(process.cwd(), 'package.json'); | ||
loadPackage, | ||
tempfile | ||
tmpFile | ||
}; | ||
@@ -122,5 +113,6 @@ | ||
if (typeof options.source === 'string' && !options.entry) { | ||
return utils.tempfile(options.source).then((filepath) => { | ||
options.entry = filepath; | ||
return utils.tmpFile(options.source).then((file) => { | ||
options.entry = file.path; | ||
delete options['source']; | ||
return rollup(options) | ||
@@ -127,0 +119,0 @@ }) |
@@ -14,6 +14,5 @@ /*! | ||
var extend = _interopDefault(require('extend-shallow')); | ||
var tmpFile = _interopDefault(require('tmp-file')); | ||
var path = _interopDefault(require('path')); | ||
var fs = _interopDefault(require('fs')); | ||
var uuid = _interopDefault(require('uuid')); | ||
var os = require('os'); | ||
@@ -26,10 +25,2 @@ const arrayify = (val) => { | ||
const tempfile = (contents) => new Promise((resolve, reject) => { | ||
const tmpfile = path.join(os.tmpdir(), uuid.v4() + '.js'); | ||
fs.writeFile(tmpfile, contents, (err) => { | ||
if (err) { return reject(err) } | ||
resolve(tmpfile); | ||
}); | ||
}); | ||
const loadPackage = () => new Promise((resolve, reject) => { | ||
@@ -93,3 +84,3 @@ const fp = path.join(process.cwd(), 'package.json'); | ||
loadPackage, | ||
tempfile | ||
tmpFile | ||
}; | ||
@@ -126,5 +117,6 @@ | ||
if (typeof options.source === 'string' && !options.entry) { | ||
return utils.tempfile(options.source).then((filepath) => { | ||
options.entry = filepath; | ||
return utils.tmpFile(options.source).then((file) => { | ||
options.entry = file.path; | ||
delete options['source']; | ||
return rollup(options) | ||
@@ -131,0 +123,0 @@ }) |
{ | ||
"name": "rolldown", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Modern bundler built on [rollup][] with support for presets and better configuration experience", | ||
@@ -34,3 +34,3 @@ "repository": "rolldown/rolldown", | ||
"rollup": "^0.39.2", | ||
"uuid": "^3.0.1" | ||
"tmp-file": "^2.0.1" | ||
}, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
19509
-1.47%202
-7.34%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed