publish makefile steps

This commit is contained in:
Radek Stepan 2014-10-26 19:57:44 -07:00
parent 9a4080b42e
commit ad0227f959
14 changed files with 185 additions and 72 deletions

View File

@ -2,8 +2,21 @@ module.exports = (grunt) ->
grunt.initConfig grunt.initConfig
pkg: grunt.file.readJSON("package.json") pkg: grunt.file.readJSON("package.json")
clean: [
'public/js'
'public/css'
]
mkdir:
all:
options:
create: [
'public/js'
'public/css'
]
stylus: stylus:
style: app:
src: [ src: [
'src/styles/fonts.styl' 'src/styles/fonts.styl'
'src/styles/icons.styl' 'src/styles/icons.styl'
@ -14,7 +27,7 @@ module.exports = (grunt) ->
dest: 'public/css/app.css' dest: 'public/css/app.css'
concat: concat:
js: vendor:
src: [ src: [
# Vendor dependencies. # Vendor dependencies.
'vendor/lodash/dist/lodash.js' 'vendor/lodash/dist/lodash.js'
@ -37,6 +50,15 @@ module.exports = (grunt) ->
options: options:
separator: ';' # for minification purposes separator: ';' # for minification purposes
bundle:
src: [
'public/js/vendor.min.js'
'public/js/app.min.js'
]
dest: 'public/js/app.bundle.min.js'
options:
separator: ';' # for minification purposes
css: css:
src: [ src: [
# Vendor dependencies. # Vendor dependencies.
@ -46,11 +68,41 @@ module.exports = (grunt) ->
] ]
dest: 'public/css/app.bundle.css' dest: 'public/css/app.bundle.css'
grunt.loadNpmTasks('grunt-browserify') uglify:
bundle:
files:
'public/js/app.min.js': 'public/js/app.js'
'public/js/vendor.min.js': 'public/js/vendor.js'
cssmin:
bundle:
files:
'public/css/app.min.css': 'public/css/app.css'
'public/css/app.bundle.min.css': 'public/css/app.bundle.css'
grunt.loadNpmTasks('grunt-mkdir')
grunt.loadNpmTasks('grunt-contrib-clean')
grunt.loadNpmTasks('grunt-contrib-stylus') grunt.loadNpmTasks('grunt-contrib-stylus')
grunt.loadNpmTasks('grunt-contrib-concat') grunt.loadNpmTasks('grunt-contrib-concat')
grunt.loadNpmTasks('grunt-contrib-uglify')
grunt.loadNpmTasks('grunt-contrib-cssmin')
# Stylus to CSS, concat JS libs and all CSS.
grunt.registerTask('default', [ grunt.registerTask('default', [
'stylus' 'stylus:app'
'concat' 'concat:vendor'
'concat:css'
])
# Cleanup public directories.
grunt.registerTask('init', [
'clean'
'mkdir'
])
# Minify JS, CSS and concat JS.
grunt.registerTask('minify', [
'uglify:bundle'
'cssmin:bundle'
'concat:bundle'
]) ])

View File

@ -1,18 +1,28 @@
# Install dependencies.
install: install:
npm install npm install
bower install bower install
# Build the app for production.
build-app: build-app:
./node_modules/.bin/browserify -e ./src/app.coffee -o public/js/app.js -d ./node_modules/.bin/browserify -e ./src/app.coffee -o public/js/app.js
# Watch the app sources and build with source maps.
watch-app: watch-app:
./node_modules/.bin/watchify -e ./src/app.coffee -o public/js/app.js -d -v ./node_modules/.bin/watchify -e ./src/app.coffee -o public/js/app.js -d -v
# Build vendor libs and styles.
build-vendor: build-vendor:
grunt grunt
# Serve locally.
serve: serve:
cd public; python -m SimpleHTTPServer 8000 cd public; python -m SimpleHTTPServer 8000
deploy: # Make and publish a minified package.
publish:
grunt init
make build-app
make build-vendor
grunt minify
firebase deploy firebase deploy

View File

@ -20,10 +20,6 @@
- [ ] provide a documentation site (because we ref it from hero) - [ ] provide a documentation site (because we ref it from hero)
- [ ] track users/make it easy for people to leave feedback - [ ] track users/make it easy for people to leave feedback
###Misc
- [ ] the deploy script needs to disable autoreload; `make watch` should start a static web server and also launch a build script with a flag saying which files to include in the head (uncompressed, with live reload); standard build script should minify scripts
##Backlog ##Backlog
###Routing ###Routing
@ -49,6 +45,8 @@
###Bugs ###Bugs
- [ ] success/warn topbar on milestone page is only shown if we async load data
- [ ] html entities (like & at the bottom of the page) are not being rendered correctly; {{{}}} ?
- [ ] `rails/rails/24` has issues in two clusters as if merged from two milestones - [ ] `rails/rails/24` has issues in two clusters as if merged from two milestones
- [ ] trendline cutting into axes - [ ] trendline cutting into axes
- [ ] topbar messages set position from `top`, does not work when we have scrolled on the page; show sticky to the top and move with our scroll; at the very least make them show up at the top and not be hidden - [ ] topbar messages set position from `top`, does not work when we have scrolled on the page; show sticky to the top and move with our scroll; at the very least make them show up at the top and not be hidden
@ -68,6 +66,9 @@
###Misc ###Misc
- [ ] be able to logout
- [ ] be able to delete added projects; see the cog at the bottom of tables
- [ ] how GitHub show commit activity in weekly slots, can we have something like this in the chart? Basically show commits in that week and their users
- [ ] add a chart straight from the hero banner - [ ] add a chart straight from the hero banner
- [ ] on chart page show a little progress bar in the title - [ ] on chart page show a little progress bar in the title
- [ ] use tap plugin for `Ractive` - [ ] use tap plugin for `Ractive`

View File

@ -4,14 +4,17 @@
"description": "GitHub Burndown Chart as a Service", "description": "GitHub Burndown Chart as a Service",
"devDependencies": { "devDependencies": {
"grunt": "~0.4.1", "grunt": "~0.4.1",
"grunt-contrib-concat": "~0.5.0", "grunt-mkdir": "~0.1.2",
"grunt-contrib-clean": "~0.6.0",
"grunt-contrib-stylus": "~0.9.0", "grunt-contrib-stylus": "~0.9.0",
"grunt-contrib-concat": "~0.5.0",
"grunt-contrib-uglify": "~0.6.0",
"grunt-contrib-cssmin": "~0.10.0",
"coffeeify": "~0.7.0L", "coffeeify": "~0.7.0L",
"ractivate": "~0.2.0", "ractivate": "~0.2.0",
"browserify": "~6.1.0", "browserify": "~6.1.0",
"watchify": "~2.1.0" "watchify": "~2.1.0"
}, },
"main": "./src/app.coffee",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/radekstepan/burnchart.io.git" "url": "git://github.com/radekstepan/burnchart.io.git"
@ -26,4 +29,4 @@
"browser": { "browser": {
"semver": "./vendor/node-semver/semver.js" "semver": "./vendor/node-semver/semver.js"
} }
} }

1
public/css/app.bundle.min.css vendored Normal file

File diff suppressed because one or more lines are too long

1
public/css/app.min.css vendored Normal file

File diff suppressed because one or more lines are too long

11
public/index-dev.html Normal file
View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/app.bundle.css">
</head>
<body>
<script src="js/vendor.js"></script>
<script src="js/app.js"></script>
</body>
</html>

View File

@ -2,11 +2,9 @@
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/app.bundle.min.css">
<link rel="stylesheet" type="text/css" href="css/app.bundle.css">
</head> </head>
<body> <body>
<script src="js/vendor.js"></script> <script src="js/app.bundle.min.js"></script>
<script src="js/app.js"></script>
</body> </body>
</html> </html>

18
public/js/app.bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
public/js/app.min.js vendored Normal file

File diff suppressed because one or more lines are too long

17
public/js/vendor.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -34,6 +34,6 @@
</table> </table>
<div class="footer"> <div class="footer">
<a href="#"><Icons icon="cog"/> Edit</a> <!--<a href="#"><Icons icon="cog"/> Edit</a>-->
</div> </div>
</div> </div>

View File

@ -47,6 +47,6 @@
</table> </table>
<div class="footer"> <div class="footer">
<a href="#"><Icons icon="cog"/> Edit</a> <!--<a href="#"><Icons icon="cog"/> Edit</a>-->
</div> </div>
</div> </div>