--- /dev/null
+/******/ (function(modules) { // webpackBootstrap
+/******/ // The module cache
+/******/ var installedModules = {};
+/******/
+/******/ // The require function
+/******/ function __webpack_require__(moduleId) {
+/******/
+/******/ // Check if module is in cache
+/******/ if(installedModules[moduleId]) {
+/******/ return installedModules[moduleId].exports;
+/******/ }
+/******/ // Create a new module (and put it into the cache)
+/******/ var module = installedModules[moduleId] = {
+/******/ i: moduleId,
+/******/ l: false,
+/******/ exports: {}
+/******/ };
+/******/
+/******/ // Execute the module function
+/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
+/******/
+/******/ // Flag the module as loaded
+/******/ module.l = true;
+/******/
+/******/ // Return the exports of the module
+/******/ return module.exports;
+/******/ }
+/******/
+/******/
+/******/ // expose the modules object (__webpack_modules__)
+/******/ __webpack_require__.m = modules;
+/******/
+/******/ // expose the module cache
+/******/ __webpack_require__.c = installedModules;
+/******/
+/******/ // define getter function for harmony exports
+/******/ __webpack_require__.d = function(exports, name, getter) {
+/******/ if(!__webpack_require__.o(exports, name)) {
+/******/ Object.defineProperty(exports, name, {
+/******/ configurable: false,
+/******/ enumerable: true,
+/******/ get: getter
+/******/ });
+/******/ }
+/******/ };
+/******/
+/******/ // getDefaultExport function for compatibility with non-harmony modules
+/******/ __webpack_require__.n = function(module) {
+/******/ var getter = module && module.__esModule ?
+/******/ function getDefault() { return module['default']; } :
+/******/ function getModuleExports() { return module; };
+/******/ __webpack_require__.d(getter, 'a', getter);
+/******/ return getter;
+/******/ };
+/******/
+/******/ // Object.prototype.hasOwnProperty.call
+/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
+/******/
+/******/ // __webpack_public_path__
+/******/ __webpack_require__.p = "";
+/******/
+/******/ // Load entry module and return exports
+/******/ return __webpack_require__(__webpack_require__.s = 0);
+/******/ })
+/************************************************************************/
+/******/ ([
+/* 0 */
+/***/ (function(module, exports, __webpack_require__) {
+
+__webpack_require__(1);
+module.exports = __webpack_require__(2);
+
+
+/***/ }),
+/* 1 */
+/***/ (function(module, exports) {
+
+
+// Use media uploaded for all file/image uploads
+jQuery(document).ready(function($){
+
+ var custom_uploader;
+
+ $('.glm-protp-upload-button').click(function(e) {
+
+ e.preventDefault();
+
+ var id = $(this).attr('data-id');
+
+ //If the uploader object has already been created, reopen the dialog
+ if (custom_uploader) {
+ custom_uploader.open();
+ return;
+ }
+
+ //Extend the wp.media object
+ var custom_uploader = wp.media.frames.file_frame = wp.media({
+ title: 'Choose the desired image below or select "Upload Files" to select a new image.',
+ button: {
+ text: 'Choose Image'
+ },
+ multiple: false
+ });
+
+ //When a file is selected, grab the URL and set it as the text field's value
+ custom_uploader.on('select', function() {
+ attachment = custom_uploader.state().get('selection').first().toJSON();
+ $('#' + id).val(attachment.url);
+ });
+
+ //Open the uploader dialog
+ custom_uploader.open();
+
+ });
+
+
+});
+
+/***/ }),
+/* 2 */
+/***/ (function(module, exports) {
+
+// removed by extract-text-webpack-plugin
+
+/***/ })
+/******/ ]);
\ No newline at end of file
--- /dev/null
+{
+ "name": "glm-prototypes",
+ "version": "1.0.0",
+ "description": "=== Gaslight Media Prototype Management === Contributors: cscott@gaslightmedia.com Donate link: http://www.gaslightmedia.com Tags: Gaslight Media,Plugin,Prototypes Requires at least: 4.0 Tested up to: 4.0.1 Stable tag: 1.0 License: Commercial License URI: http://www.gaslightmedia.com/plugin-license/",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1",
+ "build": "webpack"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git@cvs2:WP-Plugins/GlmPrototypes"
+ },
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "css-loader": "^0.28.7",
+ "extract-text-webpack-plugin": "^3.0.2",
+ "node-sass": "^4.6.1",
+ "optimize-css-assets-webpack-plugin": "^3.2.0",
+ "sass-loader": "^6.0.6",
+ "webpack": "^3.8.1"
+ },
+ "devDependencies": {
+ "webpack-concat-plugin": "^1.4.2"
+ }
+}
--- /dev/null
+const ExtractTextPlugin = require('extract-text-webpack-plugin');
+const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
+const webpack = require('webpack');
+const ConcatPlugin = require('webpack-concat-plugin');
+
+module.exports = {
+ entry: ['./js/index.js','./scss/app.scss'],
+ output: {
+ path: __dirname + '/dist',
+ filename: 'bundle.js'
+ },
+ module: {
+ rules: [
+ /*
+ your other rules for JavaScript transpiling go in here
+ */
+ { // regular css files
+ test: /\.css$/,
+ use: ExtractTextPlugin.extract({
+ use: 'css-loader?importLoaders=1',
+ }),
+ },
+ { // sass / scss loader for webpack
+ test: /\.(sass|scss)$/,
+ use: ExtractTextPlugin.extract(['css-loader', 'sass-loader'])
+ }
+ ],
+ },
+ plugins: [
+ new ExtractTextPlugin({ // define where to save the file
+ filename: 'index.css',
+ allChunks: true,
+ }),
+ new OptimizeCssAssetsPlugin({
+ assetNameRegExp: /\.css$/,
+ cssProcessorOptions: { discardComments: { removeAll: true } }
+ }),
+ ],
+ watch: true
+}
\ No newline at end of file