mirror of
				https://github.com/aclindsa/moneygo.git
				synced 2025-11-03 18:13:27 -05:00 
			
		
		
		
	Add package.json, automate installing js packages
This commit is contained in:
		
							
								
								
									
										7
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								Makefile
									
									
									
									
									
								
							@@ -2,10 +2,13 @@ JS_SOURCES = $(wildcard js/*.js) $(wildcard js/*/*.js)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
all: static/bundle.js static/react-widgets
 | 
					all: static/bundle.js static/react-widgets
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static/bundle.js: $(JS_SOURCES)
 | 
					node_modules:
 | 
				
			||||||
 | 
						npm install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					static/bundle.js: $(JS_SOURCES) node_modules
 | 
				
			||||||
	browserify -t [ babelify --presets [ react ] ] js/main.js -o static/bundle.js
 | 
						browserify -t [ babelify --presets [ react ] ] js/main.js -o static/bundle.js
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static/react-widgets: node_modules/react-widgets/dist
 | 
					static/react-widgets: node_modules/react-widgets/dist node_modules
 | 
				
			||||||
	rsync -a node_modules/react-widgets/dist/ static/react-widgets/
 | 
						rsync -a node_modules/react-widgets/dist/ static/react-widgets/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.PHONY = all
 | 
					.PHONY = all
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										25
									
								
								README
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								README
									
									
									
									
									
								
							@@ -4,10 +4,25 @@ Installation
 | 
				
			|||||||
============
 | 
					============
 | 
				
			||||||
 | 
					
 | 
				
			||||||
First, install npm in your distribution:
 | 
					First, install npm in your distribution:
 | 
				
			||||||
$ sudo pacman -S npm
 | 
						$ sudo pacman -S npm
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Install browserify globally:
 | 
					Install browserify globally using npm:
 | 
				
			||||||
$ sudo npm install -g browserify
 | 
						$ sudo npm install -g browserify
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Next, install browserify, babel, react, react-bootstrap, react-widgets, globalize, and big.js in our directory using npm:
 | 
					You'll then want to build everything (the Golang and Javascript portions) using
 | 
				
			||||||
$ npm install browserify react react-dom react-addons-update react-bootstrap react-widgets redux react-redux redux-thunk babelify babel-preset-react globalize cldr-data big.js keymirror
 | 
					something like:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						$ export GOPATH=`pwd`
 | 
				
			||||||
 | 
						$ go get -v github.com/aclindsa/moneygo
 | 
				
			||||||
 | 
						$ go generate -v github.com/aclindsa/moneygo
 | 
				
			||||||
 | 
						$ go install -v github.com/aclindsa/moneygo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Running
 | 
				
			||||||
 | 
					=======
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Assuming you're in the same directory you ran the above installation comands
 | 
				
			||||||
 | 
					from, running MoneyGo is then as easy as:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						$ ./bin/moneygo \
 | 
				
			||||||
 | 
						  -port 8080 \
 | 
				
			||||||
 | 
						  -base src/github.com/aclindsa/moneygo/
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										36
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								package.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					  "name": "moneygo",
 | 
				
			||||||
 | 
					  "version": "0.0.1",
 | 
				
			||||||
 | 
					  "description": "A personal finance web application",
 | 
				
			||||||
 | 
					  "main": "js/main.js",
 | 
				
			||||||
 | 
					  "dependencies": {
 | 
				
			||||||
 | 
					    "babel-preset-react": "^6.16.0",
 | 
				
			||||||
 | 
					    "babelify": "^7.3.0",
 | 
				
			||||||
 | 
					    "big.js": "^3.1.3",
 | 
				
			||||||
 | 
					    "browserify": "^13.1.0",
 | 
				
			||||||
 | 
					    "cldr-data": "^29.0.2",
 | 
				
			||||||
 | 
					    "globalize": "^1.1.1",
 | 
				
			||||||
 | 
					    "keymirror": "^0.1.1",
 | 
				
			||||||
 | 
					    "react": "^15.3.2",
 | 
				
			||||||
 | 
					    "react-addons-update": "^15.3.2",
 | 
				
			||||||
 | 
					    "react-bootstrap": "^0.30.5",
 | 
				
			||||||
 | 
					    "react-dom": "^15.3.2",
 | 
				
			||||||
 | 
					    "react-redux": "^4.4.5",
 | 
				
			||||||
 | 
					    "react-widgets": "^3.4.4",
 | 
				
			||||||
 | 
					    "redux": "^3.6.0",
 | 
				
			||||||
 | 
					    "redux-thunk": "^2.1.0"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "devDependencies": {},
 | 
				
			||||||
 | 
					  "scripts": {
 | 
				
			||||||
 | 
					    "test": "echo \"Error: no test specified\" && exit 1"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "repository": {
 | 
				
			||||||
 | 
					    "type": "git",
 | 
				
			||||||
 | 
					    "url": "git+https://github.com/aclindsa/moneygo.git"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "author": "Aaron Lindsay",
 | 
				
			||||||
 | 
					  "bugs": {
 | 
				
			||||||
 | 
					    "url": "https://github.com/aclindsa/moneygo/issues"
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  "homepage": "https://github.com/aclindsa/moneygo#README"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user