Theia: add a command to theia cli to trim unnecessary files

Created on 30 Oct 2018  路  3Comments  路  Source: eclipse-theia/theia

enhancement help wanted theia-cli

Most helpful comment

To further discuss, i think adding a command to cli might not work. Because doing yarn --production will remove cli as devdependency, and if you do it before doing yarn --production, it will add back those files.

I think adding option on build would be nice, something like yarn theia build --production which would remove unnecessary files and devdependencies.

All 3 comments

I don't know much about using lerna in particular, but correct me if im wrong, i think adding this to lerna.json

...
"commands": {
聽聽聽聽"publish": {
聽聽聽聽聽聽"ignore": [
聽聽聽聽聽聽聽聽"*.md",
聽聽聽聽聽聽聽聽"*.ts",
       "*.ts.map",
聽聽聽聽聽聽聽聽"*.txt",
聽聽聽聽聽聽聽聽"test/**"
        ... etc
聽聽聽聽聽聽]
聽聽聽聽}
}
...

would prevent lerna from publishing those unnecessary files.

Or ofcourse if .npmignore works normally with lerna then those unnecessary files could be listed there.

We want to publish them for extension developers that they can have a look at source code and example usages. Only developers building prod applications should use this command.

To further discuss, i think adding a command to cli might not work. Because doing yarn --production will remove cli as devdependency, and if you do it before doing yarn --production, it will add back those files.

I think adding option on build would be nice, something like yarn theia build --production which would remove unnecessary files and devdependencies.

Was this page helpful?
0 / 5 - 0 ratings