GithubHelp home page GithubHelp logo

Comments (3)

Tomucha avatar Tomucha commented on May 29, 2024

(fixed HTML fragment)

from webdev.

mehaase avatar mehaase commented on May 29, 2024

Hi @kevmoo I'm upgrading some things to Dart2/Angular5 this week and i just ran into the same thing. I have a global CSS file in one package that is supposed to be referenced from the web/index.html of another. In Dart1/Angular2 (yeah its been a while since I upgraded), I could load the global CSS file from another package like this:

    <link rel='stylesheet' type='text/css'
          href='packages/ng_modular_admin/src/css/modular-admin.css'>

But now this file is not produced in the build directory. I noticed that .font files and other arbitrary extensions like .dat are copied into the build directory, so I guess that there's some special handling of CSS files but I'm not sure what I should do to declare that I want this CSS file to appear in the build output.

Also, somewhat ironically .scss files are copied to the build directory even though they are not needed as build artifacts... Is there a way to configure which files get copied?

from webdev.

natebosch avatar natebosch commented on May 29, 2024

If you're using angular then it ships with a cleanup builder which removes .html and .css files.

By default this is only enabled in release builds which is why you don't see it with webdev serve - webdev serve defaults to dev build while webdev build defaults to release build.

This also only happens in lib/. If you have a CSS file in web/ it shouldn't be cleaned up by angular.

Also, somewhat ironically .scss files are copied to the build directory even though they are not needed as build artifacts...

If you are using sass_builder I would expect those to be cleaned up.

If you are compiling sass outside the build system instead and don't have sass_builder in your deps then there isn't anything that would clean it up.

Is there a way to configure which files get copied?

Not directly. You can implement a new PostProcessBuilder following the examples in angular and sass_builder to clean up whatever file extensions you'd like.

from webdev.

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.