Skip to content

Commit

Permalink
initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
rishy committed Nov 5, 2014
0 parents commit 5269612
Show file tree
Hide file tree
Showing 887 changed files with 197,191 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"directory": "app/static/lib",
"json": "bower.json"
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# http://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.DS_Store
*.db
*.pyc
*.swp
*~
db_repository
flask
node_modules
21 changes: 21 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"node": true,
"esnext": true,
"bitwise": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"immed": true,
"indent": 4,
"latedef": true,
"newcap": true,
"noarg": true,
"quotmark": "single",
"regexp": true,
"undef": true,
"unused": true,
"strict": true,
"trailing": true,
"smarttabs": true,
"white": true
}
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: node_js
node_js:
- '0.10'
before_script:
- 'npm install -g bower grunt-cli'
- 'bower install'
116 changes: 116 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
'use strict';

var proxySnippet = require('grunt-connect-proxy/lib/utils').proxyRequest;

module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
require('time-grunt')(grunt);

grunt.initConfig({
yeoman: {
// configurable paths
app: require('./bower.json').appPath || 'app/static',
dist: 'app/static'
},
sync: {
dist: {
files: [{
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: '**'
}]
}
},
watch: {
options: {
livereload: 35729
},
src: {
files: [
'<%= yeoman.app %>/*.html',
'<%= yeoman.app %>/css/**/*',
'<%= yeoman.app %>/js/**/*',
'<%= yeoman.app %>/views/**/*'
],
//tasks: ['sync:dist']
}
},
connect: {
proxies: [
{
context: '/data-tag',
host: 'localhost',
port: 5000,
https: false,
changeOrigin: false
}
],
options: {
port: 9000,
// Change this to '0.0.0.0' to access the server from outside.
hostname: 'localhost',
livereload: 35729
},
livereload: {
options: {
open: true,
base: [
'<%= yeoman.app %>'
],
middleware: function (connect) {
return [
proxySnippet,
connect.static(require('path').resolve('app/static'))
];
}
}
},
/*
dist: {
options: {
base: '<%= yeoman.dist %>'
}
}
*/
},
// Put files not handled in other tasks here
copy: {
dist: {
files: [{
expand: true,
dot: true,
cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>',
src: '**'
}]
},
},
// Test settings
karma: {
unit: {
configFile: 'test/config/karma.conf.js',
singleRun: true
}
},
bowercopy: {
options: {
destPrefix: '<%= yeoman.app %>'
},
test: {
files: {
'test/lib/angular-mocks': 'angular-mocks',
'test/lib/angular-scenario': 'angular-scenario'
}
}
}
});

grunt.registerTask('server', function (target) {
grunt.task.run([
//'copy:dist',
'configureProxies',
'connect:livereload',
'watch'
]);
});
};
10 changes: 10 additions & 0 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy

app = Flask(__name__, static_url_path='')
app.config.from_object('config')
db = SQLAlchemy(app)


from app.routes import index

Empty file added app/models/__init__.py
Empty file.
Empty file added app/routes/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions app/routes/index.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from app import app

@app.route('/')
def root():
return app.send_static_file('index.html')
5 changes: 5 additions & 0 deletions app/static/css/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
body {
margin-top: 60px;
padding: 10px;
background-color: #ECF0F1;
}
49 changes: 49 additions & 0 deletions app/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!doctype html>
<html lang="en" ng-app="data-tag">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Data-tag</title>
<link href="lib/bootstrap-css/css/bootstrap.css" rel="stylesheet">
<link href="lib/jquery-ui/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
<link href="css/app.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Data-tag</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">

</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<div class="container" ng-view></div>
<script src="lib/jquery/dist/jquery.js"></script>
<script src="lib/jquery-ui/jquery-ui.js"></script>
<script src="lib/lodash/dist/lodash.js"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular-resource/angular-resource.js"></script>
<script src="lib/angular-route/angular-route.js"></script>
<script src="lib/angular-bootstrap/ui-bootstrap-tpls.js"></script>
<script src="lib/angular-ui-date/src/date.js"></script>

<script src="js/app.js"></script>
<script src="js/home/home-controller.js"></script>

</body>
</html>
9 changes: 9 additions & 0 deletions app/static/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Declare app level module which depends on filters, and services
angular.module('data-tag', ['ngResource', 'ngRoute', 'ui.bootstrap', 'ui.date'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/', {
templateUrl: 'views/home/home.html',
controller: 'HomeController'})
.otherwise({redirectTo: '/'});
}]);
3 changes: 3 additions & 0 deletions app/static/js/home/home-controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
angular.module('data-tag')
.controller('HomeController', ['$scope', function ($scope) {
}]);
23 changes: 23 additions & 0 deletions app/static/lib/angular-bootstrap/.bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"author": {
"name": "https://github.com/angular-ui/bootstrap/graphs/contributors"
},
"name": "angular-bootstrap",
"version": "0.10.0",
"main": [
"./ui-bootstrap-tpls.js"
],
"dependencies": {
"angular": ">=1"
},
"homepage": "https://github.com/angular-ui/bootstrap-bower",
"_release": "0.10.0",
"_resolution": {
"type": "version",
"tag": "0.10.0",
"commit": "f486d33d6f4c60d905ed0792eacbba2456a32b87"
},
"_source": "git://github.com/angular-ui/bootstrap-bower.git",
"_target": "~0.10.0",
"_originalSource": "angular-bootstrap"
}
11 changes: 11 additions & 0 deletions app/static/lib/angular-bootstrap/bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"author": {
"name": "https://github.com/angular-ui/bootstrap/graphs/contributors"
},
"name": "angular-bootstrap",
"version": "0.10.0",
"main": ["./ui-bootstrap-tpls.js"],
"dependencies": {
"angular": ">=1"
}
}
Loading

0 comments on commit 5269612

Please sign in to comment.