├── .babelrc ├── .editorconfig ├── .eslintrc ├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── .istanbul.yml ├── .npmrc ├── .travis.yml ├── LICENSE ├── README.md ├── appveyor.yml ├── config ├── auth.js └── passport.js ├── docs └── FAQ.md ├── models ├── item.js └── user.js ├── package.json ├── src ├── assets │ ├── fonts │ │ ├── fonts.css │ │ ├── roboto-black-webfont.woff │ │ ├── roboto-black-webfont.woff2 │ │ ├── roboto-blackitalic-webfont.woff │ │ ├── roboto-blackitalic-webfont.woff2 │ │ ├── roboto-bold-webfont.woff │ │ ├── roboto-bold-webfont.woff2 │ │ ├── roboto-bolditalic-webfont.woff │ │ ├── roboto-bolditalic-webfont.woff2 │ │ ├── roboto-italic-webfont.woff │ │ ├── roboto-italic-webfont.woff2 │ │ ├── roboto-light-webfont.woff │ │ ├── roboto-light-webfont.woff2 │ │ ├── roboto-lightitalic-webfont.woff │ │ ├── roboto-lightitalic-webfont.woff2 │ │ ├── roboto-medium-webfont.woff │ │ ├── roboto-medium-webfont.woff2 │ │ ├── roboto-mediumitalic-webfont.woff │ │ ├── roboto-mediumitalic-webfont.woff2 │ │ ├── roboto-regular-webfont.woff │ │ ├── roboto-regular-webfont.woff2 │ │ ├── roboto-thin-webfont.woff │ │ ├── roboto-thin-webfont.woff2 │ │ ├── roboto-thinitalic-webfont.woff │ │ ├── roboto-thinitalic-webfont.woff2 │ │ ├── robotomono-bold-webfont.woff │ │ ├── robotomono-bold-webfont.woff2 │ │ ├── robotomono-bolditalic-webfont.woff │ │ ├── robotomono-bolditalic-webfont.woff2 │ │ ├── robotomono-italic-webfont.woff │ │ ├── robotomono-italic-webfont.woff2 │ │ ├── robotomono-light-webfont.woff │ │ ├── robotomono-light-webfont.woff2 │ │ ├── robotomono-lightitalic-webfont.woff │ │ ├── robotomono-lightitalic-webfont.woff2 │ │ ├── robotomono-medium-webfont.woff │ │ ├── robotomono-medium-webfont.woff2 │ │ ├── robotomono-mediumitalic-webfont.woff │ │ ├── robotomono-mediumitalic-webfont.woff2 │ │ ├── robotomono-regular-webfont.woff │ │ ├── robotomono-regular-webfont.woff2 │ │ ├── robotomono-thin-webfont.woff │ │ ├── robotomono-thin-webfont.woff2 │ │ ├── robotomono-thinitalic-webfont.woff │ │ └── robotomono-thinitalic-webfont.woff2 │ └── images │ │ ├── arrow.svg │ │ └── menu.svg ├── components │ ├── AddItemPage │ │ ├── index.js │ │ └── styles.sass │ ├── App │ │ ├── index.js │ │ └── styles.sass │ ├── BasicInfo │ │ ├── index.js │ │ └── styles.sass │ ├── ErrorPage │ │ ├── index.js │ │ └── styles.sass │ ├── Footer │ │ ├── index.js │ │ └── styles.sass │ ├── Header │ │ ├── index.js │ │ └── styles.sass │ ├── Item │ │ ├── index.js │ │ └── styles.sass │ ├── ItemPage │ │ ├── index.js │ │ └── styles.sass │ ├── Login │ │ ├── index.js │ │ └── styles.sass │ ├── Main │ │ ├── index.js │ │ └── styles.sass │ ├── MyItems │ │ ├── index.js │ │ └── styles.sass │ ├── OtherInfo │ │ ├── index.js │ │ └── styles.sass │ ├── Profile │ │ ├── index.js │ │ └── styles.sass │ ├── ProposedTrade │ │ ├── index.js │ │ └── styles.sass │ ├── TradeRequest │ │ ├── index.js │ │ └── styles.sass │ ├── Trades │ │ ├── index.js │ │ └── styles.sass │ └── UserItem │ │ ├── index.js │ │ └── styles.sass ├── favicon.ico ├── index.ejs ├── index.js ├── reducers │ └── index.js ├── routes.js ├── store │ └── configureStore.js ├── styles │ ├── animation.sass │ ├── fonts.sass │ ├── global.sass │ ├── mediaqueries.sass │ └── variables.sass └── webpack-public-path.js ├── tools ├── .yarnclean ├── analyzeBundle.js ├── build.js ├── chalkConfig.js ├── distServer.js ├── fileMock.js ├── nodeVersionCheck.js ├── server.js ├── srcServer.js └── startMessage.js ├── webpack.config.dev.js ├── webpack.config.prod.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "react", 4 | "stage-1" 5 | ], 6 | "env": { 7 | "development": { 8 | "presets": [ 9 | "latest", 10 | "react-hmre" 11 | ] 12 | }, 13 | "production": { 14 | "presets": [ 15 | ["latest", { 16 | "es2015": { 17 | "modules": false 18 | } 19 | }], 20 | ], 21 | "plugins": [ 22 | "transform-react-constant-elements", 23 | "transform-react-remove-prop-types" 24 | ] 25 | }, 26 | "test": { 27 | "presets": [ 28 | "latest" 29 | ] 30 | } 31 | } 32 | } 33 | 34 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends": [ 4 | "eslint:recommended", 5 | "plugin:import/errors", 6 | "plugin:import/warnings" 7 | ], 8 | "plugins": [ 9 | "react" 10 | ], 11 | "parser": "babel-eslint", 12 | "parserOptions": { 13 | "ecmaVersion": 6, 14 | "sourceType": "module", 15 | "ecmaFeatures": { 16 | "jsx": true, 17 | "experimentalObjectRestSpread": true 18 | } 19 | }, 20 | "env": { 21 | "es6": true, 22 | "browser": true, 23 | "node": true, 24 | "jquery": true, 25 | "jest": true 26 | }, 27 | "rules": { 28 | "quotes": 0, 29 | "no-console": 1, 30 | "no-debugger": 1, 31 | "no-var": 1, 32 | "semi": [1, "always"], 33 | "no-trailing-spaces": 0, 34 | "eol-last": 0, 35 | "no-underscore-dangle": 0, 36 | "no-alert": 0, 37 | "no-lone-blocks": 0, 38 | "jsx-quotes": 1, 39 | "react/display-name": [ 1, {"ignoreTranspilerName": false }], 40 | "react/forbid-prop-types": [1, {"forbid": ["any"]}], 41 | "react/jsx-boolean-value": 0, 42 | "react/jsx-closing-bracket-location": 0, 43 | "react/jsx-curly-spacing": 1, 44 | "react/jsx-indent-props": 0, 45 | "react/jsx-key": 1, 46 | "react/jsx-max-props-per-line": 0, 47 | "react/jsx-no-bind": 0, 48 | "react/jsx-no-duplicate-props": 1, 49 | "react/jsx-no-literals": 0, 50 | "react/jsx-no-undef": 1, 51 | "react/jsx-pascal-case": 1, 52 | "react/jsx-sort-prop-types": 0, 53 | "react/jsx-sort-props": 0, 54 | "react/jsx-uses-react": 1, 55 | "react/jsx-uses-vars": 1, 56 | "react/jsx-wrap-multilines": 1, 57 | "react/no-danger": 1, 58 | "react/no-did-mount-set-state": 1, 59 | "react/no-did-update-set-state": 1, 60 | "react/no-direct-mutation-state": 1, 61 | "react/no-multi-comp": 1, 62 | "react/no-set-state": 0, 63 | "react/no-unknown-property": 1, 64 | "react/prefer-es6-class": 1, 65 | "react/prop-types": 1, 66 | "react/react-in-jsx-scope": 1, 67 | "import/extensions": 1, 68 | "react/self-closing-comp": 1, 69 | "react/sort-comp": 1 70 | }, 71 | "globals": { 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Node version: 2 | 3 | npm version: 4 | 5 | Operating system: 6 | 7 | Command line used: 8 | 9 | Steps to reproduce: 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log* 4 | 5 | # Runtime data 6 | pids 7 | *.pid 8 | *.seed 9 | 10 | # Directory for instrumented libs generated by jscoverage/JSCover 11 | lib-cov 12 | 13 | # Coverage directory used by tools like istanbul 14 | coverage 15 | 16 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 17 | .grunt 18 | 19 | # node-waf configuration 20 | .lock-wscript 21 | 22 | # Compiled binary addons (http://nodejs.org/api/addons.html) 23 | build/Release 24 | 25 | # Dependency directory 26 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 27 | node_modules 28 | 29 | #dist folder 30 | dist 31 | 32 | # IDEA/Webstorm project files 33 | .idea 34 | *.iml 35 | 36 | #VSCode metadata 37 | .vscode 38 | 39 | # Mac files 40 | .DS_Store 41 | 42 | # Env file 43 | .env 44 | -------------------------------------------------------------------------------- /.istanbul.yml: -------------------------------------------------------------------------------- 1 | instrumentation: 2 | excludes: ['*.spec.js'] 3 | extensions: ['.js'] 4 | include-all-sources: true 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | save-exact=true 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | cache: yarn 3 | node_js: 4 | - "6" 5 | - "5" 6 | - "4" 7 | after_success: 8 | # Send coverage data to coveralls. 9 | - yarn run test:cover:travis 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Arshad Khan 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## react-redux-template-for-ecommerce-site 2 | 3 | A beautiful e-commerce template with flat design. 4 | 5 | ## Installation 6 | 7 | * Install yarn globally by `npm install yarn -g` 8 | * `yarn install` 9 | * `yarn start` 10 | 11 | Open `localhost:8080` to open the app! 12 | 13 | Demo - https://react-template-arshad.now.sh/ 14 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # Test against this version of Node.js 2 | environment: 3 | matrix: 4 | # node.js 5 | - nodejs_version: "6" 6 | - nodejs_version: "5" 7 | - nodejs_version: "4" 8 | 9 | # Install scripts. (runs after repo cloning) 10 | install: 11 | # Get the latest stable version of Node.js or io.js 12 | - ps: Install-Product node $env:nodejs_version 13 | # install modules 14 | - yarn 15 | 16 | cache: 17 | - "%LOCALAPPDATA%\\Yarn" 18 | 19 | # Post-install test scripts. 20 | test_script: 21 | # Output useful info for debugging. 22 | - node --version 23 | - npm --version 24 | # run tests 25 | - npm test 26 | 27 | # Don't actually build. 28 | build: off 29 | 30 | notifications: 31 | - provider: Email 32 | to: 33 | - housecor@gmail.com 34 | subject: 'Build failed: react-slingshot' 35 | message: The continuous integration build failed. See https://ci.appveyor.com/project/CoryHouse/react-slingshot/ for details. 36 | on_build_success: false 37 | on_build_failure: true 38 | on_build_status_changed: false 39 | -------------------------------------------------------------------------------- /config/auth.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = { 4 | 'facebookAuth': { 5 | 'clientID': process.env.FACEBOOK_KEY, 6 | 'clientSecret': process.env.FACEBOOK_SECRET, 7 | 'callbackURL': process.env.APP_URL + 'auth/facebook/callback' 8 | }, 9 | 'twitterAuth': { 10 | 'clientID': process.env.TWITTER_KEY, 11 | 'clientSecret': process.env.TWITTER_SECRET, 12 | 'callbackURL': process.env.APP_URL + 'auth/twitter/callback' 13 | }, 14 | 'googleAuth': { 15 | 'clientID': process.env.GOOGLE_KEY, 16 | 'clientSecret': process.env.GOOGLE_SECRET, 17 | 'callbackURL': process.env.APP_URL + 'auth/google/callback' 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /config/passport.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const GoogleStrategy = require('passport-google-oauth').OAuth2Strategy; 4 | const FacebookStrategy = require('passport-facebook').Strategy; 5 | const TwitterStrategy = require('passport-twitter').Strategy; 6 | const User = require('../models/user'); 7 | const configAuth = require('./auth'); 8 | 9 | module.exports = function (passport) { 10 | passport.serializeUser((user, done) => { 11 | done(null, user.id); 12 | }); 13 | 14 | passport.deserializeUser((id, done) => { 15 | User.findById(id, function (err, user) { 16 | done(err, user); 17 | }); 18 | }); 19 | 20 | passport.use(new TwitterStrategy({ 21 | consumerKey: configAuth.twitterAuth.clientID, 22 | consumerSecret: configAuth.twitterAuth.clientSecret, 23 | callbackURL: configAuth.twitterAuth.callbackURL 24 | }, 25 | (token, tokenSecret, profile, done) => { 26 | process.nextTick(function () { 27 | User.findOne({ 'twitter.id': profile.id }, (err, user) => { 28 | if (err) 29 | return done(err); 30 | if (user) { 31 | return done(null, user); 32 | } else { 33 | const newUser = new User(); 34 | newUser.twitter.id = profile.id; 35 | newUser.twitter.token = token; 36 | newUser.twitter.username = profile.username; 37 | newUser.name = profile.displayName; 38 | newUser.dp = profile.photos[0].value || "/public/img/user.png"; 39 | newUser.pollsCount = 0; 40 | newUser.pollsVotedCount = 0; 41 | newUser.address = null; 42 | newUser.booksPosted = []; 43 | newUser.booksBought = []; 44 | 45 | newUser.save((err) => { 46 | if (err) 47 | throw err; 48 | return done(null, newUser); 49 | }); 50 | } 51 | }); 52 | }); 53 | 54 | })); 55 | 56 | passport.use(new FacebookStrategy({ 57 | clientID: configAuth.facebookAuth.clientID, 58 | clientSecret: configAuth.facebookAuth.clientSecret, 59 | callbackURL: configAuth.facebookAuth.callbackURL 60 | }, 61 | (token, refreshToken, profile, done) => { 62 | process.nextTick(function () { 63 | User.findOne({ 'facebook.id': profile.id }, (err, user) => { 64 | if (err) 65 | return done(err); 66 | if (user) { 67 | return done(null, user); 68 | } else { 69 | const newUser = new User(); 70 | newUser.facebook.id = profile.id; 71 | newUser.facebook.token = token; 72 | newUser.name = profile.displayName; 73 | newUser.facebook.email = (profile.emails && profile.emails[0].value) || "Email not added"; 74 | newUser.dp = profile.image || "/public/img/user.png"; 75 | newUser.pollsCount = 0; 76 | newUser.pollsVotedCount = 0; 77 | newUser.address = null; 78 | newUser.booksPosted = []; 79 | newUser.booksBought = []; 80 | 81 | newUser.save((err) => { 82 | if (err) 83 | throw err; 84 | return done(null, newUser); 85 | }); 86 | } 87 | }); 88 | }); 89 | 90 | })); 91 | 92 | passport.use(new GoogleStrategy({ 93 | clientID: configAuth.googleAuth.clientID, 94 | clientSecret: configAuth.googleAuth.clientSecret, 95 | callbackURL: configAuth.googleAuth.callbackURL, 96 | }, 97 | (token, refreshToken, profile, done) => { 98 | process.nextTick(() => { 99 | User.findOne({ 'google.id': profile.id }, (err, user) => { 100 | if (err) 101 | return done(err); 102 | if (user) { 103 | return done(null, user); 104 | } else { 105 | const newUser = new User(); 106 | newUser.google.id = profile.id; 107 | newUser.google.token = token; 108 | newUser.name = profile.displayName; 109 | newUser.google.email = profile.emails[0].value; // pull the first email 110 | newUser.dp = profile.photos[0].value || "/public/img/user.png"; 111 | newUser.pollsCount = 0; 112 | newUser.pollsVotedCount = 0; 113 | newUser.address = null; 114 | newUser.booksPosted = []; 115 | newUser.booksBought = []; 116 | 117 | newUser.save((err) => { 118 | if (err) 119 | throw err; 120 | return done(null, newUser); 121 | }); 122 | } 123 | }); 124 | }); 125 | 126 | })); 127 | }; 128 | -------------------------------------------------------------------------------- /docs/FAQ.md: -------------------------------------------------------------------------------- 1 | ##FAQ 2 | ###Why does this exist? 3 | This starter kit implements best practices like testing, minification, bundling, and so on. It codifies a long list of decisions that you no longer have to make to get rolling. It saves you from the long, painful process of wiring it all together into an automated dev environment and build process. It's also useful as inspiration for ideas you might want to integrate into your current development environment or build process. 4 | 5 | ###What do the scripts in package.json do? 6 | Unfortunately, scripts in package.json can't be commented inline because the JSON spec doesn't support comments, so I'm providing info on what each script in package.json does here. 7 | 8 | | **Script** | **Description** | 9 | |----------|-------| 10 | | remove-demo | Removes the demo application so you can begin development. | 11 | | prestart | Runs automatically before start. Calls remove-dist script which deletes the dist folder. This helps remind you to run the build script before committing since the dist folder will be deleted if you don't. ;) | 12 | | start | Runs tests, lints, starts dev webserver, and opens the app in your default browser. | 13 | | lint:tools | Runs ESLint on build related JS files. (eslint-loader lints src files via webpack when `npm start` is run) | 14 | | clean-dist | Removes everything from the dist folder. | 15 | | remove-dist | Deletes the dist folder. | 16 | | create-dist | Creates the dist folder and the necessary subfolders. | 17 | | prebuild | Runs automatically before build script (due to naming convention). Cleans dist folder, builds html, and builds sass. | 18 | | build | Bundles all JavaScript using webpack and writes it to /dist. | 19 | | test | Runs tests (files ending in .spec.js or .test.js) using Jest and outputs results to the command line. Watches all files so tests are re-run upon save. | 20 | | test:cover | Runs tests as described above. Generates a HTML coverage report to ./coverage/index.html | 21 | | test:cover:travis | Runs coverage as described above, however sends machine readable lcov data to Coveralls. This should only be used from the travis build! | 22 | | analyze-bundle | Analyzes webpack bundles for production and gives you a breakdown of where modules are used and their sizes via a convenient interactive zoomable treemap. | 23 | 24 | ### Can you explain the folder structure? 25 | ``` 26 | . 27 | ├── .babelrc # Configures Babel 28 | ├── .editorconfig # Configures editor rules 29 | ├── .eslintrc # Configures ESLint 30 | ├── .gitignore # Tells git which files to ignore 31 | ├── .istanbul.yml # Configure istanbul code coverage 32 | ├── .npmrc # Configures npm to save exact by default 33 | ├── README.md # This file. 34 | ├── dist # Folder where the build script places the built app. Use this in prod. 35 | ├── package.json # Package configuration. The list of 3rd party libraries and utilities 36 | ├── src # Source code 37 | │   ├── actions # Flux/Redux actions. List of distinct actions that can occur in the app. 38 | │   ├── components # React components 39 | │   ├── constants # Application constants including constants for Redux 40 | │   ├── containers # Top-level React components that interact with Redux 41 | │   ├── favicon.ico # favicon to keep your browser from throwing a 404 during dev. Not actually used in prod build. 42 | │   ├── index.ejs # Template for homepage 43 | │   ├── index.js # Entry point for your app 44 | │   ├── reducers # Redux reducers. Your state is altered here based on actions 45 | │   ├── store # Redux store configuration 46 | │   ├── styles # CSS Styles, typically written in Sass 47 | │   └── utils # Plain old JS objects (POJOs). Pure logic. No framework specific code here. 48 | ├── tools # Node scripts that run build related tools 49 | │   ├── setup # Scripts for setting up a new project using React Slingshot 50 | │ │   ├── setup.js # Configure project set up 51 | │ │   ├── setupMessage.js # Display message when beginning set up 52 | │ │   └── setupPrompts.js # Configure prompts for set up 53 | │   ├── build.js # Runs the production build 54 | │   ├── chalkConfig.js # Centralized configuration for chalk (adds color to console statements) 55 | │   ├── distServer.js # Starts webserver and opens final built app that's in dist in your default browser 56 | │   ├── nodeVersionCheck.js # Confirm supported Node version is installed 57 | │   ├── removeDemo.js # Remove demo app 58 | │   ├── srcServer.js # Starts dev webserver with hot reloading and opens your app in your default browser 59 | │   ├── startMessage.js # Display message when development build starts 60 | │   └── analyzeBundle.js # Analyzes the webpack bundle 61 | ├── webpack.config.dev.js # Configures webpack for development builds 62 | └── webpack.config.prod.js # Configures webpack for production builds 63 | ``` 64 | 65 | ### What are the dependencies in package.json used for? 66 | | **Dependency** | **Use** | 67 | |----------|-------| 68 | |autoprefixer | Automatically adds vendor prefixes, using data from Can I Use. | 69 | |object-assign | Polyfill for Object.assign | 70 | |babel-cli|Babel Command line interface | 71 | |babel-core|Babel Core for transpiling the new JavaScript to old | 72 | |babel-eslint|Integrates Babel with ESLint so experimental JS features ESLint doesn't support yet can be linted. 73 | |babel-jest|Integrates Babel with Jest so tests are transpiled| 74 | |babel-loader|Adds Babel support to Webpack | 75 | |babel-polyfill|Polyfills features that cannot be transpiled| 76 | |babel-plugin-react-display-name| Add displayName to React.createClass calls | 77 | |babel-plugin-transform-react-constant-elements | Performance optimization: Hoists the creation of elements that are fully static to the top level. reduces calls to React.createElement and the resulting memory allocations. [More info](https://medium.com/doctolib-engineering/improve-react-performance-with-babel-16f1becfaa25#.2wbkg8g4d) | 78 | |babel-preset-latest|Babel preset for ES2015, ES2016 and ES2017| 79 | |babel-preset-react-hmre|Hot reloading preset for Babel| 80 | |babel-preset-react| Add JSX support to Babel | 81 | |babel-preset-stage-1| Include stage 1 feature support in Babel | 82 | |browser-sync| Supports synchronized testing on multiple devices and serves local app on public URL | 83 | |chalk|Adds color support to terminal | 84 | |connect-history-api-fallback | Support reloading deep links | 85 | |coveralls|For tracking and displaying code coverage information via Coveralls.io| 86 | |cross-env|Cross-environment friendly way to handle environment variables| 87 | |css-loader|Add CSS support to Webpack| 88 | |enzyme|Simplified JavaScript Testing utilities for React| 89 | |eslint|Lints JavaScript | 90 | |eslint-loader|Adds ESLint support to Webpack | 91 | |eslint-plugin-import|Adds ES6 import related linting rules| 92 | |eslint-plugin-react|Adds additional React-related rules to ESLint| 93 | |eslint-watch|Wraps ESLint to provide file watch support and enhanced command line output| 94 | |extract-text-webpack-plugin| Extracts CSS into separate file for production build | 95 | |file-loader| Adds file loading support to Webpack | 96 | |html-webpack-plugin|Generates custom index.html for each environment as part of webpack build| 97 | |identity-obj-proxy|Mocks webpack imports that Jest doesn't understand such as image and CSS imports.| 98 | |jest|Testing framework| 99 | |json-loader|Enhance Webpack to support importing .json files| 100 | |mockdate|Mock dates in testing| 101 | |node-sass| Adds SASS support to Webpack | 102 | |npm-run-all| Run multiple scripts at the same time | 103 | |open|Open the app in your default browser| 104 | |postcss-loader| Adds PostCSS support to Webpack | 105 | |react|React library | 106 | |react-addons-test-utils| React Testing Utilities | 107 | |redux-immutable-state-invariant|Alert if Redux state is mutated (helps catch bugs, since Redux state is immutable)| 108 | |react-dom|React library for DOM rendering | 109 | |react-redux|Redux library for connecting React components to Redux | 110 | |react-router|React library for routing | 111 | |redux|Library for unidirectional data flows | 112 | |redux-thunk|Middleware for redux that allows actions to be declared as functions | 113 | |replace|Renaming files, cross-platform| 114 | |rimraf|Delete files, cross-platform | 115 | |sass-loader| Adds Sass support to Webpack| 116 | |style-loader| Add Style support to Webpack | 117 | |url-loader|Add Webpack support for loading files via url with querystring | 118 | |webpack| Bundler with plugin system and integrated development server | 119 | |webpack-bundle-analyzer| Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap | 120 | |webpack-dev-middleware| Used to integrate Webpack with Browser-sync | 121 | |webpack-hot-middleware| Use to integrate Webpack's hot reloading support with Browser-sync | 122 | |webpack-md5-hash| Hash bundles, and use the hash for the filename so that the filename only changes when contents change| 123 | 124 | ### Where are the files being served from when I run `npm start`? 125 | Webpack serves your app in memory when you run `npm start`. No physical files are written. However, the web root is /src, so you can reference files under /src in index.html. When the app is built using `npm run build`, physical files are written to /dist and the app is served from /dist. 126 | 127 | ### Where is index.html? 128 | It's generated by webpack using htmlWebpackPlugin. This plugin dynamically generates index.html based on the configuration in webpack.config. It also adds references to the JS and CSS bundles using hash-based filenames to bust cache. Separate bundles for vendor and application code are created and referencing within the generated index.html file so that vendor libraries and app code can be cached separately by the browser. The bundle filenames are based on the file's hash, so the filenames only change when the file contents change. For more information on this, read [Long-term caching of static assets with Webpack](https://medium.com/@okonetchnikov/long-term-caching-of-static-assets-with-webpack-1ecb139adb95#.4aeatmtfz) and [html-webpack-plugin](https://github.com/ampedandwired/html-webpack-plugin) 129 | 130 | ### How is Sass being converted into CSS and landing in the browser? 131 | Magic! Okay, more specifically, we're handling it differently in dev (`npm start`) vs prod (`npm run build`) 132 | 133 | When you run `npm start`: 134 | 135 | 1. The sass-loader compiles Sass into CSS 136 | 2. Webpack bundles the compiled CSS into bundle.js. Sounds odd, but it works! 137 | 3. bundle.js contains code that loads styles into the <head> of index.html via JavaScript. This is why you don't see a stylesheet reference in index.html. In fact, if you disable JavaScript in your browser, you'll see the styles don't load either. 138 | 139 | The approach above supports hot reloading, which is great for development. However, it also create a flash of unstyled content on load because you have to wait for the JavaScript to parse and load styles before they're applied. So for the production build, we use a different approach: 140 | 141 | When you run `npm run build`: 142 | 143 | 1. The sass-loader compiles Sass into CSS 144 | 2. The [extract-text-webpack-plugin](https://github.com/webpack/extract-text-webpack-plugin) extracts the compiled Sass into styles.css 145 | 3. buildHtml.js adds a reference to the stylesheet to the head of index.html. 146 | 147 | For both of the above methods, a separate sourcemap is generated for debugging Sass in [compatible browsers](http://thesassway.com/intermediate/using-source-maps-with-sass). 148 | 149 | ### I don't like the magic you just described above. I simply want to use a CSS file. 150 | No problem. Reference your CSS file in index.html, and add a step to the build process to copy your CSS file over to the same relative location /dist as part of the build step. But be forwarned, you lose style hot reloading with this approach. 151 | 152 | ### I just want an empty starter kit. 153 | This starter kit includes an example app so you can see how everything hangs together on a real app. When you're done reviewing it, run this to remove the demo app: 154 | 155 | `npm run remove-demo` 156 | 157 | Don't want to use Redux? See the next question for some steps on removing Redux. 158 | 159 | ### Do I have to use Redux? 160 | Nope. Redux is useful for applications with more complex data flows. If your app is simple, Redux is overkill. Remove Redux like this: 161 | 162 | 1. Run `npm run remove-demo` 163 | 2. Uninstall Redux related packages: `npm uninstall redux react-redux redux-thunk` 164 | 3. Create a new empty component in /components. 165 | 4. Call render on the new top level component you created in step 3 in src/index.js. 166 | 167 | ### How do I remove React Router? 168 | 1. Uninstall React Router and routing related packages: `npm uninstall --save react-router` 169 | 2. Delete the following files: `src/routes.js` 170 | 3. Remove `import { Link, IndexLink } from 'react-router';` from top of `src/components/App.js`, add a reference to `src/components/FuelSavingsForm.js`, and replace body of (implicit) render with this: ``. 171 | 172 | ### How do I deploy this? 173 | `npm run build`. This will build the project for production. It does the following: 174 | * Minifies all JS 175 | * Sets NODE_ENV to prod so that React is built in production mode 176 | * Places the resulting built project files into /dist. (This is the folder you'll expose to the world). 177 | 178 | ### Why are test files placed alongside the file under test (instead of centralized)? 179 | Streamlined automated testing is a core feature of this starter kit. All tests are placed in files that end in .spec.js. Spec files are placed in the same directory as the file under test. Why? 180 | + The existence of tests is highly visible. If a corresponding .spec file hasn't been created, it's obvious. 181 | + Easy to open since they're in the same folder as the file being tested. 182 | + Easy to create new test files when creating new source files. 183 | + Short import paths are easy to type and less brittle. 184 | + As files are moved, it's easy to move tests alongside. 185 | 186 | That said, you can of course place your tests under __test__ instead. Then Jest will simply look in /test to find your spec files. 187 | 188 | ### How do I debug? 189 | Since browsers don't currently support ES6, we're using Babel to compile our ES6 down to ES5. This means the code that runs in the browser looks different than what we wrote. But good news, a [sourcemap](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) is generated to enable easy debugging. This means your original JS source will be displayed in your browser's dev console. 190 | *Note:* When you run `npm start`, no JS is minified. Why? Because minifying slows the build. So JS is only minified when you run the `npm run build` script. See [more on building for production above](https://github.com/coryhouse/react-slingshot/blob/master/docs/FAQ.md#how-do-i-deploy-this). 191 | 192 | Also note that no actual physical files are written to the filesystem during the dev build. **For performance, all files exist in memory when served from the webpack server.**. Physical files are only written when you run `npm run build`. 193 | 194 | **Tips for debugging via sourcemaps:** 195 | 196 | 1. Browsers vary in the way they allow you to view the original source. Chrome automatically shows the original source if a sourcemap is available. Safari, in contrast, will display the minified source and you'll [have to cmd+click on a given line to be taken to the original source](http://stackoverflow.com/questions/19550060/how-do-i-toggle-source-mapping-in-safari-7). 197 | 2. Do **not** enable serving files from your filesystem in Chrome dev tools. If you do, Chrome (and perhaps other browsers) may not show you the latest version of your code after you make a source code change. Instead **you must close the source view tab you were using and reopen it to see the updated source code**. It appears Chrome clings to the old sourcemap until you close and reopen the source view tab. To clarify, you don't have to close the actual tab that is displaying the app, just the tab in the console that's displaying the source file that you just changed. 198 | 3. If the latest source isn't displaying the console, force a refresh. Sometimes Chrome seems to hold onto a previous version of the sourcemap which will cause you to see stale code. 199 | 200 | #### Debugging in Visual Studio Code: 201 | * Install the [Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) extension. 202 | * Follow the instructions on how to [configure debugging in Visual Studio code](https://github.com/Microsoft/vscode-chrome-debug/blob/master/README.md#using-the-debugger). 203 | 204 | Don't see your favorite code editor debugging configuration here? Submit a PR and we'll be glad to add it to the FAQ.md. 205 | 206 | ### Why does the build use npm scripts instead of Gulp or Grunt? 207 | In short, Gulp is an unnecessary abstraction that creates more problems than it solves. [Here's why](https://medium.com/@housecor/why-i-left-gulp-and-grunt-for-npm-scripts-3d6853dd22b8#.vtaziro8n). 208 | 209 | ### Why does package.json reference the exact version? 210 | This assures that the build won't break when some new version is released. Unfortunately, many package authors don't properly honor [Semantic Versioning](http://semver.org), so instead, as new versions are released, we'll test them and then introduce them into React Slingshot. But yes, this means when you do `npm update` no new dependencies will be pulled down. You'll have to update package.json with the new version manually. 211 | 212 | ### How do I handle images? 213 | Via Webpack's file loader. Example: 214 | 215 | ``` 216 | 217 | 218 | ``` 219 | 220 | Webpack will then intelligently handle your image for you. For the production build, it will copy the physical file to /dist, give it a unique filename, and insert the appropriate path in your image tag. 221 | 222 | ### I'm getting an error when running npm install: Failed to locate "CL.exe" 223 | On Windows, you need to install extra dependencies for browser-sync to build and install successfully. Follow the getting started steps above to assure you have the necessary dependencies on your machine. 224 | 225 | ### I can't access the external URL for Browsersync 226 | To hit the external URL, all devices must be on the same LAN. So this may mean your dev machine needs to be on the same Wifi as the mobile devices you're testing. Alternatively, you can use a tool like [localtunnel](https://localtunnel.github.io/www/) or [ngrok](https://ngrok.com) to expose your app via a public URL. This way, you can interact with the Browsersync hosted app on any device. 227 | 228 | ### What about the Redux Devtools? 229 | Install the [Redux devtools extension](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd?hl=en) in Chrome Developer Tools. If you're interested in running Redux dev tools cross-browser, Barry Staes created a [branch with the devtools incorporated](https://github.com/coryhouse/react-slingshot/pull/27). 230 | 231 | ### Hot reloading isn't working! 232 | Hot reloading doesn't always play nicely with stateless functional components at this time. [This is a known limitation that is currently being worked](https://github.com/gaearon/babel-plugin-react-transform/issues/57). To avoid issues with hot reloading for now, use a traditional class-based React component at the top of your component hierarchy. 233 | 234 | ### How do I setup code coverage reporting? 235 | Use the `npm run test:cover` command to run the tests, building a code coverage report. The report is written to `/coverage/lcov-report/index.html`. Slingshot provides a script for this: 236 | 237 | ```bash 238 | npm run open:cover 239 | ``` 240 | 241 | You can add code coverage metrics to your `README.md` file and pull by integrating with [Coveralls](https://coveralls.io/). 242 | 243 | 1. Sign in to Coveralls with your GitHub account. 244 | 2. Authorise Coveralls to access your repositories. 245 | 3. Choose 'Add Repo' and select your repo. 246 | 247 | That's it! Travis will now execute the `npm run test:cover:travis` script after a successful build, which will write the coverage report in the standard lcov format and send it directly to Coveralls. The environment variables provided for travis jobs are used to automatically target the correct Coveralls project, as long as it is set up as described above. 248 | 249 | You can get the badge from the Coveralls website. 250 | 251 | ###What about TypeScript? 252 | Here's a [fork with TS support](https://github.com/typescriptcrew/ts-react-slingshot): 253 | 254 | -------------------------------------------------------------------------------- /models/item.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mongoose = require('mongoose'); 4 | const Schema = mongoose.Schema; 5 | 6 | const Item = new Schema({ 7 | name: String, 8 | picture: String, 9 | price: String, 10 | currency: String, 11 | negotiable: Boolean, 12 | condition: String, 13 | publicationYear: Number, 14 | isbnNo: String, 15 | address: { 16 | houseNo: String, 17 | city: String, 18 | state: String, 19 | landmark: String, 20 | street: String, 21 | pinCode: String 22 | }, 23 | tradeQueries: Array, 24 | bought: Boolean 25 | }); 26 | 27 | module.exports = mongoose.model('Item', Item); 28 | -------------------------------------------------------------------------------- /models/user.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mongoose = require('mongoose'); 4 | const Schema = mongoose.Schema; 5 | 6 | const User = new Schema({ 7 | name: String, 8 | picture: String, 9 | booksPosted: Array, 10 | booksBought: Array, 11 | address: { 12 | houseNo: String, 13 | city: String, 14 | state: String, 15 | landmark: String, 16 | street: String, 17 | pinCode: String 18 | }, 19 | google: { 20 | id: String, 21 | token: String, 22 | email: String 23 | }, 24 | twitter: { 25 | id: String, 26 | token: String, 27 | username: String 28 | }, 29 | facebook: { 30 | id: String, 31 | token: String, 32 | email: String 33 | } 34 | }); 35 | 36 | module.exports = mongoose.model('User', User); 37 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-redux-template-for-ecommerce-site", 3 | "version": "0.1.0", 4 | "description": "A beautiful e-commerce template with a flat design.", 5 | "engines": { 6 | "npm": ">=3" 7 | }, 8 | "scripts": { 9 | "preinstall": "node tools/nodeVersionCheck.js", 10 | "setup": "node tools/setup/setupMessage.js && npm install && node tools/setup/setup.js", 11 | "start-message": "babel-node tools/startMessage.js", 12 | "prestart": "npm-run-all --parallel start-message", 13 | "start": "npm-run-all --parallel open:src lint:watch", 14 | "open:src": "babel-node tools/server.js development", 15 | "open:dist": "babel-node tools/server.js production", 16 | "lint": "esw webpack.config.* src tools --color", 17 | "lint:watch": "npm run lint -- --watch", 18 | "clean-dist": "npm run remove-dist && mkdir dist", 19 | "remove-dist": "rimraf ./dist", 20 | "prebuild": "npm run clean-dist && npm run lint && npm run test", 21 | "build": "babel-node tools/build.js && npm run open:dist", 22 | "test": "node --harmony_proxies node_modules/jest/bin/jest", 23 | "test:cover": "npm run test -- --coverage ", 24 | "test:cover:travis": "npm run test:cover && cat ./coverage/lcov.info | node_modules/coveralls/bin/coveralls.js", 25 | "test:watch": "npm run test -- --watch", 26 | "open:cover": "npm run test:cover && open coverage/lcov-report/index.html", 27 | "analyze-bundle": "babel-node ./tools/analyzeBundle.js" 28 | }, 29 | "author": "Arshad Khan ", 30 | "license": "MIT", 31 | "dependencies": { 32 | "body-parser": "^1.16.1", 33 | "dotenv": "^4.0.0", 34 | "express-session": "^1.15.1", 35 | "mongoose": "^4.8.2", 36 | "object-assign": "4.1.0", 37 | "passport": "^0.3.2", 38 | "passport-facebook": "^2.1.1", 39 | "passport-google-oauth": "^1.0.0", 40 | "passport-twitter": "^1.0.4", 41 | "react": "15.4.1", 42 | "react-addons-css-transition-group": "^15.4.2", 43 | "react-dom": "15.4.1", 44 | "react-redux": "5.0.1", 45 | "react-router": "3.0.0", 46 | "react-router-redux": "4.0.7", 47 | "react-tap-event-plugin": "^2.0.1", 48 | "redux": "3.6.0", 49 | "redux-thunk": "2.1.0" 50 | }, 51 | "devDependencies": { 52 | "autoprefixer": "6.5.4", 53 | "babel-cli": "6.18.0", 54 | "babel-core": "6.20.0", 55 | "babel-eslint": "7.1.1", 56 | "babel-jest": "18.0.0", 57 | "babel-loader": "6.2.10", 58 | "babel-plugin-transform-react-constant-elements": "6.9.1", 59 | "babel-plugin-transform-react-remove-prop-types": "0.2.11", 60 | "babel-polyfill": "6.20.0", 61 | "babel-preset-latest": "6.16.0", 62 | "babel-preset-react": "6.16.0", 63 | "babel-preset-react-hmre": "1.1.1", 64 | "babel-preset-stage-1": "6.16.0", 65 | "browser-sync": "2.18.5", 66 | "chalk": "1.1.3", 67 | "connect-history-api-fallback": "1.3.0", 68 | "coveralls": "2.11.15", 69 | "css-loader": "0.26.1", 70 | "enzyme": "2.6.0", 71 | "eslint": "3.12.2", 72 | "eslint-plugin-import": "2.2.0", 73 | "eslint-plugin-react": "6.8.0", 74 | "eslint-watch": "2.1.14", 75 | "extract-text-webpack-plugin": "2.0.0-beta.4", 76 | "file-loader": "0.9.0", 77 | "html-webpack-plugin": "2.24.1", 78 | "identity-obj-proxy": "3.0.0", 79 | "jest": "18.1.0", 80 | "json-loader": "0.5.4", 81 | "mockdate": "2.0.1", 82 | "node-sass": "4.0.0", 83 | "npm-run-all": "3.1.2", 84 | "open": "0.0.5", 85 | "postcss-loader": "1.2.1", 86 | "prompt": "1.0.0", 87 | "react-addons-test-utils": "15.4.1", 88 | "redux-immutable-state-invariant": "1.2.4", 89 | "replace": "0.3.0", 90 | "rimraf": "2.5.4", 91 | "sass-loader": "4.1.0", 92 | "style-loader": "0.13.1", 93 | "url-loader": "0.5.7", 94 | "webpack": "2.2.1", 95 | "webpack-bundle-analyzer": "2.1.1", 96 | "webpack-dev-middleware": "1.9.0", 97 | "webpack-hot-middleware": "2.13.2", 98 | "webpack-md5-hash": "0.0.5" 99 | }, 100 | "keywords": ["react", "redux", "ecommerce", "Arshad Khan", "react-slingshot", "express", "node"], 101 | "repository": { 102 | "type": "git", 103 | "url": "https://github.com/arshdkhn1/react-redux-template-for-ecommerce-site.git" 104 | }, 105 | "jest": { 106 | "moduleNameMapper": { 107 | "\\.(css|scss)$": "identity-obj-proxy", 108 | "^.+\\.(gif|ttf|eot|svg|woff|woff2|ico)$": "/tools/fileMock.js" 109 | } 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /src/assets/fonts/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'robotoblack'; 3 | src: url('roboto-black-webfont.woff2') format('woff2'), 4 | url('roboto-black-webfont.woff') format('woff'); 5 | font-weight: normal; 6 | font-style: normal; 7 | 8 | } 9 | 10 | 11 | 12 | 13 | @font-face { 14 | font-family: 'robotoblack_italic'; 15 | src: url('roboto-blackitalic-webfont.woff2') format('woff2'), 16 | url('roboto-blackitalic-webfont.woff') format('woff'); 17 | font-weight: normal; 18 | font-style: normal; 19 | 20 | } 21 | 22 | 23 | 24 | 25 | @font-face { 26 | font-family: 'robotobold'; 27 | src: url('roboto-bold-webfont.woff2') format('woff2'), 28 | url('roboto-bold-webfont.woff') format('woff'); 29 | font-weight: normal; 30 | font-style: normal; 31 | 32 | } 33 | 34 | 35 | 36 | 37 | @font-face { 38 | font-family: 'robotobold_italic'; 39 | src: url('roboto-bolditalic-webfont.woff2') format('woff2'), 40 | url('roboto-bolditalic-webfont.woff') format('woff'); 41 | font-weight: normal; 42 | font-style: normal; 43 | 44 | } 45 | 46 | 47 | 48 | 49 | @font-face { 50 | font-family: 'robotoitalic'; 51 | src: url('roboto-italic-webfont.woff2') format('woff2'), 52 | url('roboto-italic-webfont.woff') format('woff'); 53 | font-weight: normal; 54 | font-style: normal; 55 | 56 | } 57 | 58 | 59 | 60 | 61 | @font-face { 62 | font-family: 'robotolight'; 63 | src: url('roboto-light-webfont.woff2') format('woff2'), 64 | url('roboto-light-webfont.woff') format('woff'); 65 | font-weight: normal; 66 | font-style: normal; 67 | 68 | } 69 | 70 | 71 | 72 | 73 | @font-face { 74 | font-family: 'robotolight_italic'; 75 | src: url('roboto-lightitalic-webfont.woff2') format('woff2'), 76 | url('roboto-lightitalic-webfont.woff') format('woff'); 77 | font-weight: normal; 78 | font-style: normal; 79 | 80 | } 81 | 82 | 83 | 84 | 85 | @font-face { 86 | font-family: 'robotomedium'; 87 | src: url('roboto-medium-webfont.woff2') format('woff2'), 88 | url('roboto-medium-webfont.woff') format('woff'); 89 | font-weight: normal; 90 | font-style: normal; 91 | 92 | } 93 | 94 | 95 | 96 | 97 | @font-face { 98 | font-family: 'robotomedium_italic'; 99 | src: url('roboto-mediumitalic-webfont.woff2') format('woff2'), 100 | url('roboto-mediumitalic-webfont.woff') format('woff'); 101 | font-weight: normal; 102 | font-style: normal; 103 | 104 | } 105 | 106 | 107 | 108 | 109 | @font-face { 110 | font-family: 'roboto_monobold'; 111 | src: url('robotomono-bold-webfont.woff2') format('woff2'), 112 | url('robotomono-bold-webfont.woff') format('woff'); 113 | font-weight: normal; 114 | font-style: normal; 115 | 116 | } 117 | 118 | 119 | 120 | 121 | @font-face { 122 | font-family: 'roboto_monobold_italic'; 123 | src: url('robotomono-bolditalic-webfont.woff2') format('woff2'), 124 | url('robotomono-bolditalic-webfont.woff') format('woff'); 125 | font-weight: normal; 126 | font-style: normal; 127 | 128 | } 129 | 130 | 131 | 132 | 133 | @font-face { 134 | font-family: 'roboto_monoitalic'; 135 | src: url('robotomono-italic-webfont.woff2') format('woff2'), 136 | url('robotomono-italic-webfont.woff') format('woff'); 137 | font-weight: normal; 138 | font-style: normal; 139 | 140 | } 141 | 142 | @font-face { 143 | font-family: 'roboto_monolight'; 144 | src: url('robotomono-light-webfont.woff2') format('woff2'), 145 | url('robotomono-light-webfont.woff') format('woff'); 146 | font-weight: normal; 147 | font-style: normal; 148 | 149 | } 150 | 151 | 152 | 153 | 154 | @font-face { 155 | font-family: 'roboto_monolight_italic'; 156 | src: url('robotomono-lightitalic-webfont.woff2') format('woff2'), 157 | url('robotomono-lightitalic-webfont.woff') format('woff'); 158 | font-weight: normal; 159 | font-style: normal; 160 | 161 | } 162 | 163 | 164 | 165 | 166 | @font-face { 167 | font-family: 'roboto_monomedium'; 168 | src: url('robotomono-medium-webfont.woff2') format('woff2'), 169 | url('robotomono-medium-webfont.woff') format('woff'); 170 | font-weight: normal; 171 | font-style: normal; 172 | 173 | } 174 | 175 | 176 | 177 | 178 | @font-face { 179 | font-family: 'roboto_monomedium_italic'; 180 | src: url('robotomono-mediumitalic-webfont.woff2') format('woff2'), 181 | url('robotomono-mediumitalic-webfont.woff') format('woff'); 182 | font-weight: normal; 183 | font-style: normal; 184 | 185 | } 186 | 187 | 188 | 189 | 190 | @font-face { 191 | font-family: 'roboto_monoregular'; 192 | src: url('robotomono-regular-webfont.woff2') format('woff2'), 193 | url('robotomono-regular-webfont.woff') format('woff'); 194 | font-weight: normal; 195 | font-style: normal; 196 | 197 | } 198 | 199 | 200 | 201 | 202 | @font-face { 203 | font-family: 'roboto_monothin'; 204 | src: url('robotomono-thin-webfont.woff2') format('woff2'), 205 | url('robotomono-thin-webfont.woff') format('woff'); 206 | font-weight: normal; 207 | font-style: normal; 208 | 209 | } 210 | 211 | 212 | 213 | 214 | @font-face { 215 | font-family: 'roboto_monothin_italic'; 216 | src: url('robotomono-thinitalic-webfont.woff2') format('woff2'), 217 | url('robotomono-thinitalic-webfont.woff') format('woff'); 218 | font-weight: normal; 219 | font-style: normal; 220 | 221 | } 222 | 223 | 224 | 225 | 226 | @font-face { 227 | font-family: 'robotoregular'; 228 | src: url('roboto-regular-webfont.woff2') format('woff2'), 229 | url('roboto-regular-webfont.woff') format('woff'); 230 | font-weight: normal; 231 | font-style: normal; 232 | 233 | } 234 | 235 | 236 | 237 | 238 | @font-face { 239 | font-family: 'robotothin'; 240 | src: url('roboto-thin-webfont.woff2') format('woff2'), 241 | url('roboto-thin-webfont.woff') format('woff'); 242 | font-weight: normal; 243 | font-style: normal; 244 | 245 | } 246 | 247 | 248 | 249 | 250 | @font-face { 251 | font-family: 'robotothin_italic'; 252 | src: url('roboto-thinitalic-webfont.woff2') format('woff2'), 253 | url('roboto-thinitalic-webfont.woff') format('woff'); 254 | font-weight: normal; 255 | font-style: normal; 256 | 257 | } 258 | -------------------------------------------------------------------------------- /src/assets/fonts/roboto-black-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-black-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-black-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-black-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-blackitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-blackitalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-blackitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-blackitalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-bold-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-bold-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-bolditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-bolditalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-bolditalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-bolditalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-italic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-italic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-italic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-light-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-light-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-lightitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-lightitalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-lightitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-lightitalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-medium-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-medium-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-medium-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-medium-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-mediumitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-mediumitalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-mediumitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-mediumitalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-regular-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-regular-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-thin-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-thin-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-thin-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-thin-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/roboto-thinitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-thinitalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/roboto-thinitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/roboto-thinitalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-bold-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-bold-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-bolditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-bolditalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-bolditalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-bolditalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-italic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-italic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-italic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-light-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-light-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-lightitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-lightitalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-lightitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-lightitalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-medium-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-medium-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-medium-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-medium-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-mediumitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-mediumitalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-mediumitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-mediumitalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-regular-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-regular-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-thin-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-thin-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-thin-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-thin-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-thinitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-thinitalic-webfont.woff -------------------------------------------------------------------------------- /src/assets/fonts/robotomono-thinitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ar5had/ecommerce-site-template/46f7c10a0d02fbd7aa56748cab42a9ea8c2aa803/src/assets/fonts/robotomono-thinitalic-webfont.woff2 -------------------------------------------------------------------------------- /src/assets/images/arrow.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/images/menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/components/AddItemPage/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react'; 2 | 3 | import './styles.sass'; 4 | 5 | class AddItemPage extends Component { 6 | constructor(props) { 7 | super(props); 8 | } 9 | 10 | componentDidMount() { 11 | setTimeout(() => { 12 | this.modalWrapper.classList.add(this.props.openClass); 13 | }, 50); 14 | } 15 | 16 | close() { 17 | this.modalWrapper.classList.remove(this.props.openClass); 18 | setTimeout(() => { 19 | this.props.close(); 20 | }, 850); 21 | } 22 | 23 | render() { 24 | return ( 25 |
{ this.modalWrapper = node; }}> 26 |
27 |
28 |
29 |

Add Item

30 |
31 |
32 |
33 |
34 |

Upload Item Picture

35 |
36 |
37 |
38 | 39 | 40 |
41 |
42 |
43 | 44 | 45 |
46 |
47 | 48 | 49 |
50 |
51 |
52 | 53 |