forked from plopjs/plop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request plopjs#75 from amwmedia/crutchcorn-binary-copy
Fixes to binary copy logic
- Loading branch information
Showing
10 changed files
with
509 additions
and
431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"presets": ["es2015-node4"] | ||
"presets": ["node8"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import fs from 'fs'; | ||
import co from 'co'; | ||
import path from 'path'; | ||
import AvaTest from './_base-ava-test'; | ||
const {test, mockPath, testSrcPath, nodePlop} = (new AvaTest(__filename)); | ||
|
||
const plop = nodePlop(); | ||
|
||
///// | ||
// | ||
// | ||
|
||
test('Add action does not fail on binary file', co.wrap(function* (t) { | ||
plop.setGenerator('addBinary', { | ||
actions: [{ | ||
type: 'add', | ||
path: `${testSrcPath}/{{dashCase name}}-plop-logo.png`, | ||
templateFile: `${mockPath}/plop-logo.png` | ||
}] | ||
}); | ||
|
||
const filePath = path.resolve(testSrcPath, 'test-plop-logo.png'); | ||
yield plop.getGenerator('addBinary').runActions({name: 'test'}); | ||
t.true(fs.existsSync(filePath)); | ||
})); |
Binary file added
BIN
+11.3 KB
...iple-files-mock/plop-templates/components/logic/{{dashCase name}}-plop-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.