web-project-template - is the free task manager for web projects, based on gulp. Used just one node_modules folder for all projects
Read documentation in other languages:
Документация на русском
Open gulp forder in terminal and enter the commands
sudo yarn add gulp -g
sudo yarn add browser-sync -g
sudo yarn install
-- gulp
|- projects
|-projectName1
|- .gitignore
|- assets
|- src
|- documents
|- es
| vendors -> *.js
| *.js
|- fonts
|- images
|- {less, sass}
| vendors -> *.css
| {*.less, *.sass}
|- pug -> *.pug
|- *.html
|- gulpConfig.js
|- package.json
|- videos
|-projectName2gulp- folder withgulpfile.jsandnode_modulesfolder;projects- folder includes folder with all projects using gulpfile formgulpproject (key for changeprojectsto other foler - '--folder=anyOtherFolderYouWant'. Example see next);projectName1,projectName2- folder with websites (key for useprojectsto other foler - '--project=youProjectName'. Example see next);assets- folder with psd files and others, which don't uploaded on git repository;src- source (not compilled and not minified) files;documents- folder with document like agreements and etc;es- folder with *.js files;fonts- folder with font files and css files for them. (if sourcePath in gulpConfig.js is'/', name of css file with @font-face must contains '-light.css'(for exalmpe:'Roboto-light.css'), else name must contains'-bitrix.css'). For example watch/projects/project.example/src/fonts/Roboto;less- folder with *.less files;sass- folder with *.sass files;vendors- folder with vendor files like scripts and stylespug- folder with *.pug files (for compilation in bitrix files watch gulpConfig.js paragraphdistType);.*html- html files of you project if you don't use pug;gulpConfig.js- configuration file of you project for gulp (description and example);package.json- configuration file of you project. Keep you scripts for gulp. (example see next);videos- folder for video files. Just using by gulp work if you havedevFolder;
example of gulpConfig.js
global.variables = {
isDevFolder: true,
sourcePath: '/local/templates/website/',
preprocessor: 'less',
distExtension: 'php',
distType: 'bitrix'
};command to run gulp task contains:
gulpword- name of gulp task. list of gulp tasks names
- key
--project=youProjectNamewith name of project. - key [optional]
--folder=newFolderWithProjectsto change path to project from'/projects'to'/newFolderWithProjects'
- for use command from terminal, change directory to
/gulpfolder - enter the command
for example run watch task for project.example folder
gulp dev --project=project.example- in scripts in package.json add field (with name for exaple
'dev') with value consist of--cwd,path to gulprelative package.json file andcommand\
example of package.json
{ "scripts": { "dev": "gulp dev --cwd ../../gulp/ --folder=projects --project=project.example" } }
- open the terminal, change directory to package.json folder and enter the command
npm run dev
example of all avaliable commands you can see in /projects/project.example/package.json
Changelog is available on Changelog documentation.
web-project-template is licensed WTFPL. You can use it for free and without any attribution, in any personal or commercial project. You may also fork the project and re-release it under another license you prefer.