• Stars
    star
    431
  • Rank 97,667 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Set of front-end tools for Magento 2 based on Gulp.js

Packagist Packagist

Magento 2 Frontools

Set of front-end tools for Magento 2

Requirements

Installation

  1. Run composer require snowdog/frontools
  2. Go to package directory cd vendor/snowdog/frontools
  3. Run yarn or npm install
  4. Decide where you want to keep your config files. You can store them in Frontools config directory or in dev/tools/frontools/config (recommended). 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.
  5. Define your themes in themes.json.

themes.json structure

Check 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 structure

Check 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

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.

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 and inheritance, 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 magepack bundle command.
    • -c or --config - (required) Path to previously generated Magepack config file.
    • --theme name - Process single theme.
  • magepackGenerate - Run magepack generate 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 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 JS, SASS, CSS linting.
    • --disableMaps - Disable inline source maps generation.

More Repositories

1

magento2-theme-blank-sass

SASS based version of Magento 2 Blank theme
SCSS
383
star
2

magento2-menu

Provides powerful menu editor to replace category based menus in Magento 2
JavaScript
279
star
3

magento2-alpaca-theme

Magento 2 theme built on top of Alpaca design system crafted for ecommerce
HTML
200
star
4

magento2-vue-checkout

Magento 2 Checkout module based on Vue.js
Vue
69
star
5

wombat

Flat file headless CMS for building configurable API
JavaScript
62
star
6

magento2-alpaca-components

Components library of Alpaca design system crafted for ecommerce
JavaScript
46
star
7

magento2-cms-api

Custom CMS API endpoints which retrieves CMS pages and blocks filtered
PHP
31
star
8

vuepress-plugin-pdf-export

Vuepress plugin for exporting as PDF without system wide dependencies suitable for headless environments
JavaScript
29
star
9

Wander

Open-source repository for iOS app that makes city travel simple.
Swift
24
star
10

alpaca-ui

Components library of Alpaca design system crafted for ecommerce
JavaScript
19
star
11

SDForms

iOS
Objective-C
17
star
12

magento2-pl_pl

Polish locale package for Magento 2
PHP
17
star
13

DateKit

Operate on NSDate and its components easily in Swift
Swift
16
star
14

magento2-theme-performance

Demo theme with various front-end performance optimization tricks applied
CSS
16
star
15

Material-Flexible-Space-Header

Java
15
star
16

module-product-custom-description

Snowdog Product Custom Description Tab for Magento 2
PHP
14
star
17

pigeon

Simple open-source serverless API for sending emails and building forms effortlessly
JavaScript
14
star
18

Magento-Translation-pl_PL

Polish translation files for Magento CE
HTML
13
star
19

create-alpaca-theme

Quickly create Magento 2 Child Theme based on Snowdog Alpaca Theme
JavaScript
7
star
20

snowpack-vue-svg-plugin

A Snowpack plugin to import SVG files like Vue components
JavaScript
6
star
21

magento2-category-attributes

PHP
5
star
22

DataBindingSample

Sample app shows how to use Data Binding in Android.
Java
5
star
23

sirp

Python
5
star
24

magento2-product-attribute-description

PHP
4
star
25

DynamicComponentsKit

iOS
Objective-C
4
star
26

Snowdog_PayU

Magento payment method for PayU.pl
PHP
4
star
27

a11y-audit-tool

Bootstrap project to easily run and develop a11y audits.
SCSS
4
star
28

magento2-alpaca-packages

3
star
29

front-end-recruitment-test

Snowdog Front-end recruitment test task
TypeScript
3
star
30

Snowdog_Comparers

Magento extension that allows You to create product feeds for product comparision services.
PHP
3
star
31

magento2-wishlist-unlocker

PHP
3
star
32

MoeSampleApp

Java
3
star
33

FirstItemFree

Discount for first n items in cart
PHP
2
star
34

magento2-breadcrumbs-fix

PHP
2
star
35

ajaxbutton

How to use ajax in magento.
PHP
2
star
36

magewire-examples

Magento2 module with Magewire Examples
PHP
2
star
37

Hyva-Checkout-PayPo

Hyvä Magewire Checkout compatibility module for paypo/module-paypo-payment
PHP
2
star
38

aniolstudentauep

Students Angel of UEP - app developed during 24 hours NeedApp Hackaton by Snowdog Android Team
Java
2
star
39

sirp-research

Jupyter Notebook
1
star
40

magento2-module-csp

PHP
1
star
41

magento2-shipping-latency

PHP
1
star
42

python-recruitment-test

1
star
43

solrgc

1
star
44

magento2-bullet-points

PHP
1
star
45

Project-Needs-Partner

Objective-C
1
star
46

AndroidAnnotations-Sample-App

Java
1
star
47

magento2-alpaca-store-demo

1
star
48

devops-recruitment-test

This repository contains recruitment test for DevOps.
1
star
49

hackyeah-2020

App created during the HackYeah 2020
Vue
1
star
50

magento2-alpaca-acm

HTML
1
star
51

Snowdog_Error404tools

Snowdog 404 Log Tools
PHP
1
star
52

Academy-v2

PHP
1
star
53

Hyva-Checkout-TPay

Hyvä Magewire Checkout compatybility module for tpaycom/magento2basic
HTML
1
star
54

Hyva-Checkout-Santander

Hyvä Magewire Checkout compatibility module for aurora/module-santander
PHP
1
star
55

Hyva-Checkout-Inpost

Hyvä Magewire Checkout compatibility module for smartmage/module-inpost-paczkomaty
HTML
1
star
56

Hyva-Checkout-PayU

Hyvä Magewire Checkout compatibility module for payu/magento24-payment-gateway
HTML
1
star
57

Hyva-Checkout-DHL24PL

Hyvä Magewire Checkout compatybility module for DHL_Dhl24pl
HTML
1
star
58

Magento-alternate-links

Improved SEO for international Magento stores with inclusion of 'alternate' links to the Magento head. Choose either language only, or language and region for your hreflang format via the Magento admin.
PHP
1
star