broccoli-file-creator
Advanced tools
Comparing version 1.1.1 to 1.2.0
12
index.js
@@ -0,5 +1,6 @@ | ||
'use strict'; | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
var Plugin = require('broccoli-plugin'); | ||
var symlinkOrCopySync = require('symlink-or-copy').sync; | ||
var mkdirp = require('mkdirp'); | ||
@@ -30,14 +31,15 @@ | ||
this.fileOptions = options; | ||
this._built = false; | ||
} | ||
Creator.prototype.build = function () { | ||
var outputFilePath = path.join(this.outputPath, this.filename); | ||
if (fs.existsSync(outputFilePath)) { | ||
if (this._built) { | ||
return; | ||
} | ||
var outputFilePath = path.join(this.outputPath, this.filename); | ||
mkdirp.sync(path.dirname(outputFilePath)); | ||
fs.writeFileSync(outputFilePath, this.content, this.fileOptions); | ||
this._built = true; | ||
}; |
{ | ||
"name": "broccoli-file-creator", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Broccoli plugin to create a file.", | ||
@@ -24,8 +24,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"broccoli-kitchen-sink-helpers": "~0.2.0", | ||
"broccoli-plugin": "^1.1.0", | ||
"broccoli-writer": "~0.1.1", | ||
"mkdirp": "^0.5.1", | ||
"rsvp": "~3.0.6", | ||
"symlink-or-copy": "^1.0.1" | ||
"mkdirp": "^0.5.1" | ||
}, | ||
@@ -32,0 +28,0 @@ "devDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
34
3539
+ Addedrsvp@3.6.2(transitive)
- Removedbroccoli-kitchen-sink-helpers@~0.2.0
- Removedbroccoli-writer@~0.1.1
- Removedrsvp@~3.0.6
- Removedsymlink-or-copy@^1.0.1
- Removedbroccoli-kitchen-sink-helpers@0.2.9(transitive)
- Removedbroccoli-writer@0.1.1(transitive)
- Removedglob@5.0.15(transitive)
- Removedrsvp@3.0.21(transitive)