Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #17 from continuumsecurity/dev
Browse files Browse the repository at this point in the history
Fix problems with build aui missing files.
  • Loading branch information
jlanda93 authored Dec 24, 2018
2 parents c07a381 + 7c706e7 commit 9ba7a26
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 38 deletions.
19 changes: 19 additions & 0 deletions build/aui/aui-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion demos/surface/layout.soy
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<title>{$title}</title>
<link rel="stylesheet" href="../../build/aui-css/css/bootstrap.css">
<link rel="stylesheet" href="assets/main.css">
<script src="../../build/aui/aui.js"></script>
<script src="../../build/aui/minify.js"></script>
</head>
<body>
<div class="container-fluid">
Expand Down
6 changes: 3 additions & 3 deletions tasks/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ gulp.task('build-publish', function(callback) {
});

gulp.task('aui-postbuild', function (callback) {
run('aui-minify', 'aui-assets', 'aui-lang', 'clean-aui', callback)
run('build-minify', 'build-assets', 'build-lang', 'clean-prebuild', callback)
});

function build(cwd, callback) {
var args = [];
var cmd = 'shifter';

args.push('--build-dir=' + path.join(ROOT, 'aui'));
args.push('--build-dir=' + path.join(ROOT, 'prebuild'));
args.push('--no-cache');
args.push('--no-coverage');
args.push('--no-lint');
Expand Down Expand Up @@ -90,7 +90,7 @@ gulp.task('build-base-debug', function(callback) {
});

gulp.task('build-loader-debug', function(callback) {
run('loader-prebuild', 'aliases', 'build-base-debug', 'loader-postbuild', callback);
run('loader-prebuild', 'aliases', 'build-base-debug', 'loader-postbuild-debug', callback);
});

gulp.task('build-publish-debug', function(callback) {
Expand Down
4 changes: 2 additions & 2 deletions tasks/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ gulp.task('clean-build', function(callback) {
del(['build'], callback);
});

gulp.task('clean-aui', function (callback) {
del(['aui'], callback);
gulp.task('clean-prebuild', function (callback) {
del(['prebuild'], callback);
});

gulp.task('clean-npm', function(callback) {
Expand Down
5 changes: 3 additions & 2 deletions tasks/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ gulp.task('init-npm', function(callback) {
});

gulp.task('init-yui', function() {
run('yui-minify', 'yui-assets', 'yui-lang')
});
return gulp.src('bower_components/yui3/build/**', { cwd: ROOT })
.pipe(replace('@VERSION@', alloy.yuiversion, {skipBinary: true}))
.pipe(gulp.dest('prebuild', { cwd: ROOT }));});

gulp.task('init-yui-debug', function() {
return gulp.src('bower_components/yui3/build/**', { cwd: ROOT })
Expand Down
7 changes: 7 additions & 0 deletions tasks/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ gulp.task('loader-prebuild', function(callback) {
});

gulp.task('loader-postbuild', function() {
return gulp.src('prebuild/aui/*.js', { cwd: ROOT })
.pipe(replace(/\(yui\(/g, '(aui|yui('))
.pipe(insert.append('YUI.Env.core.push.apply(YUI.Env.core, ["aui-base-core"]);'))
.pipe(gulp.dest('prebuild/aui/', { cwd: ROOT }));
});

gulp.task('loader-postbuild-debug', function() {
return gulp.src('build/aui/*.js', { cwd: ROOT })
.pipe(replace(/\(yui\(/g, '(aui|yui('))
.pipe(insert.append('YUI.Env.core.push.apply(YUI.Env.core, ["aui-base-core"]);'))
Expand Down
12 changes: 6 additions & 6 deletions tasks/aui.js → tasks/minify.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ var replace = require('gulp-replace');

var ROOT = path.join(__dirname, '..');

gulp.task('aui-minify', function () {
return gulp.src('aui/**/*+(-min.js|-min.css)', { cwd: ROOT })
gulp.task('build-minify', function () {
return gulp.src('prebuild/**/*+(-min.js|-min.css)', { cwd: ROOT })
.pipe(replace('@VERSION@', alloy.yuiversion, {skipBinary: true}))
.pipe(gulp.dest('build', { cwd: ROOT }));
});

gulp.task('aui-assets', function () {
return gulp.src('aui/**/assets/**', { cwd: ROOT })
gulp.task('build-assets', function () {
return gulp.src('prebuild/**/assets/**', { cwd: ROOT })
.pipe(replace('@VERSION@', alloy.yuiversion, {skipBinary: true}))
.pipe(gulp.dest('build', { cwd: ROOT }));
});

gulp.task('aui-lang', function () {
return gulp.src('aui/**/lang/**', { cwd: ROOT })
gulp.task('build-lang', function () {
return gulp.src('prebuild/**/lang/**', { cwd: ROOT })
.pipe(replace('@VERSION@', alloy.yuiversion, {skipBinary: true}))
.pipe(gulp.dest('build', { cwd: ROOT }));
});
24 changes: 0 additions & 24 deletions tasks/yui.js

This file was deleted.

0 comments on commit 9ba7a26

Please sign in to comment.