0.2.2 • Published 8 years ago

pkg-resolve v0.2.2

Weekly downloads
9,898
License
Apache-2.0
Repository
github
Last release
8 years ago

Package Resolve Sponsored by Version Downloads Build Status Dependencies

Package Resolver (JSPM+NPM) which supports JavaScript and CSS packages. Preferes ES6 Module files following jsnext:main flag in package configuration. Also respects alternative style entries as main package entry point.

The solution was mainly thought for offering a powerful JSPM-capable include mechanism for PostCSS.

Links

Installation

Should be installed locally in your project source code:

npm install pkg-resolve --save-dev

Usage

Integrate like this in your e.g. gulpfile.js or other packages:

import resolver from "pkg-resolve"

resolver("lodash/map").then((path) => {
  console.log("Path of lodash/map implementation:", path)
});

resolver("normalize.css").then((path) => {
  console.log("Path of normalize.css main entry:", path)
});

Usage for PostCSS

You are also able to combine the import functionality with PostCSS Import. That's pretty neat to include CSS files and other referenced assets which are installed with JSPM inside the local project.

  1. Install normalize.css: jspm install npm:normalize.css
  2. Include it via PostCSS include: @import "normalize.css";

Copyright

Copyright 2016Sebastian Software GmbH

0.2.2

8 years ago

0.2.1

8 years ago

0.2.0

8 years ago

0.1.14

8 years ago

0.1.13

8 years ago

0.1.12

8 years ago

0.1.11

8 years ago

0.1.10

8 years ago

0.1.9

8 years ago

0.1.8

8 years ago

0.1.7

8 years ago

0.1.6

8 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago