🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

puli

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

puli

Puli JsonRepository Javascript implementation for automation tools plugins

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

puli.js : the Puli Javascript reader

Build Status Build status

puli.js provides a Javascript, read-only API for transform Puli path into filesystem paths using a JSON file generated by the PHP JsonRepository.

puli.js is a first step towards creating plugins for automation tools such as Gulp, Grunt or Webpack.

This library is maintained for NodeJS 0.12+.

Authors

Usage

The JsonRepository generates a JSON file to store its path mappings (usually /your/project/root/.puli/path-mappings.json). This file is used by puli.js to transform Puli paths into filesystem paths.

var puli = require('puli').load('.puli/path-mappings.json')

puli.path('/res/foo'); // returns the filesystem path associated to the virtual path /app/foo
puli.paths('/res/**/*.js'); // find matching virtual paths and return associated filesystem paths as an array
puli.exists('/res/**/*.js'); // check if the given virtual path exists or if the given glob contain paths

puli.js provides a read-only API: you cannot edit the path-mappings using it.

Documentation

Read the Puli Documentation to learn more about Puli.

Contribute

Contributions to Puli are always welcome!

Report bugs

You can report any bugs or issues you find on the issue tracker.

Pull requests

If you want to contribute on the code, here are some informations:

  • puli.js is developed using ES6 ;
  • we use Babel and Grunt to compile to ES5: to compile yourself, you can either run npm run babel to compile one time or run npm run watch to compile your files live ;
  • the source code is located in src and tests are located in test : theses two directories are compiled by Gulp respectively to dist and test-dist ;
  • run npm test to launch the test suite (the tests use mocha) ;

Create an automation tool plugin using this library

If you are interested in creating an automation tool plugin (for Gulp, Grunt, Webpack, ...), don't hesitate to open an issue in the issue tracker to discuss it. You can also join us on Gitter.

Support

If you are having problems, send a mail to galopintitouan@gmail.com or bschussek@gmail.com or shout out to @titouangalopin or @webmozart on Twitter.

License

All contents of this package are licensed under the MIT license.

Keywords

puli

FAQs

Package last updated on 02 Apr 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