+ All Categories
Home > Technology > Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt Advanced Vol 2, Plugins Text I/O with fun

Date post: 15-Jan-2015
Category:
Upload: david-amend
View: 276 times
Download: 0 times
Share this document with a friend
Description:
Demonstrating some helpful advanced plugins for Grunt
Popular Tags:
21
Grunt.js For the Enterprise Vol. 2 Text I/O with Fun
Transcript
Page 1: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt.js For the Enterprise Vol. 2

Text I/Owith Fun

Page 2: Grunt Advanced Vol 2, Plugins Text I/O with fun

David Amend● Java Web-Developer, Frontend Architecture● Backbone, Ember, Angular, Grunt.js

Interests: JavaScript, TypeScript, Triathlon-Sports

About

[email protected]

Page 3: Grunt Advanced Vol 2, Plugins Text I/O with fun
Page 4: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt.js

Build tool like: Rake, ant, maven, groovy, yeoman, …

● npm package● Easy JSON-syntax, easy extendable● Supports all environments

Page 6: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt-Figlet

● Figlet based● Supports

○ dynamic text○ Comment-Wrapping Supports

● Alternative: Grunt-asciify○ Direct console output

Page 7: Grunt Advanced Vol 2, Plugins Text I/O with fun
Page 8: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt-Cat

● based on cat● Support

○ Text○ Ascii○ Figlet○ Ansi

● Conversion by○ http://picascii.com/○ http://www.text-image.com/convert/ascii.html

Page 9: Grunt Advanced Vol 2, Plugins Text I/O with fun
Page 10: Grunt Advanced Vol 2, Plugins Text I/O with fun
Page 11: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt-Attention

● Easy colourful text highlighting● Easy borders● Use with Chalk

Page 12: Grunt Advanced Vol 2, Plugins Text I/O with fun
Page 13: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt-Prompt

● Based on Inquirer.js● OS Commandline Interfaces● Types

○ list○ checkbox○ confirm○ input○ password

● Helpful in many ways

Page 14: Grunt Advanced Vol 2, Plugins Text I/O with fun
Page 15: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt-Notify

● Show UI-Popup Notifications● Support many platforms● Types

○ Notify_hooks○ Custom messages

→ Helpful for development

Page 16: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt-Notify

Page 17: Grunt Advanced Vol 2, Plugins Text I/O with fun

Grunt APIHelpful Utils● grunt.util.normalizelf(string)

○ \r\n on Windows, \n otherwise● grunt.file.readJSON(filepath [, options])● grunt.file.readYAML(filepath [, options])

Grunt.config API● grunt.config([prop [, value]])

→ '<%= foo %>'● grunt.config.requires(prop [, prop [, ...]])

Page 18: Grunt Advanced Vol 2, Plugins Text I/O with fun

var VARIABLES = require('./GruntVariables.js');

var _ = require ("lodash");

var files1 = {

var1: ["one"]

};

var all = [];

all.push("two");

all.push(files1.var1);

var files2 = {

var2 : all

};

var global = _.extend(files1, files2, {

openPath : "http://localhost:9000"

});

module.exports = global;

Page 19: Grunt Advanced Vol 2, Plugins Text I/O with fun

Convince !

Page 20: Grunt Advanced Vol 2, Plugins Text I/O with fun

Have Fun @Coding!

Page 21: Grunt Advanced Vol 2, Plugins Text I/O with fun

Questions


Recommended