Name: land-registry-gulp-tasks
Owner: HM Land Registry
Description: null
Created: 2017-03-17 09:07:26.0
Updated: 2017-03-17 09:09:12.0
Pushed: 2018-02-02 14:30:08.0
Homepage: null
Size: 87
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
These Gulp tasks are designed primarily to be used by those consuming GOV.UK and land-registry-elements assets. However the bits of code specific to these are relatively innocuous and so these Gulp tasks could be used by non GOV.UK apps as well.
gulp = require('gulp')
landRegistryGulpTasks = require('land-registry-gulp-tasks')
path = require('path')
config = {
pplicationPath': './app', // Path on disk to the main application folder
ourcePath': './app/assets/src', // Path where the assets are located
estinationPath': './app/assets/dist', // Path where the built assets should be written
assPath': 'scss/*.scss', // Path to the sass within the sourcePath
assIncludePaths': [ // Additional search paths for node-sass
path.join(path.dirname(require.resolve('land-registry-elements/README.md')), 'src')
rowsersyncPort': 3000, // Port to run the browsersync proxy on (Defaults to 3000)
ocalhost': 'localhost:8080' // URL pointing to the running application. This is used by browserSync to create a live-reload proxy,
intingPaths': [
// Array of path glob patterns to add to the linting
// Most useful for *ignoring* certain paths by prefixing with an !
// For example !bin/**
egister all the gulp tasks provided by the land registry module
f you don't want to do this, you could opt not to register some of the tasks
lso, if you want more tasks than this, you are free to use the gulp variable
nd register custom tasks below
(var task in landRegistryGulpTasks) {
ndRegistryGulpTasks[task](gulp, config)
rab reference to watch task registered from land-registry-gulp -tasks
existingWatch = gulp.tasks.watch.fn
verride the watch task with our own custom one
.task('watch', function () {
lp.watch(path.join('src/**/*.scss'), ['sass', 'sass-lint'])
lp.watch(path.join('src/**/*.js'), ['js', 'standardjs'])
Call the previous one from land-registry-gulp-tasks
istingWatch()