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

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -