npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-markupfileindex

v1.0.4

Published

Grunt Markup File Index

Downloads

10

Readme

grunt-markupfileindex

grunt nts uit index

Getting Started

This plugin requires Grunt ~0.4.4

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-markupfileindex --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-markupfileindex');

타이틀을 가져오는 HTML, PHP 코드 안내

<title>[그룹명] 타이틀명</title>
<title>타이틀명</title>

<title> 값을 읽어 옴

<?php $pageTitle='[그룹명] 타이틀명';include '00_header_incl.php'; ?>
<?php $pageTitle='타이틀명';include '00_header_incl.php'; ?>

<? $pageTitle = '...' ?> 해당되는 텍스트 값을 가져옴

html, php title이 없거나 패턴에 맞지 않을 경우 파일명으로 출력

공통 그룹 처리 안내

파일명에 _incl, incl_, _inc, inc_ 가 들어가 있다면 공통 파일 그룹으로 처리 옵션 항목 중 'include_folder' 항목을 지정

The "markupfileindex" task

Overview

In your project's Gruntfile, add a section named markupfileindex to the data object passed into grunt.initConfig().

기본 옵션 설정

grunt.initConfig({
  markupfileindex: {
    index: {
      files: [{
        expand : true,
        cwd : 'test/',
        src: ['**/*.{html,php}', '!**/node_modules/**', '!**/.*/**'],
        dest: 'test/'
      }]
    }
  }
});

확장 옵션 설정

grunt.initConfig({
  markupfileindex: {
    options: {
      show_date : true,
      filename: '@test.html',
      title:'테스트 마크업 산출물',
      include_folder : ['includes', 'inc', 'testInc'],
      file_sort : 'asc',
      file_sort_key : 'title',
      group_sort : 'asc',
      path_replace : '^../',
    },

    index: {
      files: [{
        expand : true,
        cwd : 'test/',
        src: ['**/*.{html,php}', '!**/node_modules/**', '!**/.*/**'],
        dest: 'test/'
      }]
    }
  }
});

Options

options.show_date

Type : Boolean Default value: false

인덱스 파일 생성일자 출력 여부 선택

options.filename

Type: String Default value: '@index.html'

options.src 폴더에 저장할 인덱스 파일명 지정 지정하지 않을시 '@index.html' 파일 생성

options.title

Type: String Default value: '마크업 산출물'

index 파일 타이틀 지정

options.include_folder

Type: Array Default value: []

공통 파일이 들어 있는 폴더 입력 예)['includes', 'inc']

options.group_sort

Type: String Default value: asc Value: asc | desc

그룹 리스트 정렬(오름차순, 내림차순 중 선택)

options.file_sort

Type: String Default value: asc Value: asc | desc

파일 리스트 정렬(오름차순, 내림차순 중 선택)

options.file_sort_key

Type: String Default value: title Value: title | filename

파일 리스트 정렬 키(제목, 파일명 중 선택 중 선택)

options.path_replace

Type: String Default value: `` Value: 치환 정규표현식, 치환할 값

주소 치환 정규식 및 치환 값 설정 예) '^../, '../../test'