diff --git a/Dockerfile b/Dockerfile index c92722f..86bfa76 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,12 @@ -FROM node:7.2.1-alpine +FROM node:8.4.0-alpine -# Need cURL to report to Rollbar -RUN apk --no-cache add curl git +COPY ./ /usr/src +WORKDIR /usr/src -# Copy app -COPY ./ /usr/src/app -WORKDIR /usr/src/app +RUN npm install --silent -# Install dev + prod dependencies and build release -RUN npm install --no-optional --silent - -# Environment variables -ENV DATABASE_PATH db/wedding.db ENV NODE_ENV production ENV PORT 80 EXPOSE 80 -# Run production build -RUN npm run build -- --release --silent - -RUN curl https://api.rollbar.com/api/1/deploy/ \ - -F access_token=8bf333d044df48c19a6929e4b1613a8e \ - -F environment=production \ - -F revision=$(git log -n 1 --pretty=format:"%H") \ - -F local_username="$(git log -n 1 --pretty=format:"%an")" - -WORKDIR /usr/src/app/build - CMD [ "node", "server.js" ] diff --git a/README.md b/README.md index a08bc75..5b49c0d 100644 --- a/README.md +++ b/README.md @@ -1,112 +1 @@ -# Wedding RSVP site -Forked from [React Starter Kit](https://www.reactstarterkit.com) -development built on top of [Node.js](https://nodejs.org/), -[Express](http://expressjs.com/), [GraphQL](http://graphql.org/) and -[React](https://facebook.github.io/react/), containing modern web development -tools such as [Webpack](http://webpack.github.io/), [Babel](http://babeljs.io/) -and [Browsersync](http://www.browsersync.io/). Helping you to stay productive -following the best practices. A solid starting point for both professionals -and newcomers to the industry. - -## Getting Started - -### Requirements - - * Mac OS X, Windows, or Linux - * [Yarn](https://yarnpkg.com/) package + [Node.js](https://nodejs.org/) v6.5 or newer - * `node-gyp` prerequisites mentioned [here](https://github.com/nodejs/node-gyp) - * Text editor or IDE pre-configured with React/JSX/Flow/ESlint ([learn more](./how-to-configure-text-editors.md)) - -### Quick Start - -#### 1. Run `yarn install` - -This will install both run-time project dependencies and developer tools listed -in [package.json](../package.json) file. - -#### 2. Run `yarn start` - -This command will build the app from the source files (`/src`) into the output -`/build` folder. As soon as the initial build completes, it will start the -Node.js server (`node build/server.js`) and [Browsersync](https://browsersync.io/) -with [HMR](https://webpack.github.io/docs/hot-module-replacement) on top of it. - -> [http://localhost:3000/](http://localhost:3000/) — Node.js server (`build/server.js`)
-> [http://localhost:3000/graphql](http://localhost:3000/graphql) — GraphQL server and IDE
-> [http://localhost:3001/](http://localhost:3001/) — BrowserSync proxy with HMR, React Hot Transform
-> [http://localhost:3002/](http://localhost:3002/) — BrowserSync control panel (UI) - -Now you can open your web app in a browser, on mobile devices and start -hacking. Whenever you modify any of the source files inside the `/src` folder, -the module bundler ([Webpack](http://webpack.github.io/)) will recompile the -app on the fly and refresh all the connected browsers. - -![browsersync](https://dl.dropboxusercontent.com/u/16006521/react-starter-kit/brwosersync.jpg) - -Note that the `yarn start` command launches the app in `development` mode, -the compiled output files are not optimized and minimized in this case. -You can use `--release` command line argument to check how your app works -in release (production) mode: - -```shell -$ yarn start -- --release -``` -*NOTE: double dashes are required* - - -### How to Build, Test, Deploy - -If you need just to build the app (without running a dev server), simply run: - -```shell -$ yarn run build -``` - -or, for a production build: - -```shell -$ yarn run build -- --release -``` - -or, for a production docker build: - -```shell -$ yarn run build -- --release --docker -``` - -*NOTE: double dashes are required* - -After running this command, the `/build` folder will contain the compiled -version of the app. For example, you can launch Node.js server normally by -running `node build/server.js`. - -To check the source code for syntax errors and potential issues run: - -```shell -$ yarn run lint -``` - -To launch unit tests: - -```shell -$ yarn run test # Run unit tests with Mocha -$ yarn run test:watch # Launch unit test runner and start watching for changes -``` - -By default, [Mocha](https://mochajs.org/) test runner is looking for test files -matching the `src/**/*.test.js` pattern. Take a look at `src/components/Layout/Layout.test.js` -as an example. - -To deploy the app, run: - -```shell -$ yarn run deploy -``` - -The deployment script `tools/deploy.js` is configured to push the contents of -the `/build` folder to a remote server via Git. You can easily deploy your app -to [Azure Web Apps](https://azure.microsoft.com/en-us/services/app-service/web/), -or [Heroku](https://www.heroku.com/) this way. Both will execute `yarn install --production` -upon receiving new files from you. Note, you should only deploy the contents -of the `/build` folder to a remote server. - +Interstitial site before 2.0 diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..1911be3 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,305 @@ +{ + "name": "wedding", + "version": "1.5.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "accepts": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", + "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", + "requires": { + "mime-types": "2.1.17", + "negotiator": "0.6.1" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "depd": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", + "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "encodeurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.1.tgz", + "integrity": "sha1-eePVhlU0aQn+bw9Fpd5oEDspTSA=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.15.5", + "resolved": "https://registry.npmjs.org/express/-/express-4.15.5.tgz", + "integrity": "sha1-ZwI1ypWYiQpa6BcLg9tyK4Qu2Sc=", + "requires": { + "accepts": "1.3.4", + "array-flatten": "1.1.1", + "content-disposition": "0.5.2", + "content-type": "1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "1.1.1", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.1", + "finalhandler": "1.0.6", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "1.1.2", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "1.1.5", + "qs": "6.5.0", + "range-parser": "1.2.0", + "send": "0.15.6", + "serve-static": "1.12.6", + "setprototypeof": "1.0.3", + "statuses": "1.3.1", + "type-is": "1.6.15", + "utils-merge": "1.0.0", + "vary": "1.1.2" + } + }, + "finalhandler": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", + "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=", + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "http-errors": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", + "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", + "requires": { + "depd": "1.1.1", + "inherits": "2.0.3", + "setprototypeof": "1.0.3", + "statuses": "1.3.1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ipaddr.js": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", + "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", + "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=" + }, + "mime-db": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", + "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" + }, + "mime-types": { + "version": "2.1.17", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", + "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", + "requires": { + "mime-db": "1.30.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "proxy-addr": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", + "integrity": "sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=", + "requires": { + "forwarded": "0.1.2", + "ipaddr.js": "1.4.0" + } + }, + "qs": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", + "integrity": "sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg==" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "send": { + "version": "0.15.6", + "resolved": "https://registry.npmjs.org/send/-/send-0.15.6.tgz", + "integrity": "sha1-IPI6nJJbdiq4JwX+L52yUqzkfjQ=", + "requires": { + "debug": "2.6.9", + "depd": "1.1.1", + "destroy": "1.0.4", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "etag": "1.8.1", + "fresh": "0.5.2", + "http-errors": "1.6.2", + "mime": "1.3.4", + "ms": "2.0.0", + "on-finished": "2.3.0", + "range-parser": "1.2.0", + "statuses": "1.3.1" + } + }, + "serve-static": { + "version": "1.12.6", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.6.tgz", + "integrity": "sha1-uXN3P2NEmTTaVOW+ul4x2fQhFXc=", + "requires": { + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "parseurl": "1.3.2", + "send": "0.15.6" + } + }, + "setprototypeof": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", + "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" + }, + "statuses": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", + "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" + }, + "type-is": { + "version": "1.6.15", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.15.tgz", + "integrity": "sha1-yrEPtJCeRByChC6v4a1kbIGARBA=", + "requires": { + "media-typer": "0.3.0", + "mime-types": "2.1.17" + } + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "utils-merge": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", + "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + } + } +} diff --git a/package.json b/package.json index 3ab8f38..6596de4 100644 --- a/package.json +++ b/package.json @@ -1,226 +1,15 @@ { "name": "wedding", - "version": "1.4.0", + "version": "1.5.0", "private": true, "engines": { "node": ">=6.5", "npm": ">=3.10" }, "dependencies": { - "babel-polyfill": "^6.20.0", - "babel-runtime": "^6.20.0", - "bluebird": "^3.4.6", - "body-parser": "^1.15.2", - "classnames": "^2.2.5", - "cookie-parser": "^1.4.3", - "core-js": "^2.4.1", - "express": "^4.14.0", - "express-bouncer": "^0.2.0", - "express-graphql": "^0.6.1", - "express-jwt": "^5.1.0", - "fastclick": "^1.0.6", - "fbjs": "^0.8.6", - "graphql": "^0.8.2", - "history": "^4.5.0", - "isomorphic-style-loader": "^1.1.0", - "jsonwebtoken": "^7.2.1", - "node-fetch": "^1.6.3", - "nodemailer": "^3.1.3", - "normalize.css": "^5.0.0", - "passport": "^0.3.2", - "passport-facebook": "^2.1.1", - "pretty-error": "^2.0.2", - "query-string": "^4.2.3", - "react": "^15.4.1", - "react-dom": "^15.4.1", - "react-google-maps": "6", - "react-icon-base": "^2.0.4", - "react-icons": "^2.2.3", - "rollbar": "^0.6.3", - "sequelize": "^3.28.0", - "slack-node": "^0.1.8", - "source-map-support": "^0.4.6", - "sqlite3": "^3.1.8", - "universal-router": "^2.0.0", - "whatwg-fetch": "^2.0.1" - }, - "devDependencies": { - "assets-webpack-plugin": "^3.5.0", - "autoprefixer": "^6.5.3", - "babel-cli": "^6.18.0", - "babel-core": "^6.18.2", - "babel-eslint": "^7.1.1", - "babel-loader": "^6.2.8", - "babel-plugin-rewire": "^1.0.0", - "babel-plugin-transform-runtime": "^6.15.0", - "babel-preset-latest": "^6.16.0", - "babel-preset-react": "^6.16.0", - "babel-preset-react-optimize": "^1.0.1", - "babel-preset-stage-0": "^6.16.0", - "babel-register": "^6.18.0", - "babel-template": "^6.16.0", - "babel-types": "^6.19.0", - "browser-sync": "^2.18.2", - "chai": "^3.5.0", - "chokidar": "^1.6.1", - "css-loader": "^0.26.0", - "editorconfig-tools": "^0.1.1", - "enzyme": "^2.6.0", - "extend": "^3.0.0", - "file-loader": "^0.9.0", - "front-matter": "^2.1.1", - "git-repository": "^0.1.4", - "glob": "^7.1.1", - "json-loader": "^0.5.4", - "lint-staged": "^3.2.2", - "markdown-it": "^8.2.2", - "mkdirp": "^0.5.1", - "mocha": "^3.1.2", - "pixrem": "^3.0.2", - "pleeease-filters": "^3.0.0", - "postcss": "^5.2.5", - "postcss-calc": "^5.3.1", - "postcss-color-function": "^2.0.1", - "postcss-custom-media": "^5.0.1", - "postcss-custom-properties": "^5.0.1", - "postcss-custom-selectors": "^3.0.0", - "postcss-flexbugs-fixes": "^2.0.0", - "postcss-loader": "^1.1.1", - "postcss-media-minmax": "^2.1.2", - "postcss-nested": "^1.0.0", - "postcss-nesting": "^2.3.1", - "postcss-partial-import": "^2.1.0", - "postcss-pseudoelements": "^3.0.0", - "postcss-selector-matches": "^2.0.5", - "postcss-selector-not": "^2.0.0", - "postcss-url": "^5.1.2", - "pre-commit": "^1.2.2", - "raw-loader": "^0.5.1", - "react-addons-test-utils": "15.4.1", - "react-deep-force-update": "^2.0.1", - "react-hot-loader": "^3.0.0-beta.6", - "redbox-react": "^1.3.3", - "rimraf": "^2.5.4", - "sinon": "^2.0.0-pre.3", - "stylefmt": "^5.0.2", - "stylelint": "^7.6.0", - "stylelint-config-standard": "^15.0.0", - "url-loader": "^0.5.7", - "webpack": "^1.13.3", - "webpack-hot-middleware": "^2.13.2", - "webpack-middleware": "^1.5.1" - }, - "optionalDependencies": { - "eslint": "^3.10.2", - "eslint-config-airbnb": "^13.0.0", - "eslint-loader": "^1.6.1", - "eslint-plugin-css-modules": "^1.0.9", - "eslint-plugin-import": "^2.2.0", - "eslint-plugin-jsx-a11y": "^2.2.3", - "eslint-plugin-react": "^6.7.1" - }, - "babel": { - "presets": [ - "react", - "stage-0" - ], - "plugins": [ - "syntax-trailing-function-commas", - "transform-async-to-generator", - "transform-es2015-destructuring", - "transform-es2015-parameters", - "transform-es2015-duplicate-keys", - "transform-es2015-modules-commonjs", - "transform-exponentiation-operator", - "transform-runtime" - ], - "env": { - "test": { - "plugins": [ - "rewire" - ] - } - } - }, - "eslintConfig": { - "parser": "babel-eslint", - "extends": [ - "airbnb", - "plugin:css-modules/recommended" - ], - "plugins": [ - "css-modules" - ], - "globals": { - "__DEV__": true - }, - "env": { - "browser": true - }, - "rules": { - "arrow-parens": "off", - "generator-star-spacing": "off", - "import/extensions": "off", - "import/no-extraneous-dependencies": "off", - "react/forbid-prop-types": "off", - "react/jsx-filename-extension": "off", - "react/no-danger": "off", - "react/no-unused-prop-types": "off", - "react/prefer-stateless-function": "off" - } - }, - "stylelint": { - "extends": "stylelint-config-standard", - "rules": { - "string-quotes": "single", - "property-no-unknown": [ - true, - { - "ignoreProperties": [ - "composes" - ] - } - ], - "selector-pseudo-class-no-unknown": [ - true, - { - "ignorePseudoClasses": [ - "global" - ] - } - ] - } - }, - "pre-commit": "lint:staged", - "lint-staged": { - "*.{md,sh,txt,xml,html,json}": [ - "editorconfig-tools fix", - "git add" - ], - "*.{js,jsx}": [ - "eslint --fix", - "git add" - ], - "*.{css,less,scss,sss}": [ - "stylefmt", - "stylelint", - "git add" - ] + "express": "^4.15.5" }, "scripts": { - "lint:js": "eslint src tools", - "lint:css": "stylelint \"src/**/*.{css,less,scss,sss}\"", - "lint:staged": "lint-staged", - "lint": "npm run lint:js && npm run lint:css", - "test": "mocha \"src/**/*.test.js\" --require babel-register --require test/setup.js", - "test:watch": "npm run test -- --reporter min --watch", - "clean": "babel-node tools/run clean", - "copy": "babel-node tools/run copy", - "bundle": "babel-node tools/run bundle", - "build": "babel-node tools/run build", - "deploy": "babel-node tools/run deployToAzureWebApps", - "render": "babel-node tools/run render", - "serve": "babel-node tools/run runServer", - "start": "babel-node tools/run start" + "start": "node server.js" } } diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png deleted file mode 100644 index 41f32f2..0000000 Binary files a/public/apple-touch-icon.png and /dev/null differ diff --git a/public/browserconfig.xml b/public/browserconfig.xml deleted file mode 100644 index 46de5d3..0000000 --- a/public/browserconfig.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/public/crossdomain.xml b/public/crossdomain.xml deleted file mode 100644 index 818b822..0000000 --- a/public/crossdomain.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index a1838b3..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/humans.txt b/public/humans.txt deleted file mode 100644 index ed65c14..0000000 --- a/public/humans.txt +++ /dev/null @@ -1,15 +0,0 @@ -# humanstxt.org/ -# The humans responsible & technology colophon - -# TEAM - - Daniel Head -- Developer/Groom -- @danhead - -# THANKS - - Hana Becka, for saying yes - -# TECHNOLOGY COLOPHON - - CSS3, HTML5, JavaScript - React, Flux, SuperAgent diff --git a/public/images/four.jpg b/public/images/four.jpg new file mode 100755 index 0000000..1d68734 Binary files /dev/null and b/public/images/four.jpg differ diff --git a/public/images/one.jpg b/public/images/one.jpg new file mode 100755 index 0000000..7e482f7 Binary files /dev/null and b/public/images/one.jpg differ diff --git a/public/images/three.jpg b/public/images/three.jpg new file mode 100755 index 0000000..b23c9db Binary files /dev/null and b/public/images/three.jpg differ diff --git a/public/images/two.jpg b/public/images/two.jpg new file mode 100755 index 0000000..c4e128a Binary files /dev/null and b/public/images/two.jpg differ diff --git a/public/img/cervenalhota_2560.jpg b/public/img/cervenalhota_2560.jpg deleted file mode 100644 index 4eccec3..0000000 Binary files a/public/img/cervenalhota_2560.jpg and /dev/null differ diff --git a/public/img/church_2560.jpg b/public/img/church_2560.jpg deleted file mode 100644 index 4621678..0000000 Binary files a/public/img/church_2560.jpg and /dev/null differ diff --git a/public/img/offley_2560.jpg b/public/img/offley_2560.jpg deleted file mode 100644 index e45ed4d..0000000 Binary files a/public/img/offley_2560.jpg and /dev/null differ diff --git a/public/img/prague_2560.jpg b/public/img/prague_2560.jpg deleted file mode 100644 index 1b5566a..0000000 Binary files a/public/img/prague_2560.jpg and /dev/null differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..d9fca1f --- /dev/null +++ b/public/index.html @@ -0,0 +1,102 @@ + + + + + + Daniel and Hana - Thank you + + + +

Thank you to all who joined us to celebrate our special day.

+

Our full photo album is coming soon.

+
+
+
+
+
+
+ + + diff --git a/public/robots.txt b/public/robots.txt deleted file mode 100644 index d0e5f1b..0000000 --- a/public/robots.txt +++ /dev/null @@ -1,5 +0,0 @@ -# www.robotstxt.org/ - -# Allow crawling of all content -User-agent: * -Disallow: diff --git a/public/tile-wide.png b/public/tile-wide.png deleted file mode 100644 index d927c40..0000000 Binary files a/public/tile-wide.png and /dev/null differ diff --git a/public/tile.png b/public/tile.png deleted file mode 100644 index 9114cab..0000000 Binary files a/public/tile.png and /dev/null differ diff --git a/server.js b/server.js new file mode 100644 index 0000000..62f1637 --- /dev/null +++ b/server.js @@ -0,0 +1,7 @@ +const express = require('express'); +const app = express(); +const port = process.env.port || 3000; +app.use(express.static('public')); +app.listen(port); +console.log('App listening on port', port); + diff --git a/src/client.js b/src/client.js deleted file mode 100644 index 0575fdb..0000000 --- a/src/client.js +++ /dev/null @@ -1,189 +0,0 @@ -import 'babel-polyfill'; -import React from 'react'; -import ReactDOM from 'react-dom'; -import FastClick from 'fastclick'; -import UniversalRouter from 'universal-router'; -import queryString from 'query-string'; -import { createPath } from 'history/PathUtils'; -import history from './core/history'; -import App from './components/App'; -import { ErrorReporter, deepForceUpdate } from './core/devUtils'; - -// Global (context) variables that can be easily accessed from any React component -// https://facebook.github.io/react/docs/context.html -const context = { - // Enables critical path CSS rendering - // https://github.com/kriasoft/isomorphic-style-loader - insertCss: (...styles) => { - // eslint-disable-next-line no-underscore-dangle - const removeCss = styles.map(x => x._insertCss()); - return () => { removeCss.forEach(f => f()); }; - }, -}; - -function updateTag(tagName, keyName, keyValue, attrName, attrValue) { - const node = document.head.querySelector(`${tagName}[${keyName}="${keyValue}"]`); - if (node && node.getAttribute(attrName) === attrValue) return; - - // Remove and create a new tag in order to make it work with bookmarks in Safari - if (node) { - node.parentNode.removeChild(node); - } - if (typeof attrValue === 'string') { - const nextNode = document.createElement(tagName); - nextNode.setAttribute(keyName, keyValue); - nextNode.setAttribute(attrName, attrValue); - document.head.appendChild(nextNode); - } -} -function updateMeta(name, content) { - updateTag('meta', 'name', name, 'content', content); -} -function updateCustomMeta(property, content) { // eslint-disable-line no-unused-vars - updateTag('meta', 'property', property, 'content', content); -} -function updateLink(rel, href) { // eslint-disable-line no-unused-vars - updateTag('link', 'rel', rel, 'href', href); -} - -// Switch off the native scroll restoration behavior and handle it manually -// https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration -const scrollPositionsHistory = {}; -if (window.history && 'scrollRestoration' in window.history) { - window.history.scrollRestoration = 'manual'; -} - -let onRenderComplete = function initialRenderComplete() { - const elem = document.getElementById('css'); - if (elem) elem.parentNode.removeChild(elem); - onRenderComplete = function renderComplete(route, location) { - document.title = route.title; - - updateMeta('description', route.description); - // Update necessary tags in at runtime here, ie: - // updateMeta('keywords', route.keywords); - // updateCustomMeta('og:url', route.canonicalUrl); - // updateCustomMeta('og:image', route.imageUrl); - // updateLink('canonical', route.canonicalUrl); - // etc. - - let scrollX = 0; - let scrollY = 0; - const pos = scrollPositionsHistory[location.key]; - if (pos) { - scrollX = pos.scrollX; - scrollY = pos.scrollY; - } else { - const targetHash = location.hash.substr(1); - if (targetHash) { - const target = document.getElementById(targetHash); - if (target) { - scrollY = window.pageYOffset + target.getBoundingClientRect().top; - } - } - } - - // Restore the scroll position if it was saved into the state - // or scroll to the given #hash anchor - // or scroll to top of the page - window.scrollTo(scrollX, scrollY); - - // Google Analytics tracking. Don't send 'pageview' event after - // the initial rendering, as it was already sent - if (window.ga) { - window.ga('send', 'pageview', createPath(location)); - } - }; -}; - -// Make taps on links and buttons work fast on mobiles -FastClick.attach(document.body); - -const container = document.getElementById('app'); -let appInstance; -let currentLocation = history.location; -let routes = require('./routes').default; - -// Re-render the app when window.location changes -async function onLocationChange(location) { - // Remember the latest scroll position for the previous location - scrollPositionsHistory[currentLocation.key] = { - scrollX: window.pageXOffset, - scrollY: window.pageYOffset, - }; - // Delete stored scroll position for next page if any - if (history.action === 'PUSH') { - delete scrollPositionsHistory[location.key]; - } - currentLocation = location; - - try { - // Traverses the list of routes in the order they are defined until - // it finds the first route that matches provided URL path string - // and whose action method returns anything other than `undefined`. - const route = await UniversalRouter.resolve(routes, { - path: location.pathname, - query: queryString.parse(location.search), - }); - - // Prevent multiple page renders during the routing process - if (currentLocation.key !== location.key) { - return; - } - - if (route.redirect) { - history.replace(route.redirect); - return; - } - - appInstance = ReactDOM.render( - {route.component}, - container, - () => onRenderComplete(route, location), - ); - } catch (error) { - console.error(error); // eslint-disable-line no-console - - // Current url has been changed during navigation process, do nothing - if (currentLocation.key !== location.key) { - return; - } - - // Display the error in full-screen for development mode - if (process.env.NODE_ENV !== 'production') { - appInstance = null; - document.title = `Error: ${error.message}`; - ReactDOM.render(, container); - return; - } - - // Avoid broken navigation in production mode by a full page reload on error - window.location.reload(); - } -} - -// Handle client-side navigation by using HTML5 History API -// For more information visit https://github.com/mjackson/history#readme -history.listen(onLocationChange); -onLocationChange(currentLocation); - -// Enable Hot Module Replacement (HMR) -if (module.hot) { - module.hot.accept('./routes', () => { - routes = require('./routes').default; // eslint-disable-line global-require - - if (appInstance) { - try { - // Force-update the whole tree, including components that refuse to update - deepForceUpdate(appInstance); - } catch (error) { - appInstance = null; - document.title = `Hot Update Error: ${error.message}`; - ReactDOM.render(, container); - return; - } - } - - onLocationChange(currentLocation); - }); -} diff --git a/src/components/App.js b/src/components/App.js deleted file mode 100644 index 28ce58f..0000000 --- a/src/components/App.js +++ /dev/null @@ -1,52 +0,0 @@ -import React, { PropTypes } from 'react'; - -const ContextType = { - // Enables critical path CSS rendering - // https://github.com/kriasoft/isomorphic-style-loader - insertCss: PropTypes.func.isRequired, -}; - -/** - * The top-level React component setting context (global) variables - * that can be accessed from all the child components. - * - * https://facebook.github.io/react/docs/context.html - * - * Usage example: - * - * const context = { - * history: createBrowserHistory(), - * store: createStore(), - * }; - * - * ReactDOM.render( - * - * - * - * - * , - * container, - * ); - */ -class App extends React.PureComponent { - - static propTypes = { - context: PropTypes.shape(ContextType).isRequired, - children: PropTypes.element.isRequired, - }; - - static childContextTypes = ContextType; - - getChildContext() { - return this.props.context; - } - - render() { - // NOTE: If you need to add or modify header, footer etc. of the app, - // please do that inside the Layout component. - return React.Children.only(this.props.children); - } - -} - -export default App; diff --git a/src/components/Button/Button.css b/src/components/Button/Button.css deleted file mode 100644 index 0de60bc..0000000 --- a/src/components/Button/Button.css +++ /dev/null @@ -1,27 +0,0 @@ -@import '../variables.css'; - -.root { - display: block; - box-sizing: border-box; - margin: 0; - padding: 10px 16px; - width: 100%; - opacity: 0.75; - outline: 0; - border: 4px solid #fff; - border-radius: 14px; - background: var(--colour-nearblack); - color: #fff; - text-align: center; - text-decoration: none; - font-size: 18px; - line-height: 1.3333333; - cursor: pointer; - transition: opacity ease-in-out 0.25s, box-shadow ease-in-out 0.25s; -} - -.root:hover, -.root:focus { - opacity: 0.9; - box-shadow: 0 0 4px #fff; -} diff --git a/src/components/Button/Button.js b/src/components/Button/Button.js deleted file mode 100644 index 072c8ce..0000000 --- a/src/components/Button/Button.js +++ /dev/null @@ -1,28 +0,0 @@ -import React, { PropTypes } from 'react'; -import withStyles from 'isomorphic-style-loader/lib/withStyles'; -import s from './Button.css'; - -class Button extends React.Component { - static propTypes = { - to: PropTypes.string, - children: PropTypes.node, - onClick: PropTypes.func, - }; - - handleClick = (event) => { - if (this.props.onClick) { - this.props.onClick(event); - } - - if (this.props.to) { - window.location.href = this.props.to; - } - }; - - render() { - const { children, ...props } = this.props; - return ; - } -} - -export default withStyles(s)(Button); diff --git a/src/components/Button/package.json b/src/components/Button/package.json deleted file mode 100644 index 7fff590..0000000 --- a/src/components/Button/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Button", - "version": "1.0.0", - "private": true, - "main": "./Button.js" -} diff --git a/src/components/Html.js b/src/components/Html.js deleted file mode 100644 index 6107dbd..0000000 --- a/src/components/Html.js +++ /dev/null @@ -1,47 +0,0 @@ -import React, { PropTypes } from 'react'; -import { analytics } from '../config'; - -class Html extends React.Component { - static propTypes = { - title: PropTypes.string.isRequired, - description: PropTypes.string.isRequired, - style: PropTypes.string, - scripts: PropTypes.arrayOf(PropTypes.string.isRequired), - children: PropTypes.string, - }; - - render() { - const { title, description, style, scripts, children } = this.props; - return ( - - - - - {title} - - - - - {style &&