Code Monkey home page Code Monkey logo

Comments (2)

Snugug avatar Snugug commented on September 24, 2024

Let's take a quick look at my codebase for Toolkit as an example of how I develop Compass extensions.

You'll see that the project as a whole is a Compass project, with the standard Sass and Stylesheets folders, as well as a non-standard one called Compass. The Compass folder is this project (more or less); it contains all of the information for my compass extension. Inside my Sass folder, I've got screen.scss that has @import "../compass/stylesheets/toolkit"; at the top, importing my Compass extensions' primary partial so I can use it and debug it. Alternatively, I could have added include 'compass/stylesheets' to my config.rb file and instead done @import "toolkit" in my screen.scss folder. I run compass watch on root and work/debug from there.

A couple things to note with this workflow. First, if you've got any Compass Extension requirements, they need to be required in your config.rb file. Second, likewise, if you're building any Ruby code, the same needs to be in your config.rb. Third, because Compass is outside of the Sass folder, changes made to files inside will not automatically recompile unless a file inside the Sass folder is saved. The last one can probably be remedied simply by moving the Compass folder inside of the Sass folder, or potentially symlinking the Sass folder and the Extension's Stylesheets folder, but for now I make due as is.

Hope this helps!

from compass-extension-template.

lolmaus avatar lolmaus commented on September 24, 2024

Thank you for such a detailed reply!

Do i understand it correctly that what compass documentation means by the extension folder is the same what you you mean by a compass subfolder?

And one can import the extension with a simple @import directive as if it were one of his project's partials? (The second import method that you mention looks neater to me though!)

Thank you for all the useful hints!

But what does this hint from Compass docs mean?

Never specify an extension in your imports as this can cause issue when the syntax of a file changes.

Another question. Only the content of the compass subfolder is bundled when the extension is finished, right?

from compass-extension-template.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.