Commit f228af24 authored by krlwlfrt's avatar krlwlfrt
Browse files

feat: copy .editorconfig during installation

parent 7cc274c3
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
# EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs
# editorconfig.org

root = true
@@ -7,7 +6,6 @@ root = true
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
+1 −0
Original line number Diff line number Diff line
@@ -7,5 +7,6 @@
!package.json
!package-lock.json
!README.md
!scripts
!tsconfig.json
!tslint.json
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@ A collection of configuration base files for StApps projects.
npm install --save-dev @openstapps/configuration
```

## `.editorconfig`

This file is automatically copied to your project's root directory upon installation of this package. It tells your editor/IDE about basic settings for indentation and formatting.

## `tsconfig.json`

Create a `tsconfig.json` with the following content:
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
  "description": "A collection of configuration base files for StApps projects.",
  "scripts": {
    "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
    "install": "./scripts/postinstall.sh",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "repository": {

scripts/postinstall.sh

0 → 100755
+9 −0
Original line number Diff line number Diff line
#!/usr/bin/env sh

if [[ ! -d "$INIT_CWD/node_modules/@openstapps/configuration/" ]]; then
  exit;
fi;

echo "Copying .editorconfig from @openstapps/configuration to this project."

cp "$INIT_CWD/node_modules/@openstapps/configuration/.editorconfig" "$INIT_CWD/.editorconfig"