🚀 Launch Week Day 2:Introducing Custom Tabs for Org Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

assemble-select-views

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assemble-select-views

Assemble plugin that adds a `.selectViews` method to the instance, for prompting the user to select the views they want to write to the file system.

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
2
Created
Source

assemble-select-views NPM version NPM downloads Build Status

Assemble plugin that adds a .selectViews method to the instance, for prompting the user to select the views they want to write to the file system.

Install

Install with npm:

$ npm install assemble-select-views --save

Example

assemble-select-views

Usage

var select = require('assemble-select-views');
var assemble = require('assemble');
var app = assemble();

// register the plugin
app.use(select());

Example usage

See assemblefile.js for a working example.

// create a collection
app.create('pages');

// add "pages" to the collection
app.page('a.hbs', {content: 'this is {{name}}', data: {name: 'Foo'}});
app.page('b.hbs', {content: 'this is {{name}}', data: {name: 'Bar'}});
app.page('c.hbs', {content: 'this is {{name}}', data: {name: 'Baz'}});

// register an engine for rendering ".hbs" files
app.engine('hbs', require('engine-handlebars'));

// ask the user which "pages" they want to render
// and write to the file system
app.selectViews('pages', function(err, views) {
  if (err) {
    console.log(err);
    return;
  }
  console.log('done!');
});

You might also be interested in these projects:

  • assemble-fs: Assemble plugin to add methods to assemble for working with the file system, like src,… more | homepage
  • assemble: Assemble is a powerful, extendable and easy to use static site generator for node.js. Used… more | homepage
  • base-questions: Plugin for base-methods that adds methods for prompting the user and storing the answers on… more | homepage
  • base: base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Building docs

Generate readme and API documentation with verb:

$ npm install verb && npm run docs

Or, if verb is installed globally:

$ verb

Running tests

Install dev dependencies:

$ npm install -d && npm test

Author

Jon Schlinkert

License

Copyright © 2016, Jon Schlinkert. Released under the MIT license.

This file was generated by verb, v0.9.0, on May 09, 2016.

Keywords

assemble

FAQs

Package last updated on 09 May 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts