Skip to content

Commit

Permalink
Refactoring into vertical modules
Browse files Browse the repository at this point in the history
- Pretty urls without /#!/ #26
- Vertical modules #54
- improving configs structure (but not #218)
- Better grunt task #25
  • Loading branch information
simison committed Apr 22, 2015
1 parent 7e31b8f commit 5a4b64e
Show file tree
Hide file tree
Showing 309 changed files with 2,049 additions and 2,068 deletions.
8 changes: 0 additions & 8 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# EditorConfig is awesome: http://EditorConfig.org

# Howto with your editor:
# Sublime: https://github.com/sindresorhus/editorconfig-sublime

# top-most EditorConfig file
root = true

Expand All @@ -28,27 +25,22 @@ spaces_in_brackets = false
[node_modules/**.js]
codepaint = false

# No Standard. Please document a standard if different from .js
[**.yml, **.html, **.css, **.less]
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

# No standard.
[**.conf]
insert_final_newline = false
trim_trailing_whitespace = true

# No standard. Please document a standard if different from .js
[**.md]
indent_style = space

# Standard at:
[**.py]
indent_style = space
indent_size = 4

# Standard at:
[Makefile]
indent_style = tab
indent_size = 8
19 changes: 8 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,23 @@ Icon

# Env/development
.nodemonignore
.sass-cache/
npm-debug.log
node_modules/
.bower-*/
.grunt
.vagrant
*.pyc
passenger.*

# App
public/lib
public/dist/*
app/tests/coverage/
modules/core/client/app/css
.idea/
tmp

# Configs
config/secret/*
!config/secret/_template.js
# Private configs
config/private/*
!config/private/_template.js

# Logs
logs
Expand All @@ -49,8 +48,6 @@ log
# DB migrations
migrations/.migrate

# Phusion Passenger
passenger.*

# User Upload
public/modules/users/img/profile/uploads/
# User uploads
uploads
modules/users/client/img/profile/uploads
26 changes: 12 additions & 14 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"mocha": true, // Enable globals available when code is running inside of the Mocha tests.
"jasmine": true, // Enable globals available when code is running inside of the Jasmine tests.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"esnext": true, // Allow ES.next specific features such as `const` and `let`.
"bitwise": false, // Prohibit bitwise operators (&, |, ^, etc.).
Expand All @@ -18,26 +20,22 @@
"trailing": true, // Prohibit trailing whitespaces.
"smarttabs": false, // Suppresses warnings about mixed tabs and spaces
"globals": { // Globals variables.
"jasmine": true,
"jQuery": true,
"angular": true,
"io": true,
"PruneCluster": true,
"PruneClusterForLeaflet": true,
"L": true, // Leaflet
"moment": true,
"ApplicationConfiguration": true
},
"predef": [ // Extra globals.
"define",
"require",
"exports",
"module",
"describe",
"before",
"beforeEach",
"after",
"afterEach",
"it",
"inject",
"expect"
"by",
"browser",
"element"
],
"indent": 2, // Specify indentation spacing
"devel": true, // Allow development statements e.g. `console.log();` and `alert`.
"noempty": true // Prohibit use of empty blocks.

}
}
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions INSTALL-VAGRANT.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Running Trustroots with Vagrant

This Vagrant box is excellent for testing your code in environment that's very similar to our production server.

## Note about Vagrant:
There seem to be a few issues with Vagrant setup:
- Phusion Passenger/Nginx keeps stuff in cache, so sometimes if you change files (even backend), you won't see your changes.
- Livereload.js doesn't work

## Prerequisites
* A GNU/Linux or OS X machine.
* Install [VirtualBox](https://www.virtualbox.org/) ([...because](http://docs.vagrantup.com/v2/virtualbox))
Expand Down Expand Up @@ -61,3 +68,6 @@ It will tell you if you are running the latest version or not of the box. If it
```bash
vagrant box update
```

### Problems
Check [troubleshooting](https://github.com/Trustroots/trustroots/wiki/Troubleshooting).
7 changes: 5 additions & 2 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ Make sure you have installed all these prerequisites:
### Installation
1. Clone the repository: `git clone https://github.com/Trustroots/trustroots.git trustroots`
2. Install dependencies by running this inside **trustroots** folder: `npm install`. Note that if you run npm with sudo, it might skip installing frontend assets. You can run it manually: `bower install`.
3. Make sure MongoDb is running on the default port (27017)
4. Copy config _template to development: `cp ./config/secret/_template.js ./config/secret/development.js` — add any configurations you want to keep out of version control here. Many features rely on sending emails, so add settings to the `mailer` section. See [nodemailer smtp usage](https://github.com/andris9/nodemailer-smtp-transport#usage) and note that it has pre filled settings for [some services](https://github.com/andris9/nodemailer-smtp-transport#using-well-known-services).
3. Make sure MongoDB is running on the default port (27017)
4. Copy config _template to development: `cp ./config/private/_template.js ./config/private/development.js` — add any configurations you want to keep out of version control here. Many features rely on sending emails, so add settings to the `mailer` section. See [nodemailer smtp usage](https://github.com/andris9/nodemailer-smtp-transport#usage) and note that it has pre filled settings for [some services](https://github.com/andris9/nodemailer-smtp-transport#using-well-known-services).
5. Finally run grunt default task: `grunt`

Application should run on the 3000 port in development mode. Open [http://localhost:3000](http://localhost:3000) in your browser.

### Problems
Check [troubleshooting](https://github.com/Trustroots/trustroots/wiki/Troubleshooting).
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

_Hospitality exchange community for hitchhikers and other travellers._

![Trustroots logo](https://raw.githubusercontent.com/Trustroots/trustroots/master/public/modules/core/img/logo/color-green.png)
![Trustroots logo](https://raw.githubusercontent.com/Trustroots/trustroots/tree/vertical-modules/modules/core/client/img/logo/color-blue.png)

## Volunteering

Expand Down
11 changes: 0 additions & 11 deletions app/controllers/core.server.controller.js

This file was deleted.

16 changes: 0 additions & 16 deletions app/controllers/users.server.controller.js

This file was deleted.

7 changes: 0 additions & 7 deletions app/routes/core.server.routes.js

This file was deleted.

10 changes: 0 additions & 10 deletions app/routes/statistics.server.routes.js

This file was deleted.

70 changes: 0 additions & 70 deletions app/routes/users.server.routes.js

This file was deleted.

27 changes: 0 additions & 27 deletions app/views/404.server.view.html

This file was deleted.

4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trustroots",
"version": "0.1.0",
"version": "0.2.0",
"description": "Hospitality exchange community for hitchhikers and other travellers.",
"dependencies": {
"bootstrap": "~3.3.4",
Expand All @@ -16,7 +16,7 @@
"angular-moment": "~0.10.0",
"angular-medium-editor": "~0.1.0",
"angular-socket-io": "~0.7.0",
"angular-leaflet-directive": "~0.7.11",
"angular-leaflet-directive": "~0.7.13",
"angular-waypoints": "~1.0.1",
"PruneCluster": "~1.1.0",
"ng-file-upload": "~2.0.5",
Expand Down
Loading

1 comment on commit 5a4b64e

@simison
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry this is a big chunk of stuff at once.

This needs pretty heavy testing and might need some changes to Nginx configs related to /public folder.

Please sign in to comment.