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

Ensure package.json has required stanzas, create vscode settings dir on project creation #965

Merged
merged 5 commits into from
Aug 11, 2020

Conversation

ewanharris
Copy link
Contributor

  • Make sure the fields we try to access exist before accessing them - ALOY-1736
  • Create .vscode/settings.json when running alloy new - ALOY-1735

@jquick-axway, could you check that the settings.json file is correct?

@@ -209,6 +227,14 @@ module.exports = async function(args, program) {
await fs.copy(path.join(paths.eslintTemplate), path.join(paths.eslintApp));
}

// Copy across the settings.json to have VS Code hide certain directories
const vscodeDir = path.join(paths.project, '.vscode');
if (!await fs.exists(vscodeDir)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure you want to make this mandatory. I NEVER store vscode settings locally and I wouldn't ever want to exclude the build folder from my file explorer as I used it all the time.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brentonhouse , a common mistake I see 1st time Alloy users make is they make changes to files under the root i18n and platform folders, only to be confused as to why their changes didn't work. Hiding these folders by default will hopefully encourage devs to make these changes under the app folder instead.

Also, we've heard of file locking issues happening on Windows under the generated folders which can cause build failures. We believe it's because of VS Code's file-monitoring/indexing. I'm not sure if this still happens today, but from what we've seen by other VS Code users in the past (not Titanium users) this may likely be the case and disabling indexing of these folders (namely build) works-around it.

If you don't want the .vscode/settings.json in your new project, then delete the file. Most people will make major changes to the created app project afterwards anyways.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already occuring in Studio and I don't think I've ever seen anyone complain about Studio hiding those folders. Nonetheless, I've added a note to the default readme to let people know that it's there and that they can delete it if they wish

@build
Copy link

build commented Aug 7, 2020

Messages
📖

✅ All tests are passing
Nice one! All 3490 tests are passing.

📖 🎉 - congrats on your new release

Generated by 🚫 dangerJS against c34c3ab

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass

@jquick-axway
Copy link
Contributor

@ewanharris, I've modified the Titanium SDK's PR to exclude the node_modules folder and package-lock.json file.
tidev/titanium-sdk@bc87971

@ewanharris ewanharris merged commit 59ddce7 into tidev:master Aug 11, 2020
@ewanharris ewanharris deleted the ALOY-1736 branch August 11, 2020 13:07
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

Successfully merging this pull request may close these issues.

4 participants