Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument for "Excemption path"? #49

Open
tobbeThorn opened this issue Dec 4, 2020 · 1 comment
Open

Argument for "Excemption path"? #49

tobbeThorn opened this issue Dec 4, 2020 · 1 comment

Comments

@tobbeThorn
Copy link

tobbeThorn commented Dec 4, 2020

With typescript 4 we want to make 3 versions of our builds, normal dist with latest (4+) and allso 3.4 and 3.8 versions like:


  "typesVersions": {
    "<3.8": {
      "*": [
        "ts3.4/*"
      ]
    },
    ">=3.8 <4.0": {
      "*": [
        "ts3.8/*"
      ]
    }
  },

And the build script:


    "build": "tsc && downlevel-dts . ts3.4 --to=3.4 && cp tsconfig.json ./ts3.4/ && downlevel-dts . ts3.8 --to=3.8 && cp tsconfig.json ./ts3.8/ && rm -rf ./ts3.8/ts3.4",

Note: I have to remove files from ts3.4 in previous step ending up in ts3.8
If you see anything I did wrong with this I whould love to know. Else it whould be great with an optional argument that excempts files that we do not want to end up in the target.

@MattiasJa
Copy link

Similar problem! But to re-use above scenario, the output after a build would be:

  • dist/
  • ts3.4/
    • dist/
  • ts3.8/
    • dist/
    • ts.3.4/ <-- Not wanted!? Thus removed by last step in build script.

If we later add more versions tsX.Y, we will need to add several more rm to remove previous ts3.4, ts3.8 and so on, from tsX.Y.

  • tsX.Y/
    • dist/
    • ts.3.4/ <-- rm
    • ts.3.8/ <-- rm
    • ts.... <-- rm

Correct? Better solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants