Code Monkey home page Code Monkey logo

Comments (2)

kellymears avatar kellymears commented on August 25, 2024

I am now required to install @roots/bud-sass despite before bud was compiling SCSS with no issues.

I'm so sorry for this injustice.

Expected behavior

A source-map generated for the SCSS files.

Why did you expect that behavior?

Sage isn't configured to generate a source-map in production, only development. If you want to configure it differently you can use bud.devtool or the --devtool flag with the bud build command.

The function has 100% test coverage and works fine:

beforeEach(async () => {
bud = await factory()
bud.hooks.on = callback
method = devtool.bind(bud)
vi.clearAllMocks()
})
it(`is a function`, () => {
expect(method).toBeInstanceOf(Function)
})
it(`returns bud`, async () => {
const ret = await method()
expect(ret).toBe(bud)
})
it(`calls bud.hooks.on`, async () => {
const onSpy = vi.spyOn(bud.hooks, `on`)
await method()
expect(onSpy).toHaveBeenCalledTimes(1)
})
it(`calls bud.hooks.on`, async () => {
const onSpy = vi.spyOn(bud.hooks, `on`)
await method()
expect(onSpy).toHaveBeenCalledWith(
`build.devtool`,
`cheap-module-source-map`,
)
})
it(`calls bud.hooks.on with expected arguments`, async () => {
const onSpy = vi.spyOn(bud.hooks, `on`)
await method(callback)
expect(onSpy).toHaveBeenCalledWith(`build.devtool`, callback)
})

from bud.

kupoback avatar kupoback commented on August 25, 2024

@kellymears Okay, so looking at it, I need to update my build script to run as development, and then add some filters so that it doesn't use BrowserSync. Reason I mention this is that we have development sites, and our Frontend developers need to reference SCSS files, despite it not being needed for a final production.

from bud.

Related Issues (20)

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.