Skip to content

Commit

Permalink
chore: bp-seed
Browse files Browse the repository at this point in the history
  • Loading branch information
boennemann committed Apr 13, 2014
1 parent 6ec1628 commit b821046
Show file tree
Hide file tree
Showing 12 changed files with 330 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
@@ -0,0 +1,3 @@
{
"directory": "app/bower_components"
}
21 changes: 21 additions & 0 deletions .editorconfig
@@ -0,0 +1,21 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true


[*]

# Change these settings to your own preference
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
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
@@ -0,0 +1 @@
* text=auto
23 changes: 23 additions & 0 deletions .gitignore
@@ -0,0 +1,23 @@
# ignore dependencies
app/bower_components/
node_modules/

# ignore generated files
dist/
.tmp/
build/

# logs
*.log

# Folder view configuration files
.DS_Store
Desktop.ini

# Thumbnail cache files
._*
Thumbs.db

# Files that might appear on external disks
.Spotlight-V100
.Trashes
28 changes: 28 additions & 0 deletions .jshintrc
@@ -0,0 +1,28 @@
{
"bitwise": true,
"camelcase": true,
"freeze": true,
"immed": true,
"indent": 2,
"latedef": true,
"newcap": true,
"noarg": true,
"noempty": true,
"nonbsp": true,
"undef": true,
"unused": true,
"trailing": true,
"maxlen": 200,
"asi": true,
"boss": true,
"eqnull": true,
"expr": true,
"laxcomma": true,
"loopfunc": true,
"browser": true,
"globals": {
"angular": true,
"IScroll": true,
"IScrollSticky": true
}
}
151 changes: 151 additions & 0 deletions Gruntfile.coffee
@@ -0,0 +1,151 @@
'use strict'
module.exports = (grunt) ->
require('load-grunt-tasks') grunt
require('time-grunt') grunt

grunt.initConfig
app:
app: 'app'
dist: 'dist'

watch:
options:
livereload: '<%= connect.options.livereload %>'

js:
files: ['<%= app.app %>/scripts/**/*.js']
tasks: ['jshint:all']

styles:
files: ['.tmp/styles/main.css']

view:
files: ['<%= app.app %>/views/**/*.html']

less:
files: ['<%= app.app %>/styles/**/*.less']
tasks: ['less:styles']

gruntfile:
files: ['Gruntfile.js']

connect:
options:
port: 9000
hostname: '0.0.0.0'
livereload: 35729

livereload:
options:
open: true
base: [
'.tmp'
'<%= app.app %>'
]

dist:
options:
base: '<%= app.dist %>'

jshint:
options:
jshintrc: '.jshintrc'

all: [
'Gruntfile.js'
'<%= app.app %>/scripts/**/*.js'
]

clean:
dist:
files: [
dot: true
src: [
'.tmp'
'<%= app.dist %>/*'
'!<%= app.dist %>/.git*'
]
]

server: '.tmp'

useminPrepare:
html: '<%= app.app %>/index.html'
options:
dest: '<%= app.dist %>'

usemin:
html: ['<%= app.dist %>/**/*.html']
css: ['<%= app.dist %>/styles/**/*.css']
options:
assetsDirs: ['<%= app.dist %>']

ngmin:
dist:
files: [
expand: true
cwd: '.tmp/concat/scripts'
src: '*.js'
dest: '.tmp/concat/scripts'
]

less:
styles:
src: ['<%=app.app%>/styles/main.less']
dest: '.tmp/styles/main.css'

copy:
dist:
files: [
{
expand: true
dot: true
cwd: '<%= app.app %>'
dest: '<%= app.dist %>'
src: [
'*.{ico,png,txt}'
'.htaccess'
'*.html'
'views/**/*.html'
'bower_components/**/*'
'images/**/*.{webp}'
'fonts/*'
]
}
{
expand: true
cwd: '.tmp/images'
dest: '<%= app.dist %>/images'
src: ['generated/*']
}
]

concurrent:
server: ['less:styles']
dist: ['less:styles']

grunt.registerTask 'serve', (target) ->
if target is 'dist'
return grunt.task.run([
'build'
'connect:dist:keepalive'
])
grunt.task.run [
'clean:server'
'concurrent:server'
'connect:livereload'
'watch'
]
return

grunt.registerTask 'build', [
'clean:dist'
'useminPrepare'
'concurrent:dist'
'concat'
'ngmin'
'copy:dist'
'usemin'
]
grunt.registerTask 'default', ['build']
return
29 changes: 29 additions & 0 deletions app/index.html
@@ -0,0 +1,29 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Zen To Done</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, minimal-ui">
<!-- build:css({.tmp,app}) styles/main.css -->
<link rel="stylesheet" href="styles/main.css">
<!-- endbuild -->
</head>
<body ng-app="ztd" bp-app bp-navigation>

<ui-view-wrapper>
<ui-view></ui-view>
</ui-view-wrapper>

<!-- build:js({.tmp,app}) scripts/scripts.js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-animate/angular-animate.js"></script>
<script src="bower_components/angular-touch/angular-touch.js"></script>
<script src="bower_components/angular-loading-bar/build/loading-bar.js"></script>
<script src="bower_components/angular-ui-router/release/angular-ui-router.js"></script>
<script src="bower_components/bradypodion/dist/bradypodion.js"></script>
<script src="scripts/app.js"></script>
<!-- endbuild -->
</body>
</html>
18 changes: 18 additions & 0 deletions app/scripts/app.js
@@ -0,0 +1,18 @@
'use strict'
angular.module('ztd', ['bp', 'angular-loading-bar'])
.config(function($urlRouterProvider, $stateProvider, bpAppProvider, cfpLoadingBarProvider) {

bpAppProvider.setConfig({
platform: localStorage.getItem('platform') || 'ios'
})

cfpLoadingBarProvider.includeSpinner = false;

$urlRouterProvider.otherwise('/inbox');

$stateProvider
.state('inbox', {
url: '/inbox',
templateUrl: 'views/inbox.html'
})
})
16 changes: 16 additions & 0 deletions app/styles/main.less
@@ -0,0 +1,16 @@
// Bradypodion
@import "../bower_components/lesshat/build/lesshat";
@import "../bower_components/bradypodion/dist/bradypodion";

// Optional Modules
.bp-loading-bar;

// Icons
@import "../bower_components/fontawesome/less/font-awesome";
@fa-font-path: '../bower_components/fontawesome/fonts';
@bp-icon-font-app: FontAwesome;

// User Styles
@android-highlight-color: #009a02;
@ios-highlight-color: #009a02;
@android-navbar-app-icon: url(../favicon.ico);
5 changes: 5 additions & 0 deletions app/views/inbox.html
@@ -0,0 +1,5 @@
<bp-table>
<bp-cell>
Task
</bp-cell>
</bp-table>
9 changes: 9 additions & 0 deletions bower.json
@@ -0,0 +1,9 @@
{
"name": "zentodone",
"version": "0.0.0",
"dependencies": {
"bradypodion": "0.5.1",
"angular-loading-bar": "~0.3.0",
"fontawesome": "~4.0.3"
}
}
26 changes: 26 additions & 0 deletions package.json
@@ -0,0 +1,26 @@
{
"name": "zentodone",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-concurrent": "^0.5.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-contrib-concat": "^0.4.0",
"grunt-contrib-connect": "^0.7.1",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-less": "^0.11.0",
"grunt-contrib-watch": "^0.6.0",
"grunt-ngmin": "~0.0.2",
"grunt-usemin": "^2.1.1",
"load-grunt-tasks": "^0.4.0",
"time-grunt": "^0.3.1"
},
"engines": {
"node": ">=0.10.0"
},
"scripts": {
"test": "grunt test"
}
}

0 comments on commit b821046

Please sign in to comment.