scope - share Stylus variables across Meteor packages -
consider following app structure:
app.html app.coffee app.styl ## global styles, e.g. primary = #222 packages/ firstpackage/ package.styl ## package styles, e.g. background: primary secondpackage/ package.styl thirdpackage/ package.styl how can packages use styles defined app.styl?
this possible meteor stylus package:
when adding file share in package.js (package name: project:name), mark 'importabe' adding {isimport: true}:
api.addfiles('file.styl', 'client', {isimport: true});
then import file stylus files of other packages:
@import '{project:name}/file.styl'
more info: https://atmospherejs.com/meteor/stylus#cross-packages-imports
Comments
Post a Comment