Building tools are an important part of all developer toolkits, and you can focus on efficient development without being limited by small details that might distract you from your current code. One of these popular build tools is Gront. We looked at how to use gulp for recent WordPress development. Gulp is an ideal tool for optimizing theme images, connecting JS files, and automatically processing sass\/less code. Gront is similar to gulp, but there are some differences. This post describes the features provided by Gront, how to use it, and how it differs from gulp. The
Introduction to the build tool the build tool is basically an automated tool that can perform small tasks quickly and easily. You can create a file in multiple files, convert documents written in markdown to HTML, and perform any other type of clean operation. Recently, gulp article introduced two different methods of building systems, configuring files, and using some other default projects. It is recommended that you read this post before continuing. Apart from grammar, gulp and Gront share the same basic principles and philosophy. Like starting gulp, running gulp requires a node. If it is not convenient, nodejs. Navigate to org and import the installer. Node will be installed together with NPM (node package manager), which can be used to install node packages (such as Gront). The
Next, you will install grount globally. Open a terminal or command prompt on windows (both will be called terminals from now on), and then run the following command to do this: Load the summary 65e0766134f875fe0553, followed by package. JSON and grountfile. You must create two JS files. Standard node package file package. Start with JSON. We will only add some information. For details, see the NPM documentation. The load summary 65e0766134f875fe0553 package file specifies the package name and provides the version number. What we are really looking for here is the devdependencies section. It lists all the dependencies we will use. Now all you need is Gront itself. More will be added soon! The
Gruntfile JS is similar to gulpfile in gulp. Tell Grint what to do and what commands to respond to. The load summary 65e0766134f875fe0553 initconfig() function is the place to create all work contents. Then register the task below to tell grunt what task to execute when issuing a specific command. Now we have created an empty default task. The task generation method is similar to the tasks executed in gulp. Start with sass, as gulpfile did in other posts, including package installation packages. Install the package first. The
The loading summary 65e0766134f875fe0553 is followed by the grountfile. The module grountfile is required. Loading summary 65e0766134f875fe0553 is complete! Now you can create an operation that converts sass to CSS. The complete code containing the description below is as follows: The first task of loading the summary 65e0766134f875fe0553 is to include the modules visible directly above the initconfig() function. An operation named sass is deployed in this function. Option tells Grint the current working directory (CWD), the source file to process, the target directory, and the file extension. The
Finally, a task that runs as the default command is added. When running grunt on the terminal, styles\/styles. Process SCSS and default