Skip to content

Commit

Permalink
chore: allow windows developers to work with this repo without hassle (
Browse files Browse the repository at this point in the history
  • Loading branch information
bwajtr committed Mar 28, 2023
1 parent dfc9800 commit 3b04376
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
max_line_length = 120

[*.md]
max_line_length = off
23 changes: 23 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# For more detail why this file is necessary for seamless cooperation of *nix and windows developers, please read the following:
# https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

# Set the default behavior for text files, in case people don't have core.autocrlf set.
# Handle line endings automatically for files detected as text and leave all files detected as binary untouched.
* text=auto

# The above will handle all files NOT found below.

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.js text
*.ts text
*.yml text
*.html text
*.json text
*.md text
*.css text

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ packages/icons/test/visual/screenshots/failed
# VSCode user configuration folders
.vscode

# IntelliJ project files
.idea

# Generated web-types JSON files
web-types.json
web-types.lit.json
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"trailingComma": "all",
"tabWidth": 2,
"singleQuote": true,
"htmlWhitespaceSensitivity": "strict"
"htmlWhitespaceSensitivity": "strict",
"endOfLine": "auto"
}
3 changes: 2 additions & 1 deletion scripts/buildWebtypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const additionalAttributes = [
* Get packages using lerna, excluding blacklisted packages
*/
function getRelevantPackages() {
const output = execSync('./node_modules/.bin/lerna ls --json --loglevel silent');
const pathToLerna = path.normalize('./node_modules/.bin/lerna');
const output = execSync(`${pathToLerna} ls --json --loglevel silent`); // NOSONAR
const allPackages = JSON.parse(output.toString()).map((project) => project.name.replace('@vaadin/', ''));
return allPackages.filter((pkg) => !blacklistedPackages.some((blacklistedPackage) => pkg.match(blacklistedPackage)));
}
Expand Down
3 changes: 2 additions & 1 deletion wtr-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ const isLockfileChanged = () => {
* Get packages changed since master.
*/
const getChangedPackages = () => {
const output = execSync('./node_modules/.bin/lerna la --since origin/23.3 --json --loglevel silent');
const pathToLerna = path.normalize('./node_modules/.bin/lerna');
const output = execSync(`${pathToLerna} la --since origin/23.3 --json --loglevel silent`); // NOSONAR
return JSON.parse(output.toString()).map((project) => project.name.replace('@vaadin/', ''));
};

Expand Down

0 comments on commit 3b04376

Please sign in to comment.