| description | Quick Start using Gulp for Datta Able Installation |
|---|
Navigate to your root folder (i.e. datta-able-vanilla-js)
c:>cd datta-able-vanilla-js
Install packages by npm or yarn according to your preferences. Here we are using the npm package manager.
> npm i
After package installation, you can start your app by using Gulp command. This will regenerate the dist folder. You can keep this command running while making changes in the src folder. It will auto-apply to the dist folder and your browser.
> gulp
{% hint style="info" %} If you are interested more in learning about gulp, check the below section, else you can skip it. {% endhint %}
Gulp
Gulp is a toolkit for automating painful or time-consuming tasks in your project development workflow, so you can stop messing around and build something easier than ever.
- Auto Minify/Uglify CSS, HTML, and JS codes
- Auto Compile SaSS file
- 3000+ Plugins
Use Gulp in Datta able for building different layouts and theme customization with lots of functional tasks like Image Optimization, SaSS compilation, etc...which useful to make the production-ready dist/directory
Use Gulp in Datta Able is for building different layouts and theme customization with lots of functional tasks like Image Optimization, SaSS compilation, etc...which really useful to make the production-ready dist/directory
- Make sure that you have already installed Nodejs and Gulp on your server/computer
- Open the "Nodejs Command prompt" and redirect to your project root directory.
- Enter the command
npm installoryarnin the command prompt. - After that, you need to run the below
gulptasks to build a production-ready dist/ directory.
| Gulp Command | Description |
|---|---|
gulp | which build template in /dist directory |
| Gulp Command | Description |
|---|---|
gulp sass | which compile .scss files from /src/assets/scss directory and place it into a /dist/assets/css directory |
gulp imgmin | which use to optimize images from /src/assets/images directory and place it into a /dist/assets/images directory |
gulp build | which use to copy files from /src/assets directory and place it into a /dist/assets directory |
gulp build-html | which uses compiling your HTML file from /src/html directory and place it into a /dist directory |
gulp build-js | which use to build .js files from /src/assets/js directory and place it into a /dist/assets/js directory |
gulp watch | It will automatically start your build process if you make any changes in HTML, scss or js files from /src directory and put new changes to /dist directory |
gulp watch-minify | It will automatically start your build process if you make any changes in HTML, scss or js files from /src directory and put new changes to /dist directory with minify assets |
\