Huuums / vscode-folder-templates

Create your own Component structure with a simple click.
MIT License
213 stars 32 forks source link

Create a list of common Temlate formats and let them be added via command #35

Closed Huuums closed 3 years ago

Huuums commented 4 years ago

Due to the removal of default templates the "out of the box" usability of the plugin kind of disappeared.

Creating a list of common Folder structures and have them be addable via some command should make the plugin more userfriendly for people who do not have a special usecase.

Huuums commented 4 years ago

I would love if some people post their structures here so that we can have a nice list of common patterns.

njoppi2 commented 4 years ago

this is mine:

"fastFolderStructure.fileTemplates": {
"index": [
  "import React from 'react';",
  "import { Container } from './styles';",
  "",
  "interface Props {",
  "}",
  "",
  "const <FFSName>: React.FC<Props> = () => {",
  "  return (",
  "    <Container>",
  "      ",
  "    </Container>",
  "  );",
  "}",
  "",
  "export default <FFSName>;"
],
"styles": [
  "import styled from 'styled-components';",
  "import Config from 'config';",
  "",
  "export const Container = styled.div`",
  "\t",
  "`;",
  ""
]

},

"fastFolderStructure.structures": [
  {
    "name": "Default",
    "structure": [
      {
        "fileName": "index.tsx",
        "template": "index"
      },
      {
        "fileName": "styles.ts",
        "template": "styles"
      }
    ]
  },
],
Huuums commented 3 years ago

no longer needed