Permalink
Browse files

grunt 0.4

  • Loading branch information...
1 parent 60d19d2 commit fd170f30afc98e6227d6ebf8e250d78d2de39ae2 @openhoat committed Feb 16, 2013
Showing with 3 additions and 5 deletions.
  1. 0 grunt.js → Gruntfile.js
  2. +1 −1 package.json
  3. +2 −4 tasks/crypt.js
File renamed without changes.
View
@@ -3,7 +3,7 @@
"version":"0.4.0",
"description":"Encrypt / decrypt files",
"homepage":"https://github.com/openhoat/grunt-contrib-crypt",
- "main":"grunt.js",
+ "main":"Gruntfile.js",
"author":{
"name":"Olivier Penhoat",
"email":"openhoat@gmail.com"
View
@@ -17,11 +17,10 @@ module.exports = function (grunt) {
, destFilePath = srcFilePath + encryptedExtension
, decryptedContent, encryptedContent;
try {
- grunt.log.write('Encrypting "' + srcFilePath + '" to "' + destFilePath + '"...');
+ grunt.log.writeln('Encrypting ' + srcFilePath.cyan + ' -> ' + destFilePath.cyan);
decryptedContent = grunt.file.read(srcFilePath);
encryptedContent = kruptosUtilCrypt.encryptText(decryptedContent, cryptKey);
grunt.file.write(destFilePath, encryptedContent);
- grunt.log.ok();
} catch (e) {
grunt.log.error();
grunt.verbose.error(e);
@@ -43,11 +42,10 @@ module.exports = function (grunt) {
, destFilePath = srcFilePath.substring(0, srcFilePath.length - encryptedExtension.length)
, decryptedContent, encryptedContent;
try {
- grunt.log.write('Decrypting "' + srcFilePath + '" to "' + destFilePath + '"...');
+ grunt.log.writeln('Decrypting ' + srcFilePath.cyan + ' -> ' + destFilePath.cyan);
encryptedContent = grunt.file.read(srcFilePath);
decryptedContent = kruptosUtilCrypt.decryptText(encryptedContent, cryptKey);
grunt.file.write(destFilePath, decryptedContent);
- grunt.log.ok();
} catch (e) {
grunt.log.error();
grunt.verbose.error(e);

0 comments on commit fd170f3

Please sign in to comment.