dojo / grunt-dojo2

Dojo 2 - Grunt tasks and configuration (internal use)
Other
4 stars 16 forks source link

Incorrect dist folder structure if tsconfig contains different source roots. #148

Closed evra closed 7 years ago

evra commented 7 years ago

Bug

grunt dist produces wrong dist folder structure if tsconfig.json#include contains globs with different root folders (except of ./tests). At the moment this issue happens in the @dojo/dgrid package.

Package Version: 2.0.0-beta1.2

Code tsconfig.json configuration ... "include": [ "./examples/**/*.ts", "./src/**/*.ts", "./tests/**/*.ts" ] ...

Run grunt dist

Expected behavior: dist folder contains files from the src folder. ./dist/umd/**/*.ts

Actual behavior: dist includes 'src' folder and other root folders from the tsconfig.json#include. ./dist/umd/src/**/*.ts ./dist/umd/examples/**/*.ts

agubler commented 7 years ago

Perhaps we should add an override specific for dgrid as having examples in the package root isn't standard across dojo2 packages? Unless we want to make it so?

        ts: {
            dist: {
                exclude: ['tests/**/*.ts', 'examples/**/*.ts'],
            }
        },
evra commented 7 years ago

Thanks, it sovles my issue. May be it would make sense to add this example into the documentation under the "grunt ts" section.