project-folder/
.git
wp-admin/
wp-content/
wp-includes/
.htaccess
| { | |
| "name": "project-name", | |
| "description": "Template for static sites", | |
| "version": "1.0.0", | |
| "homepage": "http://www.project-name.com", | |
| "author": { | |
| "name": "Adam Reis", | |
| "url": "http://adam.reis.nz" | |
| }, | |
| "license": "UNLICENSED", |
| // Add a 401 response interceptor | |
| window.axios.interceptors.response.use(function (response) { | |
| return response; | |
| }, function (error) { | |
| if (401 === error.response.status) { | |
| swal({ | |
| title: "Session Expired", | |
| text: "Your session has expired. Would you like to be redirected to the login page?", | |
| type: "warning", | |
| showCancelButton: true, |
| class Frame extends Component { | |
| componentDidMount() { | |
| this.iframeHead = this.node.contentDocument.head | |
| this.iframeRoot = this.node.contentDocument.body | |
| this.forceUpdate() | |
| } | |
| render() { | |
| const { children, head, ...rest } = this.props | |
| return ( |
| var express = require('express'); | |
| var path = require('path'); | |
| var webpackConfig = require('./webpack.config'); | |
| var webpack = require('webpack'); | |
| var webpackDevMiddleware = require('webpack-dev-middleware'); | |
| var webpackHotMiddleware = require('webpack-hot-middleware'); | |
| var proxyMiddleware = require('http-proxy-middleware'); | |
| var devConfig = webpackConfig.devServer; | |
| var app = express(); |
| <!DOCTYPE html> | |
| <html data-ng-app="TestApp"> | |
| <head> | |
| <script src="http://code.angularjs.org/1.2.9/angular.js"></script> | |
| <script> | |
| angular.module('TestApp', []) | |
| .factory('beforeUnload', function ($rootScope, $window) { | |
| // Events are broadcast outside the Scope Lifecycle |
| // The classic AJAX call - dispatch before the request, and after it comes back | |
| function myThunkActionCreator(someValue) { | |
| return (dispatch, getState) => { | |
| dispatch({type : "REQUEST_STARTED"}); | |
| myAjaxLib.post("/someEndpoint", {data : someValue}) | |
| .then(response => dispatch({type : "REQUEST_SUCCEEDED", payload : response}) | |
| .catch(error => dispatch({type : "REQUEST_FAILED", error : error}); | |
| }; | |
| } |
| /** | |
| * Parse hash bang parameters from a URL as key value object. | |
| * | |
| * For repeated parameters the last parameter is effective. | |
| * | |
| * If = syntax is not used the value is set to null. | |
| * | |
| * #x&y=3 -> { x:null, y:3 } | |
| * | |
| * @param aURL URL to parse or null if window.location is used |