Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.2 KB

README.md

File metadata and controls

34 lines (24 loc) · 1.2 KB

Overview

This is a buildout recipe that resolves project Javascript requirements and resolves dependencies similar to npm, by providing the following features:

  • Parse and resolves semantic versions in BFS style starting from buildout.cfg javascript-packages
  • Downloads and extracts best versions for each dependency.
  • Validates sha1 sum for all downloads.
  • Creates (symbolic on unix) links to the main file in specified directory.

Known Issues

  • NPM uses nesting (creating subfolders with specific versions) in order to resolve version conflicts, we do not. So try to avoid using packages with inherent dependency conflicts (a good example is ionic)

Checking out the code

Run the following:

easy_install -U infi.projector
projector devenv build

Buildout config part with examples:

[js-requirements]
recipe = infi.recipe.js_requirements
js-directory = parts/js
symlink-to-directory = static/js
javascript-packages = ['jquery=3.3.1', 'sizzle^1.2.2', 'underscore>=2.2.0', 'sizzle']
  • If symylink-to-directory is empty, symbolic links (or windows links) will not be created for the main file.
  • js-directory default value is parts/js.