-
Notifications
You must be signed in to change notification settings - Fork 2
NOMERGE PR.js Build Improvements #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
a73d82a
ef3d2fb
32d47fe
d5a1bb4
03bc39a
593485e
b05c3d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,7 @@ | ||
| node_modules/* | ||
| src/jspm_packages/* | ||
| node_modules/ | ||
| src/jspm_packages/ | ||
| dist/ | ||
|
|
||
| # TODO: Remove | ||
| build.min.js | ||
| build.min.js.map | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| language: node_js | ||
| node_js: | ||
| - '0.12' | ||
| before_install: | ||
| - npm install -g jspm | ||
| - jspm config registries.github.auth $RADIFY_JSPM_GITHUB_AUTH_TOKEN | ||
| before_script: | ||
| - npm install | ||
| - jspm install | ||
| script: gulp | ||
| env: | ||
| global: | ||
| secure: lPYM9GGMD1qyd4/zhRTGpipOtxHwtQ0EFxgNg9KjRBEMkTLHjeZI0JQNskn0E8ZYXbjYghdUFvXkAAED5F9d0igPRcuLtAau1iGnW2PGyK2rzHE/fpplWFYIdm65CtQP4hv0bEGw3UBx9WkFDqs7NiRTE5YiDh75woP88weI7oxqlfpJdyvMJgoSda87dBYkYVOHCaMGrLkXK3GQhR6eJ20WZIp0TCbiMYLEzpo45BDMZSf9K0yRPiJ9vA3bgWUJGqfW4Dt6k10pKD1Q5SE/WeingOphiBK5Lrfp+Y7i1JkOpPzRC5rDMwJJUbJQpUeAvrmDQCf9VUmrib2iBA5dpRAe4xgOmdNEZaJEjS9lSU+dOtcBHo9mrlJ9pEHSzJO7Q3oLQC8nq7bf/SP1ZlQUnWqtxM3eIUnkIYJTBtzzQkHC3qpa5OZvWHrJIGqj8E1Mafp+1YHhelCHhg+ePiy1sXUvWF+1w3FC8M3O51Q/9YhjetpoqeshjmMdwJaV/8+WMZBieFHLzgLGIySTK6YQUMkUppqmVg524AwTDmMvgfZtr8xN/eBX3SnrUZjW9ILk00qCU/Q6qc/6IczCRyaByBajG2jqePn0wM78F6fGUMVO2Cdpp0P3+uSzKDb8XA8Vp7T1c4JthZ2ljRgP/Lgp4lUD/qEO1qio4a36sd6OVjc= |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| 'use strict'; | ||
|
|
||
| var gulp = require('gulp'); | ||
| var runSeq = require('run-sequence'); | ||
|
|
||
| gulp.task('build', function(done) { | ||
| runSeq('clean', ['buildjs', 'buildcss', 'buildimg'], done); | ||
| }); | ||
|
|
||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| 'use strict'; | ||
|
|
||
| var gulp = require('gulp'); | ||
| var autoprefixer = require('gulp-autoprefixer'); | ||
| var concat = require('gulp-concat'); | ||
| var minifyCss = require('gulp-minify-css'); | ||
| var rename = require('gulp-rename'); | ||
|
|
||
| // Build CSS for distribution. | ||
| gulp.task('buildcss', function () { | ||
| gulp.src(global.paths.css) | ||
| .pipe(concat('app.css')) | ||
| .pipe(autoprefixer()) | ||
| .pipe(minifyCss()) | ||
| .pipe(rename({ | ||
| suffix: '.min' | ||
| })) | ||
| .pipe(gulp.dest(global.paths.dist)); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| 'use strict'; | ||
|
|
||
| var gulp = require('gulp'); | ||
| var imagemin = require('gulp-imagemin'); | ||
| var pngquant = require('imagemin-pngquant'); | ||
|
|
||
| // Build images for distribution. | ||
| gulp.task('buildimg', function () { | ||
| gulp.src(global.paths.img) | ||
| .pipe(imagemin({ | ||
| progressive: true, | ||
| svgoPlugins: [{removeViewBox: false}], | ||
| use: [pngquant()] | ||
| })) | ||
| .pipe(gulp.dest(global.paths.dist + '/img')); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| 'use strict'; | ||
|
|
||
| var gulp = require('gulp'); | ||
| var exec = require('child_process').execSync; | ||
|
|
||
| // Build JS for distribution. | ||
| gulp.task('buildjs', function () { | ||
| exec('npm run buildjs', function (err, stdout, stderr) { | ||
| if (err) { | ||
| throw err; | ||
| } | ||
| else { | ||
| console.log('Build complete!'); | ||
| } | ||
| }); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| 'use strict'; | ||
|
|
||
| var gulp = require('gulp'); | ||
| var del = require('del'); | ||
|
|
||
| // Empty the build dir. | ||
| gulp.task('clean', function (done) { | ||
| del([global.paths.dist + '/*'], done); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| 'use strict'; | ||
|
|
||
| var gulp = require('gulp'); | ||
| var connect = require('gulp-connect'); | ||
|
|
||
| // Start local dev server. | ||
| gulp.task('serve', function() { | ||
| connect.server({ | ||
| root: global.paths.index, | ||
| port: 3003, | ||
| livereload: true | ||
| }); | ||
|
|
||
| console.log("Demo server started at localhost:3003"); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| 'use strict'; | ||
|
|
||
| require('babel-core/register'); | ||
|
|
||
| var gulp = require('gulp'); | ||
| var jasmine = require('gulp-jasmine'); | ||
|
|
||
| gulp.task('test', function () { | ||
| return gulp.src(global.paths.specs).pipe(jasmine({ includeStackTrace: true })); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,38 @@ | ||
| 'use strict'; | ||
|
|
||
| /* | ||
| * gulpfile.js | ||
| * =========== | ||
| * Rather than manage one giant configuration file responsible | ||
| * for creating multiple tasks, each task has been broken out into | ||
| * its own file in the 'gulp' folder. Any files in that directory get | ||
| * automatically required below. | ||
| * | ||
| * To add a new task, simply add a new task file in that directory. | ||
| */ | ||
|
|
||
| var gulp = require('gulp'); | ||
| var conn = require('gulp-connect'); | ||
| var requireDir = require('require-dir'); | ||
|
|
||
| global.paths = { | ||
| // CSS sources | ||
| 'css': './css/*', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think these comments are redundant, but that's just my preference.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although that's an excellent article, I disagree that, in this case, these comments are superfluous. My general rule for comments--aside from conforming to JavaDoc-style conventions on certain projects--looks something like this:
I can delete these comments if that's what you would prefer. |
||
| // Distribution folder. | ||
| 'dist': './dist', | ||
| // Image sources. | ||
| 'img': './img/*', | ||
| // TODO: replace with ./src or ./build | ||
| 'index': './', | ||
| // Sources folder. | ||
| 'src': './src', | ||
| // Specs folder. | ||
| 'spec': './spec', | ||
| // Specs glob. | ||
| 'specs': './spec/**/*Spec.js' | ||
| }; | ||
|
|
||
| gulp.task('serve', function() { | ||
| conn.server({ | ||
| root: __dirname, | ||
| port: 3003 | ||
| }); | ||
| // Require all tasks in the 'gulp' folder. | ||
| requireDir('./gulp', { recurse: false }); | ||
|
|
||
| console.log("Demo server started at localhost:3003"); | ||
| }); | ||
| // Default task; test & build | ||
| gulp.task('default', ['test', 'build']); | ||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO remove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Those files current go into root. I'd prefer them to be in
build/anddist/, but I haven't found a way to do so without breaking everything. Wherever they go, they should not be committed to the repo, but rather be generated in the bygulp build. For the time being, they're stuck in root until I find a better solution.