0.0.7 • Published 4 years ago

fronty-gul v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

FrontyGul Plugin

This is a plugin to Front-End development. You can work with scss/sass, pug, html, js (ES, import/export/modules) and minify files.

npm install fronty-gul --save-dev

After install, create gulpfile.js file and follow the steps

OBS:

If you want transpile Javascript, you need to create a file in your project named: .babelrc (same dir as gulpfile.js) with content: { "presets": "@babel/env" } React: { "presets": "@babel/preset-react", "@babel/preset-env" }

Require module:

var FrontyGul = require("fronty-gul");

Define a project object using Fronty:

var project = new FrontyGul();

Now it's time to set up our settings. The Fronty can work with:

  • js
  • scss/sass
  • html
  • pug

Follow code to help with set up:

project.start({
    fileType: "js",
    files: ["./src/script.js"], // or can be ["./src/home.js", "./src/header.js", "./src/ajax.js"]
    transpile: true,
    minify: false,
    debug: false,
    watch: true,
    watchPath: "./src/**/*.js", // Will execute the build function in onchange of all files path set
    destination: "./dist/"
});

var project = new Fronty();
project.start({
    fileType: "scss",
    files: ["./src/style.scss"], // or can be ["./src/home.scss", "./src/geral.scss"]
    minify: true,
    watch: true,
    watchPath: "./src/**/*.scss",
    destination: "./dist/"
});

project.start({
    fileType: "pug",
    files: ["./src/teste.pug"], // or can be ["./src/home.pug", "./src/header.pug"]
    minify: true,
    watch: true,
    watchPath: "./src/**/*.pug",
    destination: "./dist/"
});

project.start({
    fileType: "html",
    files: ["./src/index.html"], // or can be ["./src/home.html", "./src/header.html"]
    minify: true,
    watch: true,
    watchPath: "./src/**/*.html",
    destination: "./dist/"
});