Question

I just read Dart's article on Assets and Transformers and want to make sure I am understanding the correct way of structuring your asset directory.

Say my project name is MyApp, and it should produce - after cross-compiling - a JavaScript file called myapp.dart.js. Here is how I have the asset directory set up:

MyProject/
    asset/
        bootstrap/
            css/
                ...
            fonts/
                ...
            js/
                ...
        myapp/
            ... myapp's CSS and images
        ...other package's assets
    web/
        ...

Am I doing this right? Or should I be placing my assets some place else, or in a different convention?

Was it helpful?

Solution

Yes it's fine this way.

The asset directory is currently only supported by pub serve and pub build but not by the web server integrated into the Darteditor.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top