Skip to content

Commit

Permalink
remove gulp-eslint (new-xkit#2012)
Browse files Browse the repository at this point in the history
* remove gulp-eslint, gulp lint command

* update build docs
  • Loading branch information
AprilSylph authored Nov 24, 2020
1 parent 564118f commit 19e15de
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 108 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,46 @@ on:
jobs:
build:
name: Autobuild extensions
if: github.repository == 'new-xkit/XKit'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js 12
uses: actions/setup-node@v1

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 12
node-version: 14

- name: Configure git
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Fetch and reset gh-pages
run: |
git remote set-branches --add origin gh-pages
git fetch
git checkout -f -t -b gh-pages origin/gh-pages
git reset --hard master
- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Install gulp-cli
run: npm install gulp-cli

- name: Build distribution
run: gulp build

- name: Commit changes
run: |
git add --force Extensions/
git commit -m 'Rebuild Distribution'
- name: Force-push to gh-pages
run: git push -f
14 changes: 2 additions & 12 deletions docs/contributing/Build-XKit.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Serving extensions and themes locally is useful for rapid development without re

#### `npm test`

Shortcut for [`gulp lint:scripts`](#gulp-lintscripts).
Shortcut for `eslint .`.

#### `npm run dev`

Expand All @@ -42,17 +42,7 @@ Uses `web-ext build` with the necessary file exclusions to build and pack the We

The default task.

See also: [`gulp lint`](#gulp-lint).

#### `gulp lint`

Top-level linting task.

See also [`gulp lint:scripts`](#gulp-lintscripts).

#### `gulp lint:scripts`

Lints JavaScript files using ESLint, and reports the output.
See also: [`gulp build`](#gulp-build).

#### `gulp build`

Expand Down
24 changes: 3 additions & 21 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
/* eslint-env node */
'use strict';

var cache = require('gulp-cached'),
connect = require('connect'),
var connect = require('connect'),
connectLogger = require('morgan'),
connectStatic = require('serve-static'),
del = require('del'),
eslint = require('gulp-eslint'),
fs = require('fs'),
gulp = require('gulp'),
gutil = require('gulp-util'),
Expand Down Expand Up @@ -40,23 +38,7 @@ gulp.task('clean:themes', function(cb) {

gulp.task('clean', gulp.series('clean:extensions', 'clean:themes'));

gulp.task('lint:scripts', function() {
var src = [].concat(
paths.scripts.dev,
paths.scripts.core,
paths.scripts.extensions
);

return gulp.src(src)
.pipe(cache('lint:scripts'))
.pipe(eslint())
.pipe(eslint.format())
.pipe(eslint.failAfterError());
});

gulp.task('lint', gulp.series('lint:scripts'));

gulp.task('build:extensions', gulp.series('lint:scripts', 'clean:extensions', function() {
gulp.task('build:extensions', gulp.series('clean:extensions', function() {
var extensionBuilder = require('./dev/builders/extension');
return gulp.src(paths.scripts.extensions)
.pipe(extensionBuilder())
Expand Down Expand Up @@ -125,4 +107,4 @@ gulp.task('server', gulp.series('build', function(callback) {
});
}));

gulp.task('default', gulp.series('lint'));
gulp.task('default', gulp.series('build'));
68 changes: 0 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
"del": "^1.2.1",
"eslint": "^3.19.0",
"gulp": "^4.0.2",
"gulp-cached": "^1.1.1",
"gulp-eslint": "^3.0.1",
"gulp-util": "^3.0.8",
"merge-stream": "^0.1.8",
"morgan": "^1.10.0",
Expand Down

0 comments on commit 19e15de

Please sign in to comment.