Skip to content

Instantly share code, notes, and snippets.

const BLACKLIST = ['qs'];
gulp.task('check-blacklist', () => {
const stats = require('./build/stats.json');
const errors = [];
stats.children[0].modules.forEach(m => {
m.reasons.forEach(r => {
BLACKLIST.forEach(bl => {
if (r.userRequest === bl) {
errors.push(`Blacklisted module "${bl}" found requested by ${r.module}`);
{
"name": "npm-test",
"version": "1.0.0",
"lockfileVersion": 1,
"dependencies": {
"braintree-web": {
"version": "3.17.0",
"resolved": "http://znpm.in.zillow.net:31050/b/braintree-web/_attachments/braintree-web-3.17.0.tgz",
"integrity": "sha1-MSwL64cIVmj9PdVwuij1Se6RZLU="
},
@jakepusateri
jakepusateri / .gitignore
Last active April 13, 2017 07:32
webpack 1 working behavior
node_modules/
@jakepusateri
jakepusateri / .gitignore
Last active April 13, 2017 04:23
webpack-bug-demo
node_modules/
import React from 'react';
import ReactDOM from 'react-dom';
import { createStore, combineReducers, applyMiddleware } from 'redux';
import { createInputsReducer, connectWithInputs, ReduxInputsWrapper } from 'redux-inputs';
import { Provider } from 'react-redux';
import thunk = from 'redux-thunk';
const inputsConfig = {
email: {
defaultValue: 'test@example.com',
@jakepusateri
jakepusateri / expected.js
Created December 9, 2015 21:02
Babel 5.8.34 plugin + spec.functionName example
'use strict';
function _setDollarValue() {}
function OptionalNode() {}
OptionalNode.prototype = {
setDollarValue: function setDollarValue(value) {
_setDollarValue();
}
};
@jakepusateri
jakepusateri / transformer
Last active August 29, 2015 14:22
yui remover plugin
module.exports = function (babel) {
var t = babel.types;
var requires;
return new babel.Transformer('plugin-example', {
CallExpression: function (node, parent, scope, file) {
var isYUIMethod = node.callee.object &&
t.isIdentifier(node.callee.object, { name: 'YUI' });
var isAddCall = node.callee.property &&
t.isIdentifier(node.callee.property, { name: 'add' });
@jakepusateri
jakepusateri / designer.html
Created September 20, 2014 02:59
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;