Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Mar 30, 2021. It is now read-only.
/grunt-maxlinesPublic archive
NotificationsYou must be signed in to change notification settings

zerok/grunt-maxlines

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enforce a maximum number of lines for your source files. Once a file goes beyondthe specified limit, your build will fail.

This plugin simply wraps thesloc package to determine the number of linesin each file and raises a warning if appropriate. So all kudos belongs to theauthors of that package!

Getting Started

This plugin requires Grunt~0.4.2

To install the plugin run following command in your project's directory:

npm install grunt-maxlines --save-dev

Once you've completed this set, add the plugin to your Gruntfile.js.

grunt.loadNpmTasks('grunt-maxlines');

The "maxlines" task

In your project's Gruntfile's initConfig section add a section namedmaxlinesthat configures all the file size limits you want to enforce.

grunt.initConfig({maxlines:{options:{// Task-specific options go here.limit:500},javascript:{// Target-specific file lists and/or options go here.options:{limit:300},files:['src/**/*.js']},scss:{options:{limit:1000},files:['resources/**/*.scss']}}});

Options

options.limit

Type:IntegerDefault value:500

This value sets the maximum number of lines that are allowed.Any files going beyond that limit will trigger a warning.

options.metric

Type:StringDefault value:slocPossible values: sloc, loc, loc, cloc, scloc, mcloc, nloc

Defines what metric should be applied to determine if a file has reached thedefined limit or not.

License

This plugin is licensed under the GPLv3 license due to one of its dependenciesbeing published under this license.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp