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

Add ability to handle import of .ts or .js files #79

Merged
merged 1 commit into from
Jul 12, 2019

Conversation

ro-savage
Copy link
Contributor

This PR adds the ability to import both .ts files and .js files allowing for a smoother transition when moving a serverless repo to TypeScript or when someone wants to only use .ts when they use the .ts superset.

Tests are also updated.

Basically we just check if the .js or .ts exists.

Because the watcher will throw an error if it can't find a file to watch, we handle it here by checking if the file exists first and if it doesn't throwing an error letting the user know.

I also wasn't sure why dist is included in the repo, but ignored by .gitignore. Therefore the files in dist haven't changed in this PR.

@ro-savage ro-savage mentioned this pull request Jan 28, 2018
@MikeBlair
Copy link

👍 We'd like this functionality as well.

@juanjoDiaz
Copy link

juanjoDiaz commented Jan 10, 2019

Is this blocked by anything?
I really would like to get this fixed since it's affecting other serverless plugins (see juanjoDiaz/serverless-plugin-warmup#85) as reported on #125

@Pithikos
Copy link

Pithikos commented Jan 15, 2019

This is a big annoyance in a project that uses both Python and TS. The plugin tries to transpile Python files. Please merge this.

@furudean
Copy link

@divyenduz @JackCuthbert

@JackCuthbert
Copy link
Contributor

Hey @ro-savage thanks for helping out! I'll take a look at this one (repro and test fix) on the weekend as it looks pretty important 😄

@titomb345
Copy link

+1 for this merging please. this is causing us big time headaches with our serverless build.

@marktani
Copy link

would love to see this merged, this is blocking me right now

@JackCuthbert
Copy link
Contributor

Sorry for the delay on this one friends! I've just been able to repro this for myself and the fix appears to be good 🎉 Thanks, @ro-savage!

@JackCuthbert JackCuthbert merged commit 02b1efa into serverless:master Jul 12, 2019
@divyenduz
Copy link
Contributor

🎉 This PR is included in version 1.1.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

9 participants