Spina CMS based system.
We've updated the migrations for this project, starting from scratch. You can essentially run:
$ bundle install
$ bundle exec rake db:reset
`$ bundle exec rake db:migrate
For every Spina plugin installed, we'll need to make sure that the migrations are properly generated. Each may have a separate installation procedure. Please review the docs.
Run rails g spina_reviews:install
Then rake db:migrate or bundle exec rake db:migrate
- Spina basic page types & building blocks setup (still WIP / needs a 2nd look)
- Spina endpoints isolated under /admin
- Custom API Controller for all api views with jBuilder. See folder
/app/controllers/api. For more info, look at implementing-rails-apis-like-a-professional and how-to-expose-a-rails-api). - API - missing page_structure information in
/app/views/api/pages/show.json.jbuilder - *TBD -- Optimize API views // Move them to the controllers (e.g. on pages_index to include only sections starting with "include" (only info for included stacked sections into a parent)
- Setup API caching (due to the Spina Structure, there are nested requests going 4, 5 levels deep)
- *Portfolio Module (TBD) - custom built up to spec
- *Blog Module (TBD) - custom built up to spec
- Setup NG Rails Resource to load in page endpoints
- Comet Haley
Spit out all pages in the console
> pages = Spina::Page.all
Homepage Page Parts
> homepage = Spina::Page.find(1).page_parts
https://www.dropbox.com/s/g8qqhh00ea44f4j/Screenshot%202016-04-01%2022.10.06.png?dl=0
$ gulp serve:fullstack
This should run your rails app and the front end app together and open the browser sync instance proxied so that the back end application data can be retrieved with the same urls.
Create a virtual host or user powder to run collective.dev on port 3619
(Local Dev Host should be set by all devs to collective.dev)
http://collective.dev/api/pages
https://github.com/FineLinePrototyping/angularjs-rails-resource
The front-end server should come up on port 3619
If you dont run your rails server navigate to http://collective.dev/api/pages, you should get a Rails page that says No route matches [GET] "/api/pages", which means Rails is running correctly.
The backend server should come up on port 3000.
In order to stay organized, lets use the following
$ npm install -g generator-gulp-angular-subtaskor$ npm install -g gulp-angular-subtask
$yo gulp-angular-subtask:controller pages --script-type=coffee
$ yo gulp-angular-subtask:style pages --style-type="scss"
$ yo gulp-angular-subtask:partial pages --html-type=jade
$ yo gulp-angular --help
From the root of the app
bundle install
$ rake db:create
$ rake db:seed
- NPM Components
--
$ npm install - Bower Components
--
$ bower install
$ cd client
It's time to use Gulp tasks:
$ gulpto build an optimized version of your application in folder dist$ gulp serve:fullstackto start Rails & BrowserSync server on your source files with live reload$ gulp serveto start BrowserSync server on your source files with live reload$ gulp serve:distPRODUCTION - to start BrowserSync server on your optimized application without live reload$ gulp railsto run Rails (alias of cd ../show-api && rails s -b 0.0.0.0)$ gulp testto run your unit tests with Karma$ gulp test:autoto run your unit tests with Karma in watch mode$ gulp protractorto launch your e2e tests with Protractor$ gulp protractor:distto launch your e2e tests with Protractor on the dist files
##BrowserSync Go to http://collective.dev:3001/ and see configs and sync data
- ruby "2.2.2"
- Rails: '4.2'
- Rails API: 'rails-api'
- Rails CMS: 'spina'
- DB: Postgres
- Angular Modules: angular-animate.js (enable animation features), angular-cookies.js (handle cookie management), angular-touch.js (for mobile development), angular-sanitize.js (to securely parse and manipulate HTML), angular-messages.js (enhanced support for displaying messages within templates), angular-aria.js (suppor t for common ARIA attributes)
- jQuery: jQuery 2.x (new version, lighter, IE9+)
- REST resource library: ngResource, the official support for RESTful services
- Router: UI Router, flexible routing with nested views
- UI Framework: Angular Material, the reference implementation of the Google's Material Design specification
- CSS PreProcessor: Sass (Node), Node.js binding to libsass, the C version of the popular stylesheet preprocessor, Sass.
- Js Preprocessor: CoffeeScript, "a little language that compiles into JavaScript".
- HTML Template Engine: Jade (*.jade)
WIP
dcollective/config/database.yml
WIP
WIP
WIP
Please feel free to use a different markup language if you do not plan to run rake doc:app.