In this repository there is a simple landing page of one of my clients.
SCSS files are processed without using huge node-sass
, precss
is used for this.
The node_modules
directory has a size of 123MB
. (my previous repository start-markup-sass).
However, it should be noted that sass features such as @function
or map-get
are not supported.
https://fivemru.github.io/start-markup-scss/
webpack 4
babel 7
pug
precss
for use Sass-like markupcssnano
for css minifysvg-sprite-loader
for creating SVG sprites.svgo
for optimizing SVG filesimagemin-webpack-plugin
for compress images in productionprettier
eslint
husky
ie >= 11
The entry point of each page is set in the file:
pages.config.js
-
pug
The path has resolved in
./src
folder.require('blocks/item/file.ext')
-
scss
The path has resolved in current folder of
__ITEM__
in(layouts|pages|blocks)
.require('./file.ext')
Put all image files in (layouts|pages|blocks)/__ITEM__/(
images/)?*.(png|jpe?g)
Put files in (layouts|pages|blocks)/__ITEM__/
sprite/*.svg
-
pug
//- +svg-sprite(file, width, height, fill, stroke) +svg-sprite(require('blocks/footer/sprite/place.svg'), 20, 20)
Put files in (layouts|pages|blocks)/__ITEM__/(
images/)?*.svg
-
pug
img(src=require('blocks/logo/logo.svg') //- or img(src=require('blocks/logo/images/logo.svg')
-
scss
background-image: url('./logo.svg') background-image: url('./images/logo.svg')
Put files in (layouts|pages|blocks)/__ITEM__/
inline/*.svg
-
pug
//- svg-inline(content, width, height, fill, stroke) +svg-inline(require('blocks/menu/inline/file.svg'), 20, 20)