Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Clean up CLI output a bit. (#3654)
Browse files Browse the repository at this point in the history
* Clean up CLI output a bit.

* Clean up string template.
  • Loading branch information
robdodson authored Aug 7, 2020
1 parent b5029e6 commit 220a442
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

const path = require('path');
const chalk = require('chalk');
const pluginRss = require('@11ty/eleventy-plugin-rss');
const pluginSyntaxHighlight = require('@11ty/eleventy-plugin-syntaxhighlight');

Expand Down Expand Up @@ -91,6 +92,7 @@ const {
} = require(`./${transformsDir}/service-worker-partials`);

module.exports = function (config) {
console.log(chalk.black.bgGreen('Eleventy is building, please wait…'));
const isProd = process.env.ELEVENTY_ENV === 'prod';

// ----------------------------------------------------------------------------
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"test:unit": "mocha ./test/unit && npm run test:lib",
"test": "npm run test:unit && npm run test:lib && npm run test:integration",
"watch:eleventy": "eleventy --watch --quiet",
"watch:gulp": "npx gulp build && gulp watch",
"watch:rollup": "chokidar \"src/lib/**/*.{js,scss}\" -c \"npm run rollup\"",
"watch:rollup-sw": "chokidar \"src/lib/**/*.js\" -c \"npm run rollup-sw\"",
"watch:sass": "chokidar \"src/styles/**/*.scss\" -c \"npm run sass\"",
"watch:gulp": "npx gulp build --silent && gulp watch --silent",
"watch:rollup": "chokidar \"src/lib/**/*.{js,scss}\" -c --silent \"npm run rollup\"",
"watch:rollup-sw": "chokidar \"src/lib/**/*.js\" -c --silent \"npm run rollup-sw\"",
"watch:sass": "chokidar \"src/styles/**/*.scss\" -c --silent \"npm run sass\"",
"watch:test:lib": "TEST_MODE=dev npm-run-all clean rollup --parallel watch:rollup karma"
},
"license": "Apache-2.0",
Expand Down
8 changes: 0 additions & 8 deletions src/site/_filters/find-by-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
* limitations under the License.
*/

const chalk = require('chalk');
const warn = chalk.black.bgYellow;

let memo;

/**
Expand All @@ -33,11 +30,6 @@ let memo;
* @see {@link https://github.com/11ty/eleventy/issues/399}
*/
const memoize = (collection) => {
if (memo && Object.keys(memo).length) {
/* eslint-disable-next-line */
console.warn(warn(`Overwriting existing memoized collection!`));
}

memo = {};
collection.forEach((item) => {
if (item.url) {
Expand Down

0 comments on commit 220a442

Please sign in to comment.