front-end-assistant is a gulp assistant for those are working on TFS and sass rtlcss.
npm install front-end-assistantbash
npm install front-end-assistant
`
Usage
`javascript
const utility = import(front - end - assistant);
var config = {
target: "front-end-assistant/Content/SASS/",
destnation: "front-end-assistant/Content/CSS/",
};
// for multiple files []
gulp.task("sass-all", function () {
return utility.sass(config, ["/.scss"]);
});
// for single file
gulp.task("sass-single", function () {
return utility.sass(config, "root.scss");
});
// for watching and update effected file only
gulp.task("watch-All", function () {
return gulp.watch([config.target + "/.scss"]).on("change", function (file) {
var fileName = utility.getFileName(file);
var pathTarget = file.replace(fileName, "").replace(/\\/g, "/");
var destTarget = pathTarget.replace("SASS", "CSS");
return utility.sass(destTarget, pathTarget, fileName);
});
});
`
Output
`bash
├───project
│ └───SASS
│ │ ├───Layout.scss
│ │ ├───Modules.scss
│ │ └───Templates.scss
/auto generated by front-end-assistant/
│ └───CSS
│ ├───Layout.css
│ ├───Modules.css
│ └───Templates.css
│
│ └───CSS-RTL
│ ├───Layout.css
│ ├───Modules.css
│ └───Templates.css
`
Configuration
Configuration can be set using one of the following method
- Use a special file ui.config.json.
`json
{
"options": {
"rtl": true,
"tfs": true,
"rtl_path": "-RTL/" /relative path to original 'config.destnation' path of css file /
}
}
``