Skip to content

Commit

Permalink
added procfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonnie Spratley committed Nov 23, 2013
1 parent 82ba94b commit 1116837
Show file tree
Hide file tree
Showing 14 changed files with 254 additions and 211 deletions.
4 changes: 3 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,5 +299,7 @@ module.exports = function(grunt) {

grunt.registerTask('build', ['clean:dist', 'useminPrepare', 'concurrent:dist', 'autoprefixer', 'concat', 'copy:dist', 'cdnify', 'ngmin', 'cssmin', 'uglify', 'rev', 'usemin']);

grunt.registerTask('default', ['jshint', 'test', 'build']);
grunt.registerTask('default', [
//'jshint',
'test', 'build']);
};
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server.js
73 changes: 66 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,41 @@ The purpose of this CMS is for many reasons, the most important reason is this i
The book is going to be published during the 2nd quarter of the new year by Packt Publishing. Each piece has to do with a corresponding chapter in the book that I am writing.



## Features

### Database
The database of choice is Mongo, its fast, easy and scalable.

### Server
The server of choice is Node, its JavaScript, its fast and scalable.

### AngularJS
The client-side framework of choice is Angular, its a full-stack, just what we need.

### Responsive
The client-side ui of choice is Twitter Bootstrap, its updated and clean.

### HTML5
Using HTML5 in every way to make a better user experience.

### Customizable
Using a modular approach you can easily extend the core to your application.



_(Coming soon)_











## Server
The server is a Node.js server that supports dynamic RESTful API calls to resource endpoints.

Expand Down Expand Up @@ -36,13 +71,6 @@ These are the events that this socket server dispatches.
7. cms:server:connect
8. cms:

## Features




_(Coming soon)_




Expand Down Expand Up @@ -80,6 +108,37 @@ _(Coming soon)_
_(Coming soon)_


### Themes
Themes will be installed via bower, we will have a ui for searching and installing angular-cms themes searching by tag angular-cms.

##### Theme Structure
This is the structure of the themes.

my-theme/
package.json
bower.json
css/
my-theme.css
js/
my-theme.js
index.html
partials/
header.html
sidebar.html
footer.html
content.html



### Plugins
Plugins will be installed via bower as well, keywords angular-cms.







## Examples
_(Coming soon)_
Expand Down
37 changes: 13 additions & 24 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,23 @@
<!--[if IE 8]>
<html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<html class="no-js" data-ng-app="angularCmsBaseApp">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Angular CMS | </title>
<title>Angular CMS </title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- build:css(.tmp) styles/main.css -->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<!-- Optional theme
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
-->

<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<!-- Latest compiled and minified CSS -->
<!-- build:css(.tmp) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
</head>
<body data-ng-app="angularCmsBaseApp" data-ng-controller="AppCtrl">
<body data-ng-controller="AppCtrl">
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
your browser</a> to improve your experience.</p>
Expand All @@ -40,15 +37,14 @@
<hr>
<footer>
<p>
&copy; Company 2013
&copy; 2013
</p>
</footer>
</div>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID -->
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] ||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] ||
function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0];
Expand All @@ -61,17 +57,14 @@
ga('send', 'pageview');

</script>


<!-- build:js scripts/plugins.js -->
<script src="bower_components/jquery/jquery.js"></script>
<script src="bower_components/jquery-ui/ui/jquery-ui.js"></script>
<script src="bower_components/angular/angular.js"></script>

<script src="bower_components/jquery.tocify.js/src/javascripts/jquery.tocify.js"></script>
<script src="bower_components/markdown.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<!-- <script src="bower_components/bootstrap-sass/js/bootstrap-affix.js"></script>
<!-- <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> -->
<script src="bower_components/bootstrap-sass/js/bootstrap-affix.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-alert.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-dropdown.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-tooltip.js"></script>
Expand All @@ -83,10 +76,8 @@
<script src="bower_components/bootstrap-sass/js/bootstrap-carousel.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-scrollspy.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-collapse.js"></script>
<script src="bower_components/bootstrap-sass/js/bootstrap-tab.js"></script> -->
<script src="bower_components/bootstrap-sass/js/bootstrap-tab.js"></script>
<!-- endbuild -->


<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="scripts/config.js"></script>
<script src="scripts/app.js"></script>
Expand All @@ -97,10 +88,8 @@
<script src="scripts/controllers/register.js"></script>
<script src="scripts/controllers/settings.js"></script>
<script src="scripts/directives/cmsFormitem.js"></script>
<script src="scripts/directives/cmsPanel.js"></script>
<script src="scripts/filters/markdown.js"></script>
<script src="scripts/directives/cmsPanel.js"></script>
<script src="scripts/filters/markdown.js"></script>
<!-- endbuild -->


</body>
</html>
1 change: 1 addition & 0 deletions app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
var app = angular.module('angularCmsBaseApp', []);



app.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {


Expand Down
38 changes: 17 additions & 21 deletions app/scripts/controllers/docs.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
'use strict';

angular.module('angularCmsBaseApp')
.controller('DocsCtrl', function ($scope, $http) {
angular.module('angularCmsBaseApp').controller('DocsCtrl', function($scope, $http) {

$scope.readme = '';

$http.get('/api/v2/README').success(function(data){
$scope.readme = data;
$scope.tocify();
});

$scope.tocify = function(){

$scope.loadReadme = function() {
$http.get('/api/v2/README').success(function(data) {
$scope.readme = data;
$scope.tocify();
});
};

$scope.tocify = function() {
//Executes your code when the DOM is ready. Acts the same as $(document).ready().
$(function() {
setTimeout(function(){
setTimeout(function() {
//Calls the tocify method on your HTML div.
$("#toc").tocify({
hashGenerator: 'compact',
content: '#docs-content'
$("#toc").tocify({
hashGenerator : 'compact',
content : '#docs-content'
});
}, 500);
}, 500);
});
};


$scope.awesomeThings = [
'HTML5 Boilerplate',
'AngularJS',
'Karma'
];
});
$scope.awesomeThings = ['HTML5 Boilerplate', 'AngularJS', 'Karma'];
});
3 changes: 2 additions & 1 deletion app/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
http://127.0.0.1:9000/styles/main.css
http://localhost:9090/styles/main.css
*/
@import url('/bower_components/jquery.tocify.js/src/stylesheets/jquery.tocify.css');

@import url('../bower_components/jquery.tocify.js/src/stylesheets/jquery.tocify.css');
body {
background:#fafafa;
font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;
Expand Down
1 change: 1 addition & 0 deletions app/views/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</div>
</aside>
<section id="docs-content" class="col-9 col-md-9 col-sm-9">
<iframe src="../../docs/index.html"></iframe>
<div ng-bind-html-unsafe="readme | markdown">

</div>
Expand Down
1 change: 1 addition & 0 deletions bin/db.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
rm ../db/mongod.lock
mongod --dbpath db --rest --jsonp;
2 changes: 1 addition & 1 deletion db/mongod.lock
Original file line number Diff line number Diff line change
@@ -1 +1 @@
832
1447
93 changes: 42 additions & 51 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,55 +2,46 @@
// http://karma-runner.github.io/0.10/config/configuration-file.html

module.exports = function(config) {
config.set({
// base path, that will be used to resolve files and exclude
basePath: '',

// testing framework to use (jasmine/mocha/qunit/...)
frameworks: ['jasmine'],

// list of files / patterns to load in the browser
files: [
'app/bower_components/angular/angular.js',
'app/bower_components/angular/angular-mocks.js',
'app/scripts/*.js',
'app/scripts/**/*.js',
'test/mock/**/*.js',
'test/spec/**/*.js'
],

// list of files / patterns to exclude
exclude: [],

// web server port
port: 8080,

// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,


// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers: ['PhantomJS'],
reporters: [
'progress',
//'coverage'
],


// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false
});
config.set({
// base path, that will be used to resolve files and exclude
basePath : '',

// testing framework to use (jasmine/mocha/qunit/...)
frameworks : ['jasmine'],
preprocessors : {
'app/scripts/**/*.coffee' : 'coffee'
},
// list of files / patterns to load in the browser
files : ['app/bower_components/angular/angular.js', 'app/bower_components/angular-scenario/angular-scenario.js', 'app/bower_components/angular-mocks/angular-mocks.js', 'app/scripts/*.js', 'app/scripts/**/*.js',
// 'test/mock/**/*.js',
'test/spec/**/*.js'],

// list of files / patterns to exclude
exclude : [],

// web server port
port : 9090,

// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel : config.LOG_INFO,

// enable / disable watching file and executing tests whenever any file changes
autoWatch : false,

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)
browsers : ['PhantomJS'],
reporters : ['progress', 'dot'],

// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun : false
});
};
Loading

0 comments on commit 1116837

Please sign in to comment.