Skip to content

Commit

Permalink
Updating modules -- Fixing compass bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
spacenick committed Jan 14, 2014
1 parent 43de26d commit 0a519a0
Show file tree
Hide file tree
Showing 468 changed files with 19,386 additions and 194,815 deletions.
3 changes: 3 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "components/"
}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.DS_Store
app/test/
build/
.sass-cache
node_modules/
.sass-cache/
bower_components/
bower_components/
components/
app/components/
99 changes: 65 additions & 34 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = (grunt)->

# Run `grunt server` for live-reloading development environment
grunt.registerTask('server', [ 'build', 'livereload-start', 'karma:background', 'express', 'regarde' ])
grunt.registerTask('server', [ 'build', 'karma:background', 'express', 'watch' ])

# Run `grunt test` (used by `npm test`) for continuous integration (e.g. Travis)
grunt.registerTask('test', [ 'build', 'karma:unit' ])
Expand All @@ -10,10 +10,12 @@ module.exports = (grunt)->
grunt.registerTask('test:browsers', [ 'karma:browsers', 'server' ])

# Clean, validate & compile web-accessible resources
grunt.registerTask('build', [ 'clean', 'copy', 'compass:prod' ])
grunt.registerTask('build', [ 'clean', 'copy', 'ngtemplates', 'compass:prod' ])

# Optimize pre-built, web-accessible resources for production, primarily `usemin`
grunt.registerTask('optimize', [ 'useminPrepare', 'concat', 'uglify', 'compass:prod', 'mincss', 'rev', 'usemin' ])
grunt.registerTask('optimize', [ 'useminPrepare', 'concat', 'replace:dist', 'uglify', 'compass:prod', 'mincss', 'rev', 'usemin' ])

grunt.registerTask('prod', ['build', 'optimize']);


# Configuration
Expand All @@ -28,7 +30,7 @@ module.exports = (grunt)->
# Glob CONSTANTS
ALL_FILES: '**/*'
CSS_FILES: '**/*.css'
HTML_FILES: '**/*.html'
HTML_FILES: '{app/scripts/modules/directives,app/views}/**/*.html'
IMG_FILES: '**/*.{png,gif,jpg,jpeg}'
JS_FILES: '**/*.js'
SASS_FILES: '**/*.scss'
Expand Down Expand Up @@ -78,13 +80,13 @@ module.exports = (grunt)->
]

# app (non-Bower) HTML in `client`
templates:
files: [
expand: true
cwd: '<%= CLIENT_DIR %>'
src: '<%= HTML_FILES %>'
dest: '<%= BUILD_DIR %>'
]
# templates:
# files: [
# expand: true
# cwd: '<%= CLIENT_DIR %>'
# src: '<%= HTML_FILES %>'
# dest: '<%= BUILD_DIR %>'
# ]

# Validate app `client` and `server` JS
jshint:
Expand Down Expand Up @@ -122,16 +124,6 @@ module.exports = (grunt)->
sassDir: '<%= CLIENT_DIR %>/app/styles',
cssDir: '<%= BUILD_DIR %>/app/styles'

# Compile `app.less` -> `app.css`
# less:
# '<%= BUILD_DIR %>/app/styles/app.css': '<%= CLIENT_DIR %>/app/styles/app.less'

# Support live-reloading of all non-Bower resources
livereload:
options:
base: '<%= BUILD_DIR %>'
files: '<%= BUILD_DIR + ALL_FILES %>'

# Minify app `.css` resources -> `.min.css`
mincss:
app:
Expand All @@ -149,35 +141,35 @@ module.exports = (grunt)->
jshint: [ grunt: true, args: [ 'jshint' ] ]

# "watch" distinct types of files and re-prepare accordingly
regarde:
watch:
# Any public-facing changes should reload the browser & re-run tests (which may depend on those resources)
build:
files: '<%= BUILD_DIR + ALL_FILES %>'
tasks: [ 'livereload', 'karma:background:run' ]
tasks: [ 'karma:background:run' ]

# Changes to app code should be validated and re-copied to the `build`, triggering `regarde:build`
js:
files: '<%= CLIENT_DIR + JS_FILES %>'
tasks: [ 'copy:js', 'parallel:jshint' ]

# Changes to app styles should re-compile, triggering `regarde:build`
less:
files: '<%= CLIENT_DIR + LESS_FILES %>'
tasks: [ 'parallel:less' ]

compass:
files: '<%= CLIENT_DIR + SASS_FILES %>'
tasks: [ 'parallel:compass' ]
tasks: [ 'compass' ]

# Changes to server-side code should validate, restart the server, & refresh the browser
server:
files: '<%= SERVER_DIR + ALL_FILES %>'
tasks: [ 'parallel:jshint', 'express', 'livereload' ]
tasks: [ 'parallel:jshint', 'express' ]

# Changes to app templates should re-copy & re-compile them, triggering `regarde:build`
# Changes to app templates should re-run ngtemplates
templates:
files: '<%= CLIENT_DIR + HTML_FILES %>'
tasks: [ 'copy:templates' ]
tasks: [ 'ngtemplates' ]

# Custom watch options
options:
spawn: false
livereload: true

# Express requires `server.script` to reload from changes
express:
Expand All @@ -198,6 +190,42 @@ module.exports = (grunt)->
useminPrepare:
html: '<%= BUILD_DIR %>/index.html'

# Convert Angular `.html` templates to `.js` in the `app` module
ngtemplates:
app: # Replace this by your angular module name (here it is defined in app/scripts/app.js)
src: '<%= HTML_FILES %>'
dest: '<%= BUILD_DIR %>app/scripts/app.templates.js'
cwd: '<%= CLIENT_DIR %>'
options:
htmlmin:
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true, # Only if you don't use comment directives!
removeEmptyAttributes: true,
removeRedundantAttributes: true
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true

# Replace references to minified versions when building the project for a dist version
replace:
dist:
src: ['<%= BUILD_DIR %>/index.html']
dest: '<%= BUILD_DIR %>/index.html'
replacements: [
from:'parse-1.2.15.js'
to:'parse-1.2.15.min.js'
,
from:'jquery.js'
to:'jquery.min.js'
,
from:'/angular.js'
to: '/angular.min.js'
,
from:'/angular-animate.js'
to: '/angular-animate.min.js'
]


# Dependencies
grunt.loadNpmTasks('grunt-contrib-clean')
Expand All @@ -206,12 +234,15 @@ module.exports = (grunt)->
grunt.loadNpmTasks('grunt-contrib-jshint')
grunt.loadNpmTasks('grunt-contrib-less')
grunt.loadNpmTasks('grunt-contrib-compass')
grunt.loadNpmTasks('grunt-contrib-livereload')
grunt.loadNpmTasks('grunt-contrib-mincss')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-express-server')
grunt.loadNpmTasks('grunt-karma')
grunt.loadNpmTasks('grunt-regarde')
grunt.loadNpmTasks('grunt-contrib-watch')
grunt.loadNpmTasks('grunt-parallel')
grunt.loadNpmTasks('grunt-usemin')
grunt.loadNpmTasks('grunt-rev')
grunt.loadNpmTasks('grunt-angular-templates')
grunt.loadNpmTasks('grunt-text-replace')


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Read about all the features [here](http://brandid.github.io/parse-angular-demo/#
1. `bower install`
1. `grunt server` - builds and fires up the local node server on localhost:3000
1. Visit http://localhost.com:3000 to develop your site
1. `grunt build` followed by `grunt optimize` to build a deployable version in the parse-angular-demo/build folder
1. `grunt prod` to build a deployable version in the parse-angular-demo/build folder (`grunt prod` is actually `build` followed by `optimize`)

------
### Wire up your own Parse backend in seconds
Expand Down
13 changes: 5 additions & 8 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"name": "genesis-skeleton",
"version": "0.0.1",
"name": "brandid-parse-angular",
"version": "0.1.0",
"directory": "components/",
"dependencies": {
"angular": "~1.0.6",
"angular-mocks": "~1.0.6",
"angular-scenario": "~1.0.6",
"angular-strap": "~0.7.3",
"bootstrap": "~2.3.1",
"html5shiv-dist": "~3.6.1",
"modernizr": "~2.6.2",
"sass-bootstrap": "~2.3.1"
"sass-bootstrap": "2.3.2",
"lodash": "~2.4.1"
}
}
4 changes: 2 additions & 2 deletions client/app/styles/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ $iconWhiteSpritePath: "/img/glyphicons-halflings-white.png";
$blueLight: #0aa4f7 !default;

@import "compass";
@import "../../../components/sass-bootstrap/lib/_bootstrap.scss";
@import "../../../components/sass-bootstrap/lib/_responsive.scss";
@import "../../../components/sass-bootstrap/lib/bootstrap.scss";
@import "../../../components/sass-bootstrap/lib/responsive.scss";
@import "_animate-helpers.scss";
@import "_animate.scss";
@import "brandid-ui/_brandid-ui.scss";
Expand Down
16 changes: 10 additions & 6 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<!--[if lt IE 9]>
<script src="components/html5shiv-dist/html5shiv.js"></script>
<![endif]-->
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.js"></script>
<!-- waiting for ui-router to support angular-1.2, hence some view animations are currently gracefully degrading -->
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.0-rc.2/angular-animate.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.8/angular-animate.js"></script>

<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="//cloud.typography.com/7370432/708202/css/fonts.css" />
Expand All @@ -46,14 +46,18 @@
</div>


<script src="//www.parsecdn.com/js/parse-1.2.12.min.js"></script>
<script src="//www.parsecdn.com/js/parse-1.2.15.js"></script>

<!-- build:js app/scripts/all.min.js -->
<script src="components/modernizr/modernizr.js"></script>
<script src="components/underscore/underscore.js"></script>
<script src="components/lodash/dist/lodash.js"></script>
<script src="app/scripts/libs/angular-1.2-ui-router.js"></script>



<script src="app/scripts/app.js"></script>
<script src="app/scripts/libs/angular-1.2-ui-router.js"></script>
<script src="app/scripts/app.templates.js"></script>


<script src="app/scripts/modules/states/demo.js"></script>
<script src="app/scripts/modules/states/features.js"></script>
Expand Down
4 changes: 0 additions & 4 deletions components/angular-mocks/README.md

This file was deleted.

Loading

0 comments on commit 0a519a0

Please sign in to comment.