1.1.8 โ€ข Published 10 months ago

files-structure-generator v1.1.8

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

files-structure-generator

JSON Template Files
A collection of JSON templates to streamline your project setup!
Each template offers a well-structured mix of files and folders commonly used in various project types.


๐Ÿ—‚ Templates Overview

๐Ÿ“‚ Template 1: Basic Project Structure (template1.json)

{
  "src": {},
  "hello": {},
  "hii": {}
}
  • src: Main source code directory.
  • hello: Example directory.
  • hii: Example directory.

๐ŸŒ Template 2: Application Structure (template2.json)

{
  "app": {
    "main.js": "file",
    "config": {
      "config.js": "file"
    }
  },
  "components": {
    "header.js": "file",
    "footer.js": "file"
  },
  "services": {
    "api.js": "file"
  }
}
  • app: Main application directory with main.js and config.js.
  • components: Reusable components (e.g., header.js, footer.js).
  • services: Service layer for APIs with api.js.

๐ŸŽจ Template 3: Static Assets and Styling (template3.json)

{
  "assets": {
    "images": {},
    "fonts": {}
  },
  "styles": {
    "main.css": "file",
    "theme.css": "file"
  },
  "scripts": {
    "app.js": "file",
    "utils.js": "file"
  }
}
  • assets: Directory for images and fonts.
  • styles: CSS/SCSS files (main.css, theme.css).
  • scripts: JavaScript files for app logic (app.js, utils.js).

๐Ÿ”ง Template 4: Configuration and Environment (template4.json)

{
  "config": {
    "default.json": "file",
    "production.json": "file"
  },
  "env": {
    ".env": "file",
    ".env.example": "file"
  },
  "logs": {
    "app.log": "file",
    "error.log": "file"
  }
}
  • config: Configuration files (default.json, production.json).
  • env: Environment files (.env, .env.example).
  • logs: Log files (app.log, error.log).

๐ŸŒ Template 5: Web Application Essentials (template5.json)

{
  "public": {
    "index.html": "file",
    "favicon.ico": "file"
  },
  "views": {
    "home.html": "file",
    "about.html": "file"
  },
  "routes": {
    "index.js": "file",
    "api.js": "file"
  }
}
  • public: Public assets (index.html, favicon.ico).
  • views: HTML templates (home.html, about.html).
  • routes: JavaScript route files (index.js, api.js).

๐Ÿ—ƒ๏ธ Template 6: Model-Controller-Middleware (template6.json)

{
  "models": {
    "user.js": "file",
    "product.js": "file"
  },
  "controllers": {
    "userController.js": "file",
    "productController.js": "file"
  },
  "middlewares": {
    "auth.js": "file",
    "errorHandler.js": "file"
  }
}
  • models: Database models (user.js, product.js).
  • controllers: Controllers (userController.js, productController.js).
  • middlewares: Middleware functions (auth.js, errorHandler.js).

๐Ÿงช Template 7: Testing Structure (template7.json)

{
  "tests": {
    "unit": {
      "user.test.js": "file",
      "product.test.js": "file"
    },
    "integration": {
      "userIntegration.test.js": "file",
      "productIntegration.test.js": "file"
    }
  }
}
  • tests: Main testing directory.
    • unit: Unit tests (user.test.js, product.test.js).
    • integration: Integration tests (userIntegration.test.js, productIntegration.test.js).

๐Ÿš€ Usage

  1. Choose a template: Select the appropriate template for your project.
  2. Add to structure.json: Copy the structure of the template you chose into your structure.json file.
  3. Run command:
    npm run files
    This command will create files and folders based on your structure.json configuration.

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.


Note: Feel free to modify these templates to suit your specific project requirements.

1.1.8

10 months ago

1.1.7

10 months ago

1.1.6

10 months ago

1.1.5

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.9

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.3

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago