New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-typograf

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-typograf

Prepare texts with Typograf using Grunt.

  • 6.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

grunt-typograf

NPM version NPM downloads Dependency Status devDependency Status Build Status

Prepare texts with Typograf for Grunt.

Install

npm install typograf grunt-typograf --save-dev

Usage

Gruntfile.js

module.exports = function (grunt) {
  grunt.initConfig({
    typograf: {
      compile: {
        options: {
          locale: ['ru', 'en-US']
        },
        files: {
          'hello.txt': ['header.txt', 'footer.txt']
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-typograf');
  grunt.registerTask('default', ['typograf']);
};

With additional options

module.exports = function (grunt) {
  grunt.initConfig({
    typograf: {
      compile: {
        options: {
          locale: ['ru', 'en-US'],
          htmlEntity: {
            // Type of HTML entities:
            // 'digit' - &#160,
            // 'name' -  ,
            // 'default' - UTF-8
            type: 'digit'
          },

          disableRule: ['ru/optalign/*'],
          enableRule:  ['ru/money/ruble'],

          // Own rules
          rules: [
            {
              name: 'common/other/typographicalEmoticon',
              handler: (text, settings) => text.replace(/:-\)/, ':—)')
            },
            {
              name: 'common/other/trimLeft',
              handler: (text, settings) => text.trimLeft()
            }
          ]
        },

        files: {
          'hello.txt': ['header.txt', 'footer.txt']
        }
      }
    }
  });

  grunt.loadNpmTasks('grunt-typograf');
  grunt.registerTask('default', ['typograf']);
};

License

The MIT License.

Keywords

FAQs

Package last updated on 02 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc