mooore / frontools
Set of front-end tools for Magento 2, based on Gulp.js
Installs: 16 624
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 142
Language:JavaScript
Type:magento2-component
- dev-master
- 1.15.0
- 1.14.0
- 1.13.0
- 1.12.2
- 1.12.1
- 1.12.0
- 1.11.0
- 1.10.1
- 1.10.0
- 1.9.0
- 1.8.2
- 1.8.1
- 1.8.0
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.0
- 1.5.16
- 1.5.15
- 1.5.14
- 1.5.13
- 1.5.12
- 1.5.11
- 1.5.10
- 1.5.9
- 1.5.8
- 1.5.7
- 1.5.6
- 1.5.5
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.4.0
- 1.3.10
- 1.3.9
- 1.3.8
- 1.3.7
- 1.3.6
- 1.3.5
- 1.3.4
- 1.3.3
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.0
- 0.11.4
- 0.11.3
- 0.11.2
- 0.11.1
- 0.11.0
- 0.10.0
- 0.9.3
- 0.9.2
- 0.9.1
- 0.9.0
- 0.8.2
- 0.8.1
- 0.8.0
- 0.7.2
- 0.7.1
- 0.7.0
- 0.6.1
- 0.6.0
- 0.5.3
- 0.5.2
- 0.5.0
- 0.4.1
- 0.4.0
- 0.3.1
- 0.3.0
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.0
- dev-feature/update-nodesass
- dev-snyk-upgrade-ac1be3db4155f5f32d142a725dc14f49
- dev-snyk-upgrade-ce9dfc1e0ada48dc88133631cfabbe4e
- dev-snyk-upgrade-9dcda585a85bea2f06cecbfb3d7a864d
- dev-snyk-upgrade-055348caf4145c737140d946a5d63133
- dev-snyk-upgrade-ac2e7d9b9822af6ac729f040bdb58fa4
- dev-snyk-upgrade-c8bc4270d1267dd109d77b8bc3f0855d
- dev-snyk-upgrade-5d34b85ce841f076ea0639ddcf806f36
- dev-snyk-upgrade-4a6e84d75c899b4be7c32416f2c7ee5e
- dev-snyk-upgrade-7495a4d0d44bee22924c8a394ec26550
- dev-snyk-upgrade-57ebe708fd6005120dcbb7eb910052da
- dev-snyk-upgrade-627e3d83d504148a7ebf88e4e7db0f12
This package is auto-updated.
Last update: 2024-11-19 13:09:42 UTC
README
Note This a fork of the SnowdogApps/magento2-frontools, This fork will only contain updates, we are not adding any new features!
This fork is only to support newer versions of NodeJS
Magento 2 Frontools
Set of front-end tools for Magento 2
Requirements
- Unix-like OS (please, do not ask about Windows support)
- Node.js LTS version. We recommend using nvm-sh.
- Magento 2 project with SASS based theme for example SASS version of "Blank"
Installation
- Run
composer require mooore/frontools
- Go to package directory
cd vendor/mooore/frontools
- Run
npm install
oryarn
- Decide where you want to keep your config files.
You can store them in Frontools
config
directory or indev/tools/frontools/config
(recommended). There is asetup
task to copy all sample config files from theconfig
todev/tools/frontools/config
and create a convenient symlinktools
in the project root. If you want to keep config files inside frontoolsconfig
dir, you have to handle this manually. - Define your themes in
themes.json
.
themes.json
structure
Check config/themes.json.sample
to get samples.
src
- full path to themedest
- full path topub/static/[theme_area]/[theme_vendor]/[theme_name]
locale
- array of available localesparent
- name of parent themestylesDir
- (defaultstyles
) path to styles directory. Fortheme-blank-sass
it'sstyles
. By default Magento 2 useweb/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 themeignore
- array of ignore patterns
watcher.json
structure
Check config/watcher.json.sample
to get samples.
usePolling
- set this totrue
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
sass-compiler.json
structure
You can choose Sass compiler between the default, but already deprecated, node-sass
or a newer and faster dart-sass
.
Since the Dart Sass does not have the same set of features as Node Sass, for now we will keep the older version as default.
Optional configurations for 3rd party plugins
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
Tasks list
Use yarn [taskName]
or npm run [taskName]
to run the task.
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.
dev
- Runs browserSync andinheritance
,babel
,styles
,watch
tasks.--theme name
- Process single theme.--disableLinting
- Disable JS, SASS, 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.--fix
- Autofix errors--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.magepackBundle
- Run magepackbundle
command.-c
or--config
- (required) Path to previously generated Magepack config file.--theme name
- Process single theme.
magepackGenerate
- Run magepackgenerate
command.--cms-url
- (required) URL to one of CMS pages (e.g. homepage).--category-url
- (required) URL to one of category pages.--product-url
- (required) URL to one of product pages.-u
or--auth-username
- Username for Basic Auth.-p
or--auth-password
- Passoword for Basic Auth.-d
or--debug
- Turn on debugging mode.
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 usetools
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 JS, SASS, CSS linting.--disableMaps
- Disable inline source maps generation.