Last active
June 8, 2017 15:07
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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