{"id":15513052,"url":"https://github.com/Fibonacci-Team/frontend-template","last_synced_at":"2025-10-12T09:32:02.614Z","repository":{"id":257807058,"uuid":"291988379","full_name":"Fibonacci-Team/frontend-template","owner":"Fibonacci-Team","description":"Webpack 4 template. Vue, Babel 7v, Sass / css / postcss (autoprefixer \u0026 css-nano \u0026 css-mqpacker) / svg sprite","archived":false,"fork":false,"pushed_at":"2020-12-08T21:38:22.000Z","size":1301,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-01-29T14:39:26.725Z","etag":null,"topics":["babel7","scss","svg-sprites","vue","vuex","webpack","webpack-merge"],"latest_commit_sha":null,"homepage":"","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Fibonacci-Team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-01T12:13:09.000Z","updated_at":"2021-11-07T07:42:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f46e4d6-567d-46c2-99cb-d8dc30589f9f","html_url":"https://github.com/Fibonacci-Team/frontend-template","commit_stats":null,"previous_names":["fibonacci-team/frontend-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fibonacci-Team/frontend-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fibonacci-Team%2Ffrontend-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fibonacci-Team%2Ffrontend-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fibonacci-Team%2Ffrontend-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fibonacci-Team%2Ffrontend-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fibonacci-Team","download_url":"https://codeload.github.com/Fibonacci-Team/frontend-template/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fibonacci-Team%2Ffrontend-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010939,"owners_count":26084837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["babel7","scss","svg-sprites","vue","vuex","webpack","webpack-merge"],"created_at":"2024-10-02T09:54:03.625Z","updated_at":"2025-10-12T09:32:02.606Z","avatar_url":"https://github.com/Fibonacci-Team.png","language":"SCSS","funding_links":[],"categories":["SCSS"],"sub_categories":[],"readme":"# Frontend Template\n\n## Build Setup:\n\n``` bash\n# Download repository:\ngit clone https://github.com/Fibonacci-Team/frontend-template frontend-template\n\n# Go to the app:\ncd frontend-template\n\n# Install dependencies:\nnpm i\n\n# Server with hot reload at http://localhost:8082/\nnpm run dev\n\n# Output will be at dist/ folder\nnpm run build\n```\n\n## Project Structure:\n\n* `src/pug/pages/*.pug` - main app PUG\n* `src/assets/scss` - put custom app SCSS styles here. Don't forget to import them in `index.js`\n* `src/assets/css` - the same as above but CSS here. Don't forget to import them in `index.js`\n* `src/assets/img` - put images here. Don't forget to use correct path: `assets/img/some.jpg`\n* `src/assets/svg` - put svg here. Don't forget to use correct path: `assets/svg/sprite.svg#id`\n* `src/js/modules` - put custom app scripts here\n* `src/index.js` - main app file where you include/import all required libs and init app\n* `src/components` - folder with custom `.vue` components\n* `src/store` - app store for vue\n* `static/` - folder with extra static assets that will be copied into output folder\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eSettings:\u003c/h2\u003e\n\u003c/div\u003e\n\n## Main const:\nEasy way to move all files.\nDefault:\n``` js\nconst PATHS = {\n  // Path to main app dir\n  src: path.join(__dirname, '../src'),\n  // Path to Output dir\n  dist: path.join(__dirname, '../dist'),\n  // Path to Second Output dir (js/css/fonts etc folder)\n  assets: 'assets/'\n}\n```\n\n## Customize:\nChange any folders:\n``` js\nconst PATHS = {\n  // src must be src\n  src: path.join(__dirname, '../src'),\n  // dist to public\n  dist: path.join(__dirname, '../public'),\n  // assets to static\n  assets: 'static/'\n}\n```\n\n## Import Another libs:\n1. Install libs\n2. Import libs in `./index.js`\n``` js\n// React example\nimport React from 'react'\n// Bootstrap example\nimport Bootstrap from 'bootstrap/dist/js/bootstrap.min.js'\nimport 'bootstrap/dist/js/bootstrap.min.js'\n```\n\n## Import only SASS or CSS libs:\n1. Install libs\n2. Go to `/assets/scss/modules/`\n3. Import libs in node modules\n``` scss\n// Sass librarys example:\n@import '~swiper/swiper';\n@import '~swiper/components/navigation/navigation';\n@import '~swiper/components/pagination/pagination';\n```\n\n## Import js files:\n1. Create another js module in `./js/modules` folder\n2. Import modules in `./js/modules/slider` file\n``` js\n// another js file for example\nimport './modules/slider';\n```\n\n## Vue install:\nDefault: **already have**\n\n1. Install vue\n``` bash\nnpm install vue --save\n```\n2. Init vue `index.js`:\n``` js\nconst app = new Vue({\n  el: '#app'\n})\n```\n3. Create div id app\n``` html\n\u003cdiv id=\"app\"\u003e\n  \u003c!-- content --\u003e\n\u003c/div\u003e\n```\n\n## Vuex install:\n1. Install vuex\n``` bash\nnpm install vuex --save\n```\n2. Import Vuex\n``` js\nimport store from './store'\n```\n3. Create index.js in `./store`\n``` js\nimport Vue from 'vue'\nimport Vuex from 'vuex'\nVue.use(Vuex)\n\nexport default new Vuex.Store({\n  // vuex content\n})\n```\n\n## Add Vue Components:\nCreate your component in `/components/`\n\n**HTML Usage:**\n1. Init component in `index.js`:\n``` js\nVue.component('example-component', require('./components/Example.vue').default)\n```\n2. Any html files:\n``` html\n \u003cexample-component /\u003e\n```\n\n**VUE Usage:**\n1. import components in .vue:\n``` js\nimport example from '~/components/Example.vue'\n```\n2. Register component:\n``` js\n  components: {\n    example\n  }\n```\n3. Init in vue component:\n``` html\n\u003cexample /\u003e\n```\n\n## PUG Dir Folder\n#### Default\n* .pug dir: `./src/pug`\n* Configurations: in `./build/webpack.base.conf.js`\n``` js\nconst PAGES_DIR = PATHS.src\n```\n\n**Usage:**\nAll files must be created in the `./src/pug` folder.\nExample:\n``` bash\n./src/pug/pages/index.pug\n./src/pug/pages/about.pug\n```\n\n**Pug files structure**\n* `layouts/` - Page layout variants. Default - `default.pug`.\n* `elements/` - Universal, non-customizable markup, which can be used in multiple places. \n* `components/` - Mixins: reusable and customizable markup. Usually these are: quotes, blog posts etc. Included only where used.\n\u003cbr/\u003e`components/utils.pug` - Universal, context-independent reusable mixins. Included on every page.\n* `sections/` - Contains sections, that are used multiple times in project. Allows minor customization if necessary. If components are used in a section, they must be included in the section, not on the page.\n* `pages/` - Website pages.\n* `functions/` - Pug/JS functions. Due to poor js functions in pug files formatting, would be better to write each function in separate file and include it in main function file - `functions.pug`. \n\n## Create Another Pug Files:\n#### Default: \nAutomatic creation any pug pages:\n1. Create another pug file in `./src/pug/pages` (main folder)\n2. Open new page `http://localhost:8082/about.html` (Don't forget to RERUN dev server)\n\n## SVG Sprites\n\n#### Import svg files\nAutomatic creation sprite:\n1. Add `.svg` file in `./src/assets/svg`\n2. Run dev server (You don't need to RERUN dev server)\n\n#### Usage in Pug\n``` bash\n+svg('to-top', 20, 20, 'to-top')\n```\nMore about mixin look in `./src/pug/utils/mixins.pug` \n#### Result in HTML\n``` html\n\u003csvg width=\"20\" height=\"20\" class=\"to-top\"\u003e\n    \u003cuse xlink:href=\"assets/svg/sprite.svg#to-top\"\u003e\u003c/use\u003e\n\u003c/svg\u003e\n```\n\n## Linters\n\nIt is not necessary to change validation rules manually, it is better to discuss it together and make a general decision.\n\nAlong with the validation, the autofix is started - everything that can be corrected by the linter in automatic mode.\n\n### Style validation (stylint)\nValidation rules are described in .stylelintrc.json\n\n[How to add an exception for a validator](https://stylelint.io/user-guide/ignore-code#within-files)\n\nExamples:\n``` scss\n#id {\n  color: pink !important; /* stylelint-disable-line declaration-no-important */\n}\n\n/* stylelint-disable */\na {}\n/* stylelint-enable */\n\n#id {\n  /* stylelint-disable-next-line declaration-no-important */\n  color: pink !important;\n}\n```\n\n### Javascript validation (eslint)\nValidation rules are described in .eslintrc.json\n\n[How to add an exception for a validator](https://eslint.org/docs/user-guide/configuring.html#disabling-rules-with-inline-comments)\n\nExamples:\n``` js\nalert('foo'); /* eslint-disable-line no-alert */\n\n/* eslint-disable */\nalert('foo');\n/* eslint-enable */\n\n/* eslint-disable no-alert, no-console */\nalert('foo');\nconsole.log('bar');\n/* eslint-enable no-alert, no-console */\n```\n\n\n## TODO template improvements\n- [ ] Update js modules system \n- [ ] Stylelint: BEM\n- [ ] Stylelint: styles order\n- [ ] Webpack chunks loading\n- [ ] [Blade lint](https://packagist.org/packages/magentron/laravel-blade-lint) \n\n**DONE:**\n- [x] SASS linter\n- [x] Javascript linter \n- [x] HTML linter\n- [x] Pug linter \n- [x] Git hook for project testing\n- [x] Make pug structure\n- [x] Make sass structure\n- [x] Optimize styles file size\n- [x] Adjust fluid typography\n- [x] Check grid classes\n- [X] Make image optimization\n- [x] Check if fluid's typography calc is expensive - it's fine\n- [x] Add default favicon \n- [x] Lazy load images/videos/iframe\n\n## License\n[MIT](./LICENSE)\n\nCopyright (c) 2020-present, [Andrii Helever](https://github.com/gelbman20), [Kateryna Minakova](https://github.com/Retoyfer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFibonacci-Team%2Ffrontend-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FFibonacci-Team%2Ffrontend-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FFibonacci-Team%2Ffrontend-template/lists"}