second test task from MetaLamp.
https://nea2310.github.io/Metalamp-2nd-task/index.html
jQuery
Range slider Metalamp
Air Datepicker
config
contains webpack configuration
pixel-perfect
contains layout files
public
has the following structure:
public
└─── images
└─── feedback
└─── room-card
└─── room-details
images
contains mock images used by components or pages. These images will be replaced by real data from back-end in production mode
vendors
contains custom plugins not published on npm
vendors
└─── slider-metalamp
src
| index.js
└─── components
└─── pages
index.js
is the main file that imports each .js
and .scss
file in the src
folder and adds it to the bundle
components
- components available for all pages of the project
pages
- all pages of the project
components
has the following structure:
components
└─── booking
| | booking.pug
| | booking.js
| | booking.scss
| └─── image
| | | info.svg
|
└─── button
| | button.pug
| | button.js
| | button.scss
| └─── image
| | | arrow-forward-white.svg
components
contains one folder per component- each component folder contains main
.pug
file with the template
.js
and.scss
files which are dynamically loaded in theindex.js
are included in the component folder if needed .scss
contains one BEM block in the root of the file and all elements and modificators inside this block's structure
pages
has the following structure:
pages
└─── landing-page
| | landing-page.pug
| | landing-page.js
| | landing-page.scss
| └─── image
| | | living-room.jpg
|
└─── registration-page
| | registration-page.pug
| | registration-page.js
| | registration-page.scss
| └─── image
| | | bedroom.jpg
- each page is extended from
pages/layout/layout.pug | pages/ui-kit-layout/ui-kit-layout.pug
assets
has the following structure:
assets
└─── favicons
| └─── favicons-extra
| └─── favicons-main
| └─── manifest
└─── fonts
└─── images
└─── styles
favicons-main
- main favicon of the project.favicons-extra
- additional favicons for different browsers and screen resolutionmanifest
- manifest filefonts
- font filesimages
contains images shared among more than one componentstyles
- files with global styles of the project
shared
has the following structure:
shared
└─── helpers
└─── render
helpers
contains service functions used for data validation in components
render
contains functions used for rendering of components
utils
contains tools used by more than one component
npm i
npm start
go to http://localhost:8080/
npm run dev
bundle files will be created in folder dist
npm run build
bundle files will be created in folder dist