Type
magento2-component
Set of front-end tools for Magento 2, based on Gulp.js
magento2-component
MIT
None
None
None
None
None
None
Set of front-end tools for Magento 2, based on Gulp.js
If you want to know more about this project, let's join Magento Community Engineering Slack and ask questions on #magefront channel.
.node-version
file.yarn global add gulp-cli
or npm install -g gulp-cli
composer require snowdog/frontools
cd vendor/snowdog/frontools
yarn
or npm install
config
directory or in dev/tools/frontools/config
.
There is a setup
task to copy all sample config files from the config
to dev/tools/frontools/config
and create a convenient symlink tools
in the project root.
If you want to keep config files inside frontools config
dir, you have to handle this manually.themes.json
.themes.json
structureCheck config/themes.json.sample
to get samples.
- src
- full path to theme
- dest
- full path to pub/static/[theme_area]/[theme_vendor]/[theme_name]
- locale
- array of available locales
- parent
- name of parent theme
- stylesDir
- (default styles
) path to styles directory. For theme-blank-sass
it's styles
. By default Magento 2 use web/css
.
- disableSuffix
- disable adding .min
suffix using --prod
flag.
- postcss
- (default ["autoprefixer({ overrideBrowserslist: browserslist })"]
) PostCSS plugins config. Have to be an array.
- modules
- list of modules witch you want to map inside your theme
- ignore
- array of ignore patterns
watcher.json
structureCheck config/watcher.json.sample
to get samples.
- usePolling
- set this to true
to successfully watch files over a network (i.e. Docker or Vagrant) or when your watcher dosen't work well. Warning, enabling this option may lead to high CPU utilization! chokidar docs
You will find sample config files for theses plugins in vendor/snowdog/frontools/config
directory.
* Create browserSync configuration
* Create eslint configuration
* Create sass-lint configuration
* Create stylelint configuration
* Create svg-sprite configuration
Please use yarn [taskName]
or npm run [taskName]
to avoid necessity of installing gulp-cli
globally.
* babel
- Run Babel, a compiler for writing next generation JavaScript.
* --theme name
- Process single theme.
* --prod
- Production output - minifies and uglyfy code.
* clean
- Removes /pub/static
directory content.
* csslint
- Run stylelint based tests.
* --theme name
- Process single theme.
* --ci
- Enable throwing errors. Useful in CI/CD pipelines.
* default
- type gulp
to see this readme in console.
* dev
- Runs browserSync and inheritance
, babel
, styles
, watch
tasks.
* --theme name
- Process single theme.
* --disableLinting
- Disable SASS and CSS linting.
* --disableMaps
- Disable inline source maps generation.
* emailfix
- Fixes email stylesheet for Magento < 2.3.0. Related issue
* --prod
- Production output - minifies styles and add .min
sufix.
* eslint
- Run eslint against all JS files.
* --theme name
- Process single theme.
* --ci
- Enable throwing errors. Useful in CI/CD pipelines.
* inheritance
- Create necessary symlinks to resolve theme styles inheritance and make the base for styles processing. You have to run in before styles compilation and after adding new files.
* sasslint
- Run sass-lint based tests.
* --theme name
- Process single theme.
* --ci
- Enable throwing errors. Useful in CI/CD pipelines.
* setup
- Creates a convenient symlink from /tools
to /vendor/snowdog/frontools
and copies all sample files if no configuration exists.
* --symlink name
- If you don't want to use tools
as the symlink you can specify another name.
* styles
- Use this task to manually trigger styles processing pipeline.
* --theme name
- Process single theme.
* --disableMaps
- Disable inline source maps generation.
* --prod
- Production output - minifies styles and add .min
suffix.
* --ci
- Enable throwing errors. Useful in CI/CD pipelines.
* svg
- Run svg-sprite to generate SVG sprite.
* --theme name
- Process single theme.
* watch
- Watch for style changes and run processing tasks.
* --theme name
- Process single theme.
* --disableLinting
- Disable SASS and CSS linting.
* --disableMaps
- Disable inline source maps generation.