Skip to content

Commit

Permalink
v7.21.0 - Updating to eslint v5 and eslint-config-fozzie v2 (#133)
Browse files Browse the repository at this point in the history
### Changed
- Package versions updated (including `gulp-gh-pages` after contacting package owner).
  • Loading branch information
ashleynolan authored Jul 13, 2018
1 parent 58ce166 commit 0d4566d
Show file tree
Hide file tree
Showing 19 changed files with 1,191 additions and 845 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

v7.21.0
------------------------------
*July 13, 2018*

### Changed
- Package versions updated (including `gulp-gh-pages` after contacting package owner).
- Updated to v2 of `eslint-config-fozzie`
- Quoted glob pattern in `scripts lint` config, as was picking up package names such as `asn1.js` incorrectly for linting.

### Fixed
- New eslint config updates reflected in `--fix` of task js files


v7.20.1
------------------------------
*July 10, 2018*
Expand Down
5 changes: 3 additions & 2 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const consumingPackageConfig = require(`${process.cwd()}/package.json`); // esli


const ConfigOptions = () => {

const isProduction = !!gutil.env.prod;
const isDev = !isProduction;
const envLog = isProduction ? 'production' : 'development';
Expand Down Expand Up @@ -158,7 +157,9 @@ const ConfigOptions = () => {
* status,file,line,column,message,formatted,messageFormatted,messageOriginal,relativePath,name,stack,showStack,showProperties,plugin
*/
onError (err) {
const { line, column, relativePath, plugin, message } = err;
const {
line, column, relativePath, plugin, message
} = err;

gutil.beep();
gutil.log(gutil.colors.red.bold('-----------------------------------------------------------------------'));
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const config = require('./config');
const pathBuilder = require('./pathBuilder');

const build = (srcGulp, options) => {

if (options) {
// Update config & pathBuilder with custom values — these values will
// persist across all further requires in other files.
Expand Down
25 changes: 11 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@justeat/gulp-build-fozzie",
"version": "7.20.1",
"version": "7.21.0",
"description": "Gulp build tasks for use across Fozzie modules",
"main": "index.js",
"author": "Damian Mullins <[email protected]> (http://www.damianmullins.com)",
Expand All @@ -21,13 +21,13 @@
"test": "jest",
"test:cover": "jest --coverage",
"test:cover:CI": "cat coverage/lcov.info | coveralls",
"lint": "eslint **/*.js --fix",
"lint": "eslint '**/*.js' --fix",
"release-patch": "release-it patch --non-interactive -p",
"release-minor": "release-it minor --non-interactive -p",
"release-major": "release-it major --non-interactive -p"
},
"dependencies": {
"@justeat/eslint-config-fozzie": "^1.4.0",
"@justeat/eslint-config-fozzie": "^2.0.1",
"@justeat/f-copy-assets": "^0.6.0",
"@justeat/f-templates-loader": "0.0.4",
"@justeat/stylelint-config-fozzie": "^2.0.1",
Expand All @@ -36,9 +36,9 @@
"babelify": "^8.0.0",
"browser-sync": "^2.23.6",
"browserify": "^16.1.1",
"cssnano": "^3.10.0",
"cssnano": "^4.0.1",
"del": "^3.0.0",
"eslint": "^4.19.1",
"eslint": "^5.1.0",
"eslint-plugin-import": "^2.9.0",
"event-stream": "^3.3.4",
"exorcist": "^1.0.1",
Expand All @@ -48,19 +48,19 @@
"gulp-cached": "^1.1.1",
"gulp-changed": "^3.2.0",
"gulp-clone": "^2.0.1",
"gulp-eslint": "^4.0.2",
"gulp-eslint": "^5.0.0",
"gulp-extname": "^0.2.2",
"gulp-file": "^0.4.0",
"gulp-filenames": "^4.0.1",
"gulp-gh-pages": "^0.5.4",
"gulp-gh-pages": "^0.6.0-1",
"gulp-if": "^2.0.2",
"gulp-imagemin": "^4.1.0",
"gulp-newer": "^1.4.0",
"gulp-plumber": "^1.2.0",
"gulp-postcss": "^7.0.1",
"gulp-rename": "^1.2.2",
"gulp-rev": "^8.1.1",
"gulp-sass": "^3.1.0",
"gulp-sass": "^4.0.1",
"gulp-sass-variables": "^1.1.1",
"gulp-size": "^3.0.0",
"gulp-sourcemaps": "^2.6.4",
Expand All @@ -74,30 +74,27 @@
"handlebars-helpers": "^0.10.0",
"helper-markdown": "^1.0.0",
"helper-md": "^0.2.2",
"jest-cli": "^22.4.3",
"jest-cli": "^23.4.0",
"merge-stream": "^1.0.1",
"postcss-assets": "^5.0.0",
"postcss-reporter": "^5.0.0",
"postcss-scss": "^1.0.4",
"require-dir": "^1.0.0",
"run-sequence": "^2.2.1",
"stylelint": "^9.1.3",
"stylelint-scss": "^2.5.0",
"stylelint-scss": "^3.1.3",
"sw-precache": "^5.2.1",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0"
},
"devDependencies": {
"concurrently": "^3.5.1",
"coveralls": "^3.0.0",
"danger": "3.3.2",
"danger": "3.7.20",
"lodash.clonedeep": "^4.5.0",
"release-it": "^7.2.1"
},
"peerDependencies": {
"gulp": "^3.9.1"
},
"resolutions": {
"gulp-gh-pages/gift": "0.10.2"
}
}
2 changes: 0 additions & 2 deletions pathBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ const baseConfig = require('./config');


const buildPaths = config => {

const docsSrcDir = `${config.docs.rootDir}/${config.docs.srcDir}`;
const docsDistDir = `${config.docs.rootDir}/${config.docs.distDir}`;
const docsAssetsDistDir = `${docsDistDir}/${config.docs.assetDir}`;
Expand Down Expand Up @@ -39,7 +38,6 @@ const buildPaths = config => {
};

const pathBuilder = () => {

let paths = buildPaths(baseConfig);

paths.update = config => {
Expand Down
2 changes: 0 additions & 2 deletions tasks-dev/assemble.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Object.keys(config.docs.helpers).forEach(helper => {
*
*/
gulp.task('assemble', () => {

app.enable('debugEngine');
app.layouts(`${pathBuilder.docsTemplateDir}/layouts/*.{md,hbs}`);
app.partials(`${pathBuilder.docsTemplateDir}/includes/**/*.{md,hbs}`);
Expand Down Expand Up @@ -75,5 +74,4 @@ gulp.task('assemble', () => {
.pipe(app.renderFile())
.pipe(extname())
.pipe(app.dest(pathBuilder.docsDistDir));

});
4 changes: 0 additions & 4 deletions tasks-dev/browser-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const pathBuilder = require('../pathBuilder');
*
*/
gulp.task('browser-sync', ['watch'], () => {

const options = {
files: [
`./${pathBuilder.cssDistDir}/**/*.css`,
Expand All @@ -24,7 +23,6 @@ gulp.task('browser-sync', ['watch'], () => {
};

browserSync.init(options);

});


Expand All @@ -35,7 +33,6 @@ gulp.task('browser-sync', ['watch'], () => {
*
*/
gulp.task('browser-sync:docs', ['assemble'], () => {

// TODO : SORT OUT PATHS AS NOT WORKING ON INTERNATIONAL CONSUMERWEB PROPERLY
const options = {
files: [
Expand All @@ -53,5 +50,4 @@ gulp.task('browser-sync:docs', ['assemble'], () => {
};

browserSync.init(options);

});
6 changes: 1 addition & 5 deletions tasks-dev/docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const pathBuilder = require('../pathBuilder');
*
*/
gulp.task('docs', callback => {

config.docs.outputAssets = true;

runSequence(
Expand All @@ -34,7 +33,6 @@ gulp.task('docs', callback => {
*
*/
gulp.task('docs:deploy', callback => {

config.isProduction = true;
config.docs.outputAssets = true;

Expand All @@ -44,7 +42,6 @@ gulp.task('docs:deploy', callback => {
'docs:release',
callback
);

});


Expand All @@ -57,5 +54,4 @@ gulp.task('docs:deploy', callback => {
gulp.task('docs:release', () => gulp.src(`${pathBuilder.docsDistDir}/**/*`)
.pipe(ghPages({
message: `Minor : Documentation Update ${new Date().toISOString()}`
}))
);
})));
16 changes: 4 additions & 12 deletions tasks/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ const pathBuilder = require('../pathBuilder');
* Removes all files from the CSS dist directory.
*
*/
gulp.task('clean:css', () => del(
`${pathBuilder.cssDistDir}/**/*`)
);
gulp.task('clean:css', () => del(`${pathBuilder.cssDistDir}/**/*`));


/**
Expand All @@ -21,9 +19,7 @@ gulp.task('clean:css', () => del(
* Removes all files from the JavaScript dist directory.
*
*/
gulp.task('clean:scripts', () => del(
`${pathBuilder.jsDistDir}/**/*`)
);
gulp.task('clean:scripts', () => del(`${pathBuilder.jsDistDir}/**/*`));


/**
Expand All @@ -32,9 +28,7 @@ gulp.task('clean:scripts', () => del(
* Removes all images from the images dist directory.
*
*/
gulp.task('clean:images', () => del(
`${pathBuilder.imgDistDir}/**/*`)
);
gulp.task('clean:images', () => del(`${pathBuilder.imgDistDir}/**/*`));


/**
Expand All @@ -43,6 +37,4 @@ gulp.task('clean:images', () => del(
* Removes all files from the docs dist directory.
*
*/
gulp.task('clean:docs', () => del(
[`${pathBuilder.docsDistDir}/**/*`])
);
gulp.task('clean:docs', () => del([`${pathBuilder.docsDistDir}/**/*`]));
27 changes: 12 additions & 15 deletions tasks/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const pathBuilder = require('../pathBuilder');


const copy = fileType => {

Object.keys(config.copy[fileType]).forEach(assetId => {
const asset = config.copy[fileType][assetId];
const fileTypeCapitalised = fileType.charAt(0).toUpperCase() + fileType.slice(1);
Expand All @@ -21,20 +20,21 @@ const copy = fileType => {
const assetDocsDist = pathBuilder[`docs${fileTypeCapitalised}DistDir`] + dest;

if (asset.path !== undefined) {

gutil.log(`❯❯ Copying ${assetSrc} to ${assetDist} ${config.docs.outputAssets ? `and ${assetDocsDist}` : ''}`);

gulp.src(assetSrc)
.pipe(plumber(config.gulp.onError))

.pipe(gulpif(asset.revision,
.pipe(gulpif(
asset.revision,
rev()
))

.pipe(gulp.dest(assetDist))

// output to docs assets folder
.pipe(gulpif(config.docs.outputAssets,
.pipe(gulpif(
config.docs.outputAssets,
gulp.dest(assetDocsDist)
));
} else {
Expand Down Expand Up @@ -81,8 +81,7 @@ gulp.task('copy:img', () => {
*/
gulp.task('copy:img:docs', () => gulp.src(`${pathBuilder.imgDistDir}/**/*`)
.pipe(plumber(config.gulp.onError))
.pipe(gulp.dest(pathBuilder.docsImgDistDir))
);
.pipe(gulp.dest(pathBuilder.docsImgDistDir)));

/**
* `copy:fonts` Task
Expand Down Expand Up @@ -110,12 +109,10 @@ gulp.task('copy:docs', () => {
* Copy assets from from packages to the dist folder.
*
*/
gulp.task('copy:assets', () =>
copyAssets({
pkgSrcGlob: config.importedAssets.importedAssetsSrcGlob,
dest: config.assetDistDir,
verbose: config.importedAssets.verbose,
logger: gutil.log
})
.catch(config.gulp.onError)
);
gulp.task('copy:assets', () => copyAssets({
pkgSrcGlob: config.importedAssets.importedAssetsSrcGlob,
dest: config.assetDistDir,
verbose: config.importedAssets.verbose,
logger: gutil.log
})
.catch(config.gulp.onError));
Loading

0 comments on commit 0d4566d

Please sign in to comment.