Skip to content

Instantly share code, notes, and snippets.

@BretFisher
Last active June 8, 2017 15:07
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save BretFisher/9ea1ba440cb999af9c95 to your computer and use it in GitHub Desktop.
Save BretFisher/9ea1ba440cb999af9c95 to your computer and use it in GitHub Desktop.
Meteor package file example for pulling in single .css file via a npm module
// pulling in a single .css file from npm package todomvc-app-css
// https://github.com/tastejs/todomvc-app-css
// Using this to build a TodoMVC example with Meteor 1.0
Package.describe({
summary: 'CSS for TodoMVC apps',
version: '0.0.0'
});
// this will download the npm package to .npm inside package directory
Npm.depends({'todomvc-app-css': '1.0.1'});
// this is the CSS file I need included from the npm package to the Meteor client
Package.onUse(function (api) {
api.addFiles('.npm/package/node_modules/todomvc-app-css/index.css', 'client');
});
// remember to `meteor add package-name` to have this .js processed during build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment