mirror of
https://github.com/feathericons/feather.git
synced 2023-08-10 21:13:24 +03:00
build: Disable some eslint rules in /bin
This commit is contained in:
parent
23b17b9c55
commit
76f29d8565
6
bin/.eslintrc.json
Normal file
6
bin/.eslintrc.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"rules": {
|
||||||
|
"import/no-extraneous-dependencies": "off",
|
||||||
|
"no-console": "off"
|
||||||
|
}
|
||||||
|
}
|
@ -6,7 +6,7 @@ import buildIconsObject from './build-icons-object';
|
|||||||
const IN_DIR = path.resolve(__dirname, '../icons');
|
const IN_DIR = path.resolve(__dirname, '../icons');
|
||||||
const OUT_FILE = path.resolve(__dirname, '../dist/icons.json');
|
const OUT_FILE = path.resolve(__dirname, '../dist/icons.json');
|
||||||
|
|
||||||
console.log(`Building ${OUT_FILE}`); // eslint-disable-line no-console
|
console.log(`Building ${OUT_FILE}`);
|
||||||
|
|
||||||
const svgFiles = fs
|
const svgFiles = fs
|
||||||
.readdirSync(IN_DIR)
|
.readdirSync(IN_DIR)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { minify } from 'html-minifier';
|
import { minify } from 'html-minifier';
|
||||||
|
@ -5,6 +5,6 @@ import buildSpriteString from './build-sprite-string';
|
|||||||
|
|
||||||
const OUT_FILE = path.resolve(__dirname, '../dist/feather-sprite.svg');
|
const OUT_FILE = path.resolve(__dirname, '../dist/feather-sprite.svg');
|
||||||
|
|
||||||
console.log(`Building ${OUT_FILE}`); // eslint-disable-line no-console
|
console.log(`Building ${OUT_FILE}`);
|
||||||
|
|
||||||
fs.writeFileSync(OUT_FILE, buildSpriteString(icons));
|
fs.writeFileSync(OUT_FILE, buildSpriteString(icons));
|
||||||
|
@ -4,7 +4,7 @@ import icons from '../src/icons';
|
|||||||
|
|
||||||
const OUT_DIR = path.resolve(__dirname, '../dist/icons');
|
const OUT_DIR = path.resolve(__dirname, '../dist/icons');
|
||||||
|
|
||||||
console.log(`Building SVGs in ${OUT_DIR}`); // eslint-disable-line no-console
|
console.log(`Building SVGs in ${OUT_DIR}`);
|
||||||
|
|
||||||
Object.keys(icons).forEach(name => {
|
Object.keys(icons).forEach(name => {
|
||||||
const svg = icons[name].toSvg();
|
const svg = icons[name].toSvg();
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
|
||||||
import Svgo from 'svgo';
|
import Svgo from 'svgo';
|
||||||
import cheerio from 'cheerio';
|
import cheerio from 'cheerio';
|
||||||
import { format } from 'prettier';
|
import { format } from 'prettier';
|
||||||
|
@ -5,7 +5,7 @@ import processSvg from './process-svg';
|
|||||||
|
|
||||||
const IN_DIR = path.resolve(__dirname, '../icons');
|
const IN_DIR = path.resolve(__dirname, '../icons');
|
||||||
|
|
||||||
console.log(`Processing SVGs in ${IN_DIR}`); // eslint-disable-line no-console
|
console.log(`Processing SVGs in ${IN_DIR}`);
|
||||||
|
|
||||||
fs
|
fs
|
||||||
.readdirSync(IN_DIR)
|
.readdirSync(IN_DIR)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable import/no-extraneous-dependencies */
|
|
||||||
import algolia from 'algoliasearch';
|
import algolia from 'algoliasearch';
|
||||||
import icons from '../dist/icons.json';
|
import icons from '../dist/icons.json';
|
||||||
import tags from '../src/tags.json';
|
import tags from '../src/tags.json';
|
||||||
@ -9,7 +8,10 @@ if (
|
|||||||
process.env.TRAVIS_PULL_REQUEST === 'false' &&
|
process.env.TRAVIS_PULL_REQUEST === 'false' &&
|
||||||
process.env.TRAVIS_BRANCH === 'master'
|
process.env.TRAVIS_BRANCH === 'master'
|
||||||
) {
|
) {
|
||||||
|
console.log('Syncing Algolia records');
|
||||||
syncAlgolia();
|
syncAlgolia();
|
||||||
|
} else {
|
||||||
|
console.log('Skipped Algolia sync');
|
||||||
}
|
}
|
||||||
|
|
||||||
function syncAlgolia() {
|
function syncAlgolia() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user