Skip to content

dependency order #3

@davidpfahler

Description

@davidpfahler

importless needs the ability to define and handle the order of stylesheet dependencies. This would transform the way stylesheet code can be written, maintained and build for production.

Features

Defining stylesheet modules is inspired by require.js. You can define dependencies by inserting a comment line anywhere in your stylesheet file that fits this pattern:

// @define "my/other/file.css", "all/the/*.css", "what/the/hell.less", "forgot/the/fileending"
  • comma separated strings
  • need to be valid [minimatch] patterns
  • you can use other file endings, because importless by itself does not care about the language you use
  • whatever is using importless needs to handle compiling to css and changing the file ending (unlike it is currently the case)

Result: importless spits out a sorted array, without imported file and without ignored files.

To Do

To make this work and to avoid confusion, importless needs to be changed in some ways.

  • never change files
  • do not compile
  • detect imports based on files ending (currently only less supported, also css, sass, ...)
  • detect order based on // @define ... comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions