1.0.0 • Published 7 years ago

gulp-text-editor-snippets v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

Gulp Text Editor Snippets

Generates Atom and Sublime Text snippets from a common format

How it works

Create a text file with the following structure:

tab the text + Tab that will envoke your snippet in the edtior
description optional human readable description of your snippet
scope the source files your snippet will apply to (ex:.text.html,.source.js). See Scope Descriptors in the Atom docs. --- deliniator before your snippet content

Example

tab=_experiment
description=Experiment
scope=.text.html
---
<h1>Hello World</h1>
  <p>Thumbs up!</p>

The Gulp Task

dest - the destination folder for your snippets

var gulp = require('gulp');
var snippets = require('gulp-text-editor-snippets');

gulp.task('default', function() {
  return gulp.src('./src/**/*.snippet').pipe(snippets({dest:'./tools'}));
});