mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Allow .styl files in imports/ directories to be imported.
Analogous to cd8bc10b1d, which implemented
the same change in logic for .less files.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'Expressive, dynamic, robust CSS',
|
||||
version: "2.511.5"
|
||||
version: "2.512.0"
|
||||
});
|
||||
|
||||
Package.registerBuildPlugin({
|
||||
|
||||
@@ -27,10 +27,10 @@ class StylusCompiler extends MultiFileCachingCompiler {
|
||||
this.sourceMapSize(compileResult.sourceMap);
|
||||
}
|
||||
|
||||
// The heuristic is that a file is an import (ie, is not itself processed as a
|
||||
// root) if it is in a subdirectory named 'imports' or if it matches
|
||||
// *.import.styl. This can be overridden in either direction via an explicit
|
||||
// `isImport` file option in api.addFiles.
|
||||
// The heuristic is that a file is an import (ie, is not itself
|
||||
// processed as a root) if it matches *.import.styl. This can be
|
||||
// overridden in either direction via an explicit `isImport` file option
|
||||
// in api.addFiles.
|
||||
isRoot(inputFile) {
|
||||
const fileOptions = inputFile.getFileOptions();
|
||||
if (fileOptions.hasOwnProperty('isImport')) {
|
||||
@@ -38,8 +38,7 @@ class StylusCompiler extends MultiFileCachingCompiler {
|
||||
}
|
||||
|
||||
const pathInPackage = inputFile.getPathInPackage();
|
||||
return !(/\.import\.styl$/.test(pathInPackage) ||
|
||||
/(?:^|\/)imports\//.test(pathInPackage));
|
||||
return ! /\.import\.styl$/.test(pathInPackage);
|
||||
}
|
||||
|
||||
compileOneFile(inputFile, allFiles) {
|
||||
|
||||
Reference in New Issue
Block a user