0.4.1 • Published 6 years ago
qgulp v0.4.1
QGulp
A gulp based build process for wordpress
Installation
- run
npx qgulp
in your project root folder. This will install npm packages and config files. - rename
.qgulprc-sample.js
to.qgulprc.js
and edit it - run
npm run serve
to start watching and building files
Configuration
.qgulprc.js
- edit paths for distribution, source, and watch files
- the
copy
andvendorFiles
objects are set as key (destination) : value (source) pairs - optional edit
browserSync
object anduseBrowsersync
to setup browsersync as default watcher useMinOnlyOnBuild
won't create extra.min
files on production.- change
isWordpressTheme
to false if you are not developing a Wordpress Theme - edit
ftpOptions
and the.qgulprc-ftp.js
to setup deployment via ftp - edit the
deployDestination
object to set remote paths for different environments - edit
deployTasks
to 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 start
starts the default gulp task which compiles the files in development mode and start the watchernpm run watch
starts the watchernpm run dev
compiles files in development modenpm run dist
compiles files for productionnpm run build
alias fornpm run dist
npm run deploy
deploys files via ftp to production server
gulp tasks
Otherwise use the following gulp tasks directly.
gulp
the default task, runsdev
and thenwatch
core gulp tasks
gulp clear
removes processed files to start freshgulp css
compiles scss files for developmentgulp css:wp
changes version in Wordpress stylesheet style.cssgulp js
compiles js files for developmentgulp js:vendor
compiles js vendor files for productiongulp images
processes image files for productiongulp copy
copies files without processing to distribution foldergulp copy:vendor
copies 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:livereload
starts watching with livereloadgulp watch:browsersync
starts watching with browsersyncgulp watch
starts watcher based on config setting
version bumps and build
gulp bump:patch
patch version update in package.jsongulp bump:minor
minor version update in package.jsongulp bump:major
major version update in package.jsongulp bump
alias forgulp bump:patch
gulp dev
compiles files in development modegulp dev --production
compiles files for productiongulp dist
alias forgulp dev --production
gulp build
alias forgulp dev --production
deployment
gulp ftp
deploy files to preview servergulp ftp --production
deploy files to production servergulp ftp:XX
deploys 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
6 years ago
0.4.0
6 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