0.4.1 • Published 7 years ago
qgulp v0.4.1
QGulp
A gulp based build process for wordpress
Installation
- run
npx qgulpin your project root folder. This will install npm packages and config files. - rename
.qgulprc-sample.jsto.qgulprc.jsand edit it - run
npm run serveto start watching and building files
Configuration
.qgulprc.js
- edit paths for distribution, source, and watch files
- the
copyandvendorFilesobjects are set as key (destination) : value (source) pairs - optional edit
browserSyncobject anduseBrowsersyncto setup browsersync as default watcher useMinOnlyOnBuildwon't create extra.minfiles on production.- change
isWordpressThemeto false if you are not developing a Wordpress Theme - edit
ftpOptionsand the.qgulprc-ftp.jsto setup deployment via ftp - edit the
deployDestinationobject to set remote paths for different environments - edit
deployTasksto set detailed deployment tasks. Simply add a new object. eg:theme: { '/remote/path/to/theme': ['local/path/to/theme/**/*.*'] }
gulpfile.babel.js
- should contain
require('./qgulp/index')(require('gulp'));
Usage
You can run the following tasks from installed package.json. These include the core functionality for developing with qgulp.
npm run startstarts the default gulp task which compiles the files in development mode and start the watchernpm run watchstarts the watchernpm run devcompiles files in development modenpm run distcompiles files for productionnpm run buildalias fornpm run distnpm run deploydeploys files via ftp to production server
gulp tasks
Otherwise use the following gulp tasks directly.
gulpthe default task, runsdevand thenwatch
core gulp tasks
gulp clearremoves processed files to start freshgulp csscompiles scss files for developmentgulp css:wpchanges version in Wordpress stylesheet style.cssgulp jscompiles js files for developmentgulp js:vendorcompiles js vendor files for productiongulp imagesprocesses image files for productiongulp copycopies files without processing to distribution foldergulp copy:vendorcopies files from vendor folders to source folder. Use this to fetch vendor files, for example from npm packages, to use in your source files.
watchers
gulp watch:livereloadstarts watching with livereloadgulp watch:browsersyncstarts watching with browsersyncgulp watchstarts watcher based on config setting
version bumps and build
gulp bump:patchpatch version update in package.jsongulp bump:minorminor version update in package.jsongulp bump:majormajor version update in package.jsongulp bumpalias forgulp bump:patchgulp devcompiles files in development modegulp dev --productioncompiles files for productiongulp distalias forgulp dev --productiongulp buildalias forgulp dev --production
deployment
gulp ftpdeploy files to preview servergulp ftp --productiondeploy files to production servergulp ftp:XXdeploys files defined in deploy config
Conventions
Distribution files are bundled in subfolders: img, css and js for their respective file types.
Changelog
0.4.0
- added js:vendor as seperate task and packaged file
- added production environment
- changed some gulp task names
- changed config
0.3.0
- added readme
- added version checks in config
- changed config file names to dotfiles
0.2.0
- added ftp tasks
- updated configs
0.1.0
- initial npm test with core tasks
0.4.1
7 years ago
0.4.0
7 years ago
0.3.1
7 years ago
0.3.0
7 years ago
0.1.0
7 years ago
0.0.1-alpha.2
7 years ago
0.0.1-alpha.1
7 years ago
0.0.1-alpha.0
7 years ago