Skip to content

Commit

Permalink
Removed Fractal, eslint, stylelint, livereload as they should not be …
Browse files Browse the repository at this point in the history
…installed in production. (#43)
  • Loading branch information
sun authored Oct 12, 2021
1 parent 18d849c commit a0813e5
Show file tree
Hide file tree
Showing 8 changed files with 17,891 additions and 30,336 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Commonly used Gulp tasks shared across projects.
- Image compression
- SVG icon sprite generation
- Inline SVG files
- Fractal server and build

## Installation

Expand All @@ -20,7 +19,7 @@ Commonly used Gulp tasks shared across projects.

## Available commands

- `gulp`: Default task runs (in order) `fractal:start`, `fonts`, `icons`, `images`, `styles`, `scripts` and then watches for changes
- `gulp`: Default task runs (in order) `fonts`, `icons`, `images`, `styles`, `scripts` and then watches for changes
- `gulp build`: Build assets (`fonts`, `icons`, `images`, `styles`, `scripts`)
- `gulp build:production`: Build production-ready assets

Expand All @@ -30,8 +29,6 @@ Commonly used Gulp tasks shared across projects.
- `gulp fonts`: Copy fonts to `/dist` folder
- `gulp icons`: Generate SVG icon sprite from folder of individual SVG icons
- `gulp images`: Image compression and inline SVG
- `gulp fractal:start`: Start Fractal server (if config path exists in `package.json`)
- `gulp fractal:build`: Build static version of Fractal project

## `styles` / `scripts` task options

Expand Down
24 changes: 15 additions & 9 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,24 @@ module.exports = function (gulp) {
const fs = require('fs');
const path = require('path');
const pkg = require(path.resolve('package.json'));
const $ = require('gulp-load-plugins')();
// Manually add required plugins to $ plugins object.
$.del = require('del');
$.eslint = require('gulp-eslint7');
$.minimist = require('minimist');
$.path = require('path');
$.magicImporter = require('node-sass-magic-importer');
$.twigAsset = require('@netzstrategen/twig-asset')();
const $ = require('gulp-load-plugins')({
maintainScope: false,
overridePattern: false,
pattern: [
'del',
'minimist',
'path',
'node-sass-magic-importer',
'@netzstrategen/twig-asset'
],
rename: {
'node-sass-magic-importer': 'magicImporter',
'@netzstrategen/twig-asset': 'twigAsset'
}
});

let tasks = [
'clean',
typeof(pkg.gulpPaths.fractalConfig) === 'undefined' ? '' : 'fractal',
'fonts',
'icons',
'images',
Expand Down
Loading

0 comments on commit a0813e5

Please sign in to comment.