Getting Started
Our project utilizes gulp for complete build flow automation. Several tools must be installed in your work environment.
Check for node, npm, and npx:
Ensure Node.js is installed on your computer by using the CLI:
node --version
npm --version
npx --version
We recommend using Node.js version 16 or higher. If not installed, follow these installation instructions.
Check for Gulp CLI Utility:
Confirm Gulp is installed on your computer:
gulp --version
If not installed, run:
npm install --global gulp-cli
Gulp is essential for automatically compiling SCSS files to .css and twig templates to .html. Learn more about it here.
Check for Sass Compiler:
Verify Sass compiler installation:
sass --version
If absent, install with:
npm install -g sass
The package.json file lists necessary dependencies.
Vendora Twig-version setup depends on two primary Gulp projects: HTML-Twig and SRC-Assets, each with its own package.json file.
Navigate to Vendora's HTML-Twig project directory:
cd your-vendora-project-directory-name/HTML-Twig/
Install dependencies:
npm install
Then navigate to Vendora's SRC-Assets project directory and install the dependencies:
cd your-vendora-project-directory-name/SRC-Assets/
npm install
This installs all dependencies into the node_modules folder.
The gulpfile.js contains functions registered in gulp's task system.
To run SRC-Assets automation, execute:
cd your-vendora-project-directory-name/SRC-Assets/
gulp
This compiles assets files (JavaScript, sass, libraries, images, etc.) from SRC-Assets into HTML-Twig/dist/[theme-name]/assets/ and watches for code changes.
We recommend making changes in /src/scss/custom.scss rather than overwriting any theme's custom SCSS files. This ensures safer updates without affecting your SCSS modifications.
To run HTML-Twig automation, execute:
cd your-vendora-project-directory-name/HTML-Twig/
gulp
This compiles Twig files to HTML files, starts the development server, and watches for code changes.
The server is at http://localhost:3000 (port may vary).