Skip to content

Instantly share code, notes, and snippets.

@jonesnc
jonesnc / package.json dependencies
Last active July 9, 2018 19:51
Webpack config files
"devDependencies": {
"@babel/cli": "^7.0.0-beta.52",
"@babel/core": "^7.0.0-beta.52",
"@babel/plugin-transform-modules-amd": "^7.0.0-beta.52",
"@babel/plugin-transform-regenerator": "^7.0.0-beta.52",
"@babel/plugin-transform-runtime": "^7.0.0-beta.52",
"@babel/polyfill": "^7.0.0-beta.52",
"@babel/preset-env": "^7.0.0-beta.52",
"@babel/preset-es2015": "^7.0.0-beta.52",
"@babel/preset-stage-0": "^7.0.0-beta.52",
import path from 'path';
import webpack from 'webpack';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
const config = {
target: 'web',
node: {
fs: 'empty'
},
performance: {
@jonesnc
jonesnc / gulpfile.babel.js
Created October 4, 2017 14:42
gulp 4 gulpfile w/babel!
import gulp from 'gulp';
import gulpLoadPlugins from 'gulp-load-plugins';
import {exec} from 'child_process';
import browserSync from 'browser-sync';
import webpack from 'webpack';
import webpackStream from 'webpack-stream';
import webpackConfig from './webpack.config.babel.js'
const plugins = gulpLoadPlugins();
@jonesnc
jonesnc / example.sql
Created August 16, 2017 17:15
Oracle SQL question
SELECT CASE
WHEN column_a IS NULL
THEN 'column a missing'
WHEN column_b IS NULL
THEN 'column b missing'
END
FROM (SELECT
1234,
NULL AS column_a,
NULL AS column_b
@jonesnc
jonesnc / index.ejs
Last active January 20, 2017 22:28
A description of my app's environment, looking for the ideal webpack setup
I'm working on a React app which resides within an application called PowerSchool,
and I'm trying to create a webpack configuration that allows for both a development
environment that relies on webpack-dev-server and hot reloading, and a production version
of the build that creates my bundles and vendor files.
The general structure of this React app is the following:
* An HTML page within PowerSchool which contains an iframe whose src points to
* My React index.html page that references my bundle.js, bundle.css, vendor.js (refered to as app files going forward) files
@jonesnc
jonesnc / ps-schema.js
Created November 6, 2015 23:40
An example of how to use graphql with powerschool tlist_sql tags on the backend
function getStudent(dcid) {
return fetch(`/admin/graphql/getstudent.json.html?dcid=${dcid}`, {credentials: 'include'}).then(r => r.json());
}
function getSped(dcid) {
return fetch(`/admin/graphql/getsped.json.html?studentsdcid=${dcid}`, {credentials: 'include'}).then(r => r.json());
}
let StudentType = new graphql.GraphQLObjectType({