diff --git a/.gitignore b/.gitignore index 1ebdfc7..1bbc4e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *zip build -node_modules \ No newline at end of file +node_modules +.DS_Store diff --git a/package.json b/package.json index 4645ba5..26ffb15 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,82 @@ "description": "Worldbrain.io research engine", "main": "index.js", "dependencies": { + "babel-core": "^6.17.0", + "babel-loader": "^6.2.5", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.14.0", + "babel-preset-react": "^6.11.1", + "babel-preset-stage-0": "^6.3.13", + "babel-runtime": "^6.11.6", + "better-npm-run": "0.0.13", + "bootstrap": "^3.3.7", + "bootstrap-sass": "^3.3.7", "cheerio": "^0.22.0", + "compression": "^1.6.2", + "css-loader": "^0.26.0", + "cssnano": "^3.7.4", + "debug": "^2.2.0", + "extract-text-webpack-plugin": "^1.0.0", + "file-loader": "^0.9.0", "fs": "0.0.1-security", + "fs-extra": "^1.0.0", + "html-webpack-plugin": "^2.22.0", + "imports-loader": "^0.7.0", + "ip": "^1.1.2", + "json-loader": "^0.5.4", "lodash": "^4.17.4", - "npm-run-all": "^4.0.0" + "node-sass": "^4.0.0", + "normalize.css": "^5.0.0", + "npm-run-all": "^4.0.0", + "postcss-loader": "^1.1.0", + "react": "^15.0.0", + "react-dom": "^15.0.0", + "react-redux": "^5.0.1", + "react-router": "^3.0.0", + "redux": "^3.6.0", + "redux-thunk": "^2.0.0", + "rimraf": "^2.5.4", + "sass-loader": "^4.0.0", + "style-loader": "^0.13.1", + "url-loader": "^0.5.6", + "webpack": "^1.12.14", + "yargs": "^6.3.0" }, "devDependencies": { "cpx": "^1.5.0", - "watchify": "^3.8.0" + "browserify": "^13.1.1", + "watchify": "^3.8.0", + "babel-eslint": "^7.1.0", + "babel-plugin-istanbul": "^3.0.0", + "chai": "^3.4.1", + "chai-as-promised": "^6.0.0", + "chai-enzyme": "^0.6.1", + "cheerio": "^0.22.0", + "codecov": "^1.0.1", + "enzyme": "^2.0.0", + "eslint": "^3.0.1", + "eslint-config-standard": "^6.0.0", + "eslint-config-standard-react": "^4.0.0", + "eslint-plugin-babel": "^4.0.0", + "eslint-plugin-promise": "^3.0.0", + "eslint-plugin-react": "^6.0.0", + "eslint-plugin-standard": "^2.0.0", + "express": "^4.14.0", + "karma": "^1.0.0", + "karma-coverage": "^1.0.0", + "karma-mocha": "^1.0.1", + "karma-mocha-reporter": "^2.0.0", + "karma-phantomjs-launcher": "^1.0.2", + "karma-webpack-with-fast-source-maps": "^1.9.2", + "mocha": "^3.0.1", + "nodemon": "^1.10.2", + "phantomjs-prebuilt": "^2.1.12", + "react-addons-test-utils": "^15.0.0", + "redbox-react": "^1.2.10", + "sinon": "^1.17.5", + "sinon-chai": "^2.8.0", + "webpack-dev-middleware": "^1.6.1", + "webpack-hot-middleware": "^2.12.2" }, "scripts": { "build": "npm-run-all build:*", @@ -24,7 +92,13 @@ "watch:copy-assets": "cpx 'src/assets/**/*.*' build/assets --watch", "build:browserify": "mkdir -p ./build/js && browserify src/js-browserify/download_urls.js -o build/js/bundle.js", "watch:browserify": "mkdir -p ./build/js && watchify src/js-browserify/download_urls.js -o build/js/bundle.js", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "watch:react": "better-npm-run start", + "build:react": "better-npm-run deploy:prod", + "copy:react": "cpx 'src/client/dist/**/*.*' build/client", + "react-build:clean": "rimraf dist/client", + "react-build:react": "better-npm-run deploy", + "react-build:react-compile": "better-npm-run compile" }, "repository": { "type": "git", @@ -35,5 +109,54 @@ "bugs": { "url": "https://github.com/WorldBrain/Research-Engine/issues" }, - "homepage": "https://github.com/WorldBrain/Research-Engine#readme" + "homepage": "https://github.com/WorldBrain/Research-Engine#readme", + "betterScripts": { + "compile": { + "command": "node src/client/bin/compile && npm run copy:react", + "env": { + "DEBUG": "app:*" + } + }, + "dev": { + "command": "nodemon bin/dev-server --ignore dist --ignore coverage --ignore tests --ignore src", + "env": { + "NODE_ENV": "development", + "DEBUG": "app:*" + } + }, + "deploy": { + "command": "npm run react-build:clean && npm run react-build:react-compile", + "env": { + "DEBUG": "app:*" + } + }, + "deploy:dev": { + "command": "npm run react-build:react", + "env": { + "NODE_ENV": "development", + "DEBUG": "app:*" + } + }, + "deploy:prod": { + "command": "npm run react-build:react", + "env": { + "NODE_ENV": "production", + "BASENAME": "/client/", + "DEBUG": "app:*" + } + }, + "start": { + "command": "node src/client/bin/dev-server", + "env": { + "DEBUG": "app:*" + } + }, + "test": { + "command": "node ./node_modules/karma/bin/karma start config/karma.config", + "env": { + "NODE_ENV": "test", + "DEBUG": "app:*" + } + } + } } diff --git a/src/assets/popup.html b/src/assets/popup.html index 4dfc22c..f2b78d5 100644 --- a/src/assets/popup.html +++ b/src/assets/popup.html @@ -39,6 +39,7 @@ FAQs How to use the tool Feedback + Feedback Import History & Bookmarks diff --git a/src/client/README.md b/src/client/README.md new file mode 100755 index 0000000..37accec --- /dev/null +++ b/src/client/README.md @@ -0,0 +1,234 @@ +#Obsidianart - a couple of notes to myself +- Fix the watcher (currently run the watch on localhost) +- remove all unused files etc (like this readme) +- keep a link to the source of this project (just in case) +- npm run watch:react to start the server +- npm run build:react to build in the dist folder +- Fix the clean script for the react folder (inside dist) + + + + + + +# React Redux Starter Kit + +[![Join the chat at https://gitter.im/davezuko/react-redux-starter-kit](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/davezuko/react-redux-starter-kit?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build Status](https://travis-ci.org/davezuko/react-redux-starter-kit.svg?branch=master)](https://travis-ci.org/davezuko/react-redux-starter-kit?branch=master) +[![dependencies](https://david-dm.org/davezuko/react-redux-starter-kit.svg)](https://david-dm.org/davezuko/react-redux-starter-kit) +[![devDependency Status](https://david-dm.org/davezuko/react-redux-starter-kit/dev-status.svg)](https://david-dm.org/davezuko/react-redux-starter-kit#info=devDependencies) +[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) + +This starter kit is designed to get you up and running with a bunch of awesome new front-end technologies, all on top of a configurable, feature-rich webpack build system that's already setup to provide hot reloading, CSS preprocessing with Sass, unit testing, code coverage reports, bundle splitting, and more. + +The primary goal of this project is to remain as **unopinionated** as possible. Its purpose is not to dictate your project structure or to demonstrate a complete sample application, but to provide a set of tools intended to make front-end development robust, easy, and, most importantly, fun. Check out the full feature list below! + +Finally, This project wouldn't be possible without the help of our many contributors, so [thank you](#thank-you) for all of your help. + +## Table of Contents +1. [Features](#features) +1. [Requirements](#requirements) +1. [Getting Started](#getting-started) +1. [Application Structure](#application-structure) +1. [Development](#development) + 1. [Developer Tools](#developer-tools) + 1. [Routing](#routing) +1. [Testing](#testing) +1. [Deployment](#deployment) +1. [Build System](#build-system) + 1. [Configuration](#configuration) + 1. [Globals](#globals) + 1. [Styles](#styles) + 1. [Server](#server) + 1. [Production Optimization](#production-optimization) +1. [Learning Resources](#learning-resources) +1. [FAQ](#troubleshooting) +1. [Thank You](#thank-you) + +## Features +* [react](https://github.com/facebook/react) +* [redux](https://github.com/rackt/redux) +* [react-router](https://github.com/rackt/react-router) +* [webpack](https://github.com/webpack/webpack) +* [babel](https://github.com/babel/babel) +* [express](https://github.com/expressjs/express) +* [karma](https://github.com/karma-runner/karma) +* [eslint](http://eslint.org) + +## Requirements +* node `^4.5.0` +* yarn `^0.17.0` or npm `^3.0.0` + +## Getting Started + +After confirming that your development environment meets the specified [requirements](#requirements), you can create a new project based on `react-redux-starter-kit` by doing the following: + +### Install from source + +First, clone the project: + +```bash +$ git clone https://github.com/davezuko/react-redux-starter-kit.git +$ cd +``` + +Then install dependencies and check to see it works. It is recommended that you use [Yarn](https://yarnpkg.com/) for deterministic installs, but `npm install` will work just as well. + +```bash +$ yarn install # Install project dependencies +$ yarn start # Compile and launch (same as `npm start`) +``` +If everything works, you should see the following: + + + +While developing, you will probably rely mostly on `npm start`; however, there are additional scripts at your disposal: + +|`npm run