Skip to content

Commit

Permalink
Updated modepress URI's to match users v0.2.0. Closes issue #8
Browse files Browse the repository at this point in the history
  • Loading branch information
MKHenson committed Apr 13, 2016
1 parent df9d725 commit a745842
Show file tree
Hide file tree
Showing 19 changed files with 183 additions and 162 deletions.
32 changes: 31 additions & 1 deletion admin/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ var sprity = require('sprity');
var sass = require('gulp-sass');
var spritySass = require('sprity-sass');
var rimraf = require('rimraf');
var download = require('gulp-download');
var rename = require("gulp-rename");


// CONFIG
Expand Down Expand Up @@ -69,7 +71,7 @@ gulp.task('sprites', function () {
/**
* Builds each of the ts files into JS files in the output folder
*/
gulp.task('ts-code', function() {
gulp.task('ts-code', ['check-files'], function() {

return gulp.src(tsFiles, { base: "." })
.pipe(ts({
Expand Down Expand Up @@ -117,6 +119,34 @@ function deleteFolderRecursive(path) {
}
};

/**
* This function downloads a definition file from github and writes it to a destination
* @param {string} url The url of the file to download
* @param {string} dest The destination folder to move the file to
*/
function getDefinition(url, dest, name) {
return new Promise(function(resolve, reject) {
download(url)
.pipe(rename(name))
.pipe(gulp.dest(dest))
.on('error', function(err) {
throw(err)
})
.on('end', function() {
resolve(true);
})
});
}

/**
* Downloads the definition files used in the development of the application and moves them into the definitions folder
*/
gulp.task('install-definitions', function () {
return Promise.all([
getDefinition("https://raw.githubusercontent.com/MKHenson/users/dev/dist/definitions/definitions.d.ts", "lib/definitions/required/", "webinate-users.d.ts")
]);
});

/**
* Downloads a tarbal from a given url and unzips it into a specified folder
* @param {string} url The URL of the tarball to download
Expand Down
2 changes: 0 additions & 2 deletions admin/lib/application.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
declare var _users: string;
declare var _media: string;
declare var _cache: string;
declare var _plugins: Array<ModepressAdmin.IAdminPlugin>;

Expand All @@ -12,7 +11,6 @@ module clientAdmin

var appModule = angular.module("admin", ["ui.router", "ngAnimate", "ngSanitize", 'angular-loading-bar', 'ngFileUpload', 'admin-templates'])
.constant("usersURL", _users )
.constant("mediaURL", _media )
.constant("apiURL", "./api")
.constant("cacheURL", _cache)
.constant("capthaPublicKey", "6LdiW-USAAAAAGxGfZnQEPP2gDW2NLZ3kSMu3EtT")
Expand Down
Loading

0 comments on commit a745842

Please sign in to comment.