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

gulp-bracks

v4.1.13

Published

bracks plugin for gulp

Downloads

27

Readme

#gulp-bracks

travis build npm version

bracks plugin for gulp. If you don't know what bracks style document is, please read bracks-parser. #####Install npm install gulp-bracks --save-dev #####How to use If you want to write your html or ejs files bracks style, just create a directory under your project root directory and name it bracks. Then, keep all the html or ejs files that you want to write in a bracks syntax in this direcory. Files can be located in sub-direcories in this bracks directory, just notice the pattern for the gulp src path in the following gulpfile.js example. Also, notice the file extension can be .html or .ejs. bracks-parser understands both of them. If it is needed, the src path can be set like gulp.src('./bracks/**/*.+(html|ejs)') in order to get both .html and .ejs file extensions. Under the hood, the parser parses all files under bracks directory, and returns the transformed file for being used by the next function down in the stream. So, if gulp watches the bracks directory (similar to the following example), as you change your bracks files, their corresponding html||ejs formatted documents are dynamically being overwritten and updated.

Something like the following will do the job for you.

gulpfile.js

var gulp = require('gulp');
var parse_bracks = require('gulp-bracks');

gulp.task('bracks', function() {
  return gulp.src('./bracks/**/*.html')
    .pipe(parse_bracks())
    .pipe(gulp.dest('./'));
});

gulp.task('watch', function() {
  gulp.watch('./bracks/**/*.html', ['bracks']);
});

gulp.task('default', ['bracks', 'watch']);

#####Example of a bracks style html document index.html:

<!DOCTYPE html>
html[
  c/[your comment]/c
  head[title[your page title]title]head
  body[
    h1[explore your mind]h1
    b[your bold text]b
    div(id="yourdiv" class="yourdivclass")[
      a(href="https://www.google.com")[link to google]a
      ul(style="list-style-type:disc")[
        li[item1]li
        li[item2]li
        li[a(href="https://www.google.com")[link to google]a]li
      ]ul
    ]div
    div[
      p[it is a samp s script footer paragraph tester]p
    ]div
  ]body
]html

#####Example of a bracks style ejs document index.ejs:

<!DOCTYPE html>
html[
  head[
    title[your page title]title
    link(rel="stylesheet" href="/stylesheets/style.css")/]
    meta(charset="utf-8")/]
  ]head
  body(class="%= page %]")[
    [% include partials/template/header.ejs %]
      section(class="layout")[
        div(class="primary")[
          %- include partials/content/home-page.ejs -%
        ]div
        p[explore your mind]p
        aside(class="secondary")[
          %- include partials/content/proj-page.ejs %]
        ]aside
      ]section
    [% include partials/template/footer.ejs %]
  ]body
]html