-
Notifications
You must be signed in to change notification settings - Fork 4
Updates to goog.module and ES2015 #6
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
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 |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ node_modules | |
| bower_components | ||
| .tmp/ | ||
| **.mo | ||
| .idea/** | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,17 @@ | ||
| sudo: false | ||
| language: python | ||
| python: | ||
| - 2.7 | ||
| - 2.7 | ||
| node_js: | ||
| - "6.2" | ||
| cache: pip | ||
| before_install: | ||
| - nvm install 6.2 | ||
|
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. 6.9.5 |
||
| install: | ||
| - npm install -g gulp | ||
| - npm install -g bower | ||
| - pip install grow | ||
| - nvm use 6.2 | ||
|
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. 6.9.5 |
||
| - npm install -g gulp | ||
| - npm install -g bower | ||
| - pip install grow | ||
| script: | ||
| - grow install | ||
| - grow build | ||
| - grow install | ||
| - grow build | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,9 @@ | ||
| { | ||
| "name": "scaffold", | ||
| "private": true, | ||
| "dependencies": { | ||
| "angular": "1.5.7" | ||
| }, | ||
| "devDependencies": { | ||
| "closure-compiler": "http://dl.google.com/closure-compiler/compiler-latest.zip", | ||
| "closure-library": "git://github.com/google/closure-library.git", | ||
| "closure-compiler-src": "git://github.com/google/closure-compiler.git" | ||
| "closure-compiler": "http://dl.google.com/closure-compiler/compiler-20170124.zip", | ||
| "closure-library": "git://github.com/google/closure-library.git#68284ff", | ||
| "closure-compiler-src": "git://github.com/google/closure-compiler.git#7eb7513" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,32 @@ | ||
| --- | ||
| $title@: Another Page | ||
| --- | ||
| # {{_('Another page.')}} | ||
| ---- | ||
| $title@: Home | ||
| path: /another/ | ||
|
|
||
| Unlike the first page, this page is Markdown-formatted. | ||
| $localization: | ||
| path: /intl/{locale}/{base} | ||
| hero: | ||
| title@: Hello World! | ||
| subtitle@: Lorem ipsum dolor sit amet. | ||
| ctas: | ||
| - title@: Callout 1 | ||
| subtitle@: Description 1. | ||
| - title@: Callout 2 | ||
| subtitle@: Description 2. | ||
| - title@: Callout 3 | ||
| subtitle@: Description 3. | ||
| ---- | ||
| <h1>{{_(doc.hero.title)}}</h1> | ||
| <p>{{_(doc.hero.subtitle)}}</p> | ||
|
|
||
| 1. Which means | ||
| 1. you can | ||
| 1. use Markdown-formatted lists. | ||
| <div ng-controller="MainController as ctrl"> | ||
| <form ng-submit="ctrl.sayHello(ctrl.text)"> | ||
| <input type="text" ng-model="ctrl.text"> | ||
| <button type="submit">{{_('Say Hello')}}</button> | ||
| </form> | ||
| </div> | ||
|
|
||
| <ul> | ||
| {% for cta in doc.ctas %} | ||
| <li><b>{{_(cta.title)}}:</b> {{_(cta.subtitle)}} | ||
| {% endfor %} | ||
| </ul> |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| $title@: Home | ||
| $path: / | ||
| $view: /views/pages/home.html | ||
|
|
||
| $localization: | ||
| path: /intl/{locale}/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,61 +1,53 @@ | ||
| 'use strict' | ||
| var gulp = require('gulp'); | ||
| var runSequence = require('run-sequence'); | ||
| var filenames = require('gulp-filenames'); | ||
| var concat = require('gulp-concat'); | ||
| var closureCompiler = require('gulp-closure-compiler'); | ||
| var uglify = require('gulp-uglify'); | ||
| var config = require('../config'); | ||
| 'use strict'; | ||
|
|
||
| const gulp = require('gulp'); | ||
| const runSequence = require('run-sequence'); | ||
| const concat = require('gulp-concat'); | ||
| const closureCompiler = require('gulp-closure-compiler'); | ||
| const argv = require('yargs').argv; | ||
| const rimraf = require('rimraf'); | ||
| const uglify = require('gulp-uglify'); | ||
| const config = require('../config'); | ||
|
|
||
| const ENV_PRODUCTION = argv.env == 'PROD'; | ||
|
|
||
| gulp.task('compile_js', function() { | ||
| var closureOpts = { | ||
| compilerPath: './bower_components/closure-compiler/compiler.jar', | ||
|
|
||
| const OPT_LEVEL = ENV_PRODUCTION ? | ||
| 'ADVANCED_OPTIMIZATIONS' : | ||
| 'SIMPLE_OPTIMIZATIONS'; | ||
|
|
||
| const closureOpts = { | ||
| compilerPath: './bower_components/closure-compiler/closure-compiler-v20170124.jar', | ||
| compilerFlags: { | ||
| angular_pass: true, | ||
| closure_entry_point: 'scaffold', | ||
| compilation_level: 'SIMPLE_OPTIMIZATIONS', | ||
| generate_exports: true, | ||
| manage_closure_dependencies: true, | ||
| only_closure_dependencies: true, | ||
| output_wrapper: '(function(){%output%})();', | ||
| js: [ | ||
| './bower_components/closure-library/closure/**.js', | ||
| './bower_components/closure-library/third_party/**.js', | ||
| '!**_test.js' | ||
| ] | ||
| angular_pass: true, | ||
| closure_entry_point: 'goog:app.bootstrap', | ||
| compilation_level: OPT_LEVEL, | ||
| output_wrapper: '(function(){%output%})();', | ||
| generate_exports: true, | ||
| export_local_property_definitions: true, | ||
| js: [ | ||
| './bower_components/closure-library/closure/goog/base.js', | ||
| '!**_test.js', | ||
| '!**_spec.js' | ||
| ], | ||
| externs: [ | ||
| './bower_components/closure-compiler-src/contrib/externs/angular-1.6*.js' | ||
| ] | ||
| }, | ||
| maxBuffer: 800000, // Set maxBuffer to .8GB | ||
| fileName: 'build.min.js' | ||
| maxBuffer: 800000, // .8GB | ||
| fileName: 'main.min.js' | ||
| }; | ||
|
|
||
| var externs = []; | ||
| externs.concat(filenames.get('closure_externs')); | ||
|
|
||
| closureOpts.compilerFlags.externs = externs | ||
|
|
||
| return gulp.src(config.Path.JS_SOURCES) | ||
| return gulp | ||
| .src(config.Path.JS_SOURCES) | ||
| .pipe(closureCompiler(closureOpts)) | ||
| .pipe(gulp.dest(config.Path.JS_TEMP_DIR)) | ||
| }); | ||
|
|
||
| gulp.task('minify_js', function() { | ||
| return gulp.src([ | ||
| config.Path.JS_TEMP_DIR + 'build.min.js' | ||
| ]) | ||
| .pipe(concat('main.min.js')) | ||
| .pipe(uglify()) | ||
| .pipe(gulp.dest(config.Path.JS_OUT_DIR)); | ||
| }); | ||
|
|
||
| gulp.task('build_js', function(callback) { | ||
| return runSequence( | ||
| 'get_closure_externs_paths', | ||
| 'compile_js', | ||
| 'minify_js', | ||
| callback); | ||
| }); | ||
|
|
||
| gulp.task('get_closure_externs_paths', function() { | ||
| return gulp.src(config.Path.CLOSURE_EXTERNS) | ||
| .pipe(filenames('closure_externs')) | ||
| gulp.task('clean', function(callback) { | ||
| rimraf('./build', callback); | ||
| }) | ||
|
|
||
| gulp.task('build_js', ['compile_js']); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,17 @@ | ||
| 'use strict' | ||
| var gulp = require('gulp'); | ||
| var autoprefixer = require('gulp-autoprefixer'); | ||
| var plumber = require('gulp-plumber'); | ||
| var sass = require('gulp-sass'); | ||
| var config = require('../config'); | ||
| 'use strict'; | ||
|
|
||
| const gulp = require('gulp'); | ||
| const autoprefixer = require('gulp-autoprefixer'); | ||
| const plumber = require('gulp-plumber'); | ||
| const sass = require('gulp-sass'); | ||
| const csso = require('gulp-csso'); | ||
| const config = require('../config'); | ||
|
|
||
| gulp.task('sass', function() { | ||
| return gulp.src(config.Path.CSS_SOURCES) | ||
| .pipe(plumber()) | ||
| .pipe(sass({ | ||
| outputStyle: 'compressed' | ||
| })) | ||
| .pipe(sass()) | ||
| .pipe(autoprefixer()) | ||
| .pipe(csso()) | ||
| .pipe(gulp.dest(config.Path.CSS_OUT_DIR)); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,20 @@ | ||
| var fs = require('fs'); | ||
| var gulp = require('gulp'); | ||
| const fs = require('fs'); | ||
| const gulp = require('gulp'); | ||
| const runSequence = require('run-sequence'); | ||
| const argv = require('yargs').argv; | ||
|
|
||
|
|
||
| /** | ||
| * This will load all js or coffee files in the gulp directory | ||
| * This will load all js files in the gulp directory | ||
| * in order to load all gulp tasks | ||
| */ | ||
| fs.readdirSync('./gulp/tasks').filter(function(file) { | ||
| return (/\.(js|coffee)$/i).test(file); | ||
| return (/\.js$/i).test(file); | ||
| }).map(function(file) { | ||
| require('./gulp/tasks/' + file); | ||
| }); | ||
|
|
||
| gulp.task('build', ['build_js', 'sass']); | ||
| gulp.task('build', function(callback){ | ||
| runSequence('clean', ['build_js', 'sass'], callback) | ||
| }); | ||
| gulp.task('default', ['build', 'watch']); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,21 @@ | ||
| { | ||
| "name": "scaffold", | ||
| "private": true, | ||
| "engines": { | ||
| "node": "^6.2.0" | ||
|
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. 6.9.5 |
||
| }, | ||
| "devDependencies": { | ||
| "bower": "^1.3.12", | ||
|
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. This is more of a personal preference, but I'd pin versions |
||
| "gulp": "^3.8.11", | ||
| "gulp-autoprefixer": "^2.1.0", | ||
| "gulp-closure-compiler": "^0.2.17", | ||
| "gulp-concat": "^2.5.2", | ||
| "gulp-filenames": "^2.0.0", | ||
| "gulp-csso": "^2.0.0", | ||
| "gulp-plumber": "^1.0.0", | ||
| "gulp-sass": "^2.1.1", | ||
| "gulp-uglify": "^1.2.0", | ||
| "run-sequence": "^1.0.2" | ||
| "gulp-uglify": "^2.0.1", | ||
| "rimraf": "^2.6.0", | ||
| "run-sequence": "^1.0.2", | ||
| "yargs": "^6.6.0" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,10 @@ | ||
| grow_version: ">=0.0.60" | ||
| grow_version: ">=0.0.67" | ||
|
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. 0.2.0? |
||
|
|
||
| localization: | ||
| default_locale: en_US | ||
| locales: | ||
| - de_DE | ||
| - en_US | ||
| - ja_JP | ||
| - en_US | ||
| - ja_JP | ||
|
|
||
| static_dirs: | ||
| - static_dir: /source/images/ | ||
|
|
@@ -15,3 +14,5 @@ static_dirs: | |
|
|
||
| preprocessors: | ||
| - kind: gulp | ||
| build_task: "build --env=PROD" | ||
| run_task: "default --env=DEV" | ||
This file was deleted.
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.
We should bump this to 6.9.5