gulp-text-editor-snippets

1.0.0 • Public • Published

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'}));
});

Package Sidebar

Install

npm i gulp-text-editor-snippets

Weekly Downloads

1

Version

1.0.0

License

ISC

Last publish

Collaborators

  • jleonard