Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/Webinate/blacktip into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
MKHenson committed Jul 23, 2016
2 parents 4c2df35 + 0ad4329 commit d941859
Show file tree
Hide file tree
Showing 13 changed files with 219 additions and 55 deletions.
24 changes: 19 additions & 5 deletions git-logs.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
var util = require('util')
/**
* ===============================
* This file is a heper file for
* generating change logs. Simply run
*
* node gitlogs.js
*
* This will create a a file called "changes.md" with a list of all changes
* from prevTag to nextTag. These tags *must* exist in your origin project (i.e. not just locally)
*/

// NB - UPDATE THESE TO THE TAGS
// ====================
var prevTag = "v0.1.1";
var nextTag = "v0.1.3";
// ====================


var util = require('util');
var fs = require('fs')
var exec = require('child_process').exec;
var child;

var prevTag = "v0.0.26";
var nextTag = "v0.1.1";


// Executes the git log command
child = exec('git log '+ prevTag +'...'+ nextTag +' --pretty=format:"{ \\"author\\" : \\"%an\\", \\"commit\\" : \\"%h\\", \\"date\\" : \\"%ar\\", \\"title\\" : \\"%s\\" },"', function (error, stdout, stderr) {

Expand Down
28 changes: 21 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var spritySass = require('sprity-sass');
var rimraf = require('rimraf');
var download = require('gulp-download');
var rename = require('gulp-rename');
var cleanCss = require('gulp-clean-css');

// CONFIG
// ==============================
Expand Down Expand Up @@ -46,6 +47,7 @@ var thirdPartyFiles = [
'./third-party/angular-animate/angular-animate.js',
'./third-party/angular-loading-bar/build/loading-bar.js',
'./third-party/angular-loading-bar/build/loading-bar.css',
'./third-party/modepress-client/dist/plugin.js',
'./third-party/jssor-slider/js/jssor.slider.mini.js'
];

Expand All @@ -66,11 +68,20 @@ gulp.task('check-files', function(){
gulp.task('sass', ['sprites'], function() {

// Compile all sass files into temp/css
var sassFiles = gulp.src('./src/style.scss', { base: "./src" })
return gulp.src('./src/style.scss', { base: "./src" })
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(outDir + '/css'))
})

gulp.task('sass-release', ['sprites'], function() {

// Compile all sass files into temp/css
return gulp.src('./src/style.scss', { base: "./src" })
.pipe(sass().on('error', sass.logError))
.pipe(cleanCss())
.pipe(gulp.dest(outDir + '/css'))
})

/**
* Generate dist/media/sprites/sprite.png and /src/temp/sprite.scss
*/
Expand Down Expand Up @@ -208,6 +219,7 @@ gulp.task('install-third-parties', function () {
downloadTarball("https://github.com/angular-ui/ui-router/tarball/0.2.18", './third-party/angular-ui-router'),
downloadTarball("https://github.com/jquery/jquery/tarball/2.2.2", './third-party/jquery'),
downloadTarball("https://github.com/chieffancypants/angular-loading-bar/tarball/0.9.0", './third-party/angular-loading-bar'),
downloadTarball("https://github.com/Webinate/modepress-client-angular/tarball/master", './third-party/modepress-client'),
downloadTarball("https://github.com/jssor/slider/tarball/20.0.0", './third-party/jssor-slider'),
]);
});
Expand Down Expand Up @@ -236,8 +248,9 @@ function getDefinition(url, dest, name) {
*/
gulp.task('install-definitions', function () {
return Promise.all([
getDefinition("https://raw.githubusercontent.com/MKHenson/users/dev/src/definitions/custom/definitions.d.ts", "src/definitions/required/", "users.d.ts"),
getDefinition("https://raw.githubusercontent.com/MKHenson/modepress/dev/server/src/definitions/custom/modepress-api.d.ts", "src/definitions/required/", "modepress-api.d.ts")
getDefinition("https://raw.githubusercontent.com/Webinate/users/dev/src/definitions/custom/definitions.d.ts", "src/definitions/required/", "users.d.ts"),
getDefinition("https://raw.githubusercontent.com/Webinate/modepress/dev/server/src/definitions/custom/modepress-api.d.ts", "src/definitions/required/", "modepress-api.d.ts"),
getDefinition("https://raw.githubusercontent.com/Webinate/modepress-client-angular/master/src/definitions/generated/plugin.d.ts", "src/definitions/required/", "modepress-client.d.ts")
]);
});

Expand All @@ -246,7 +259,7 @@ gulp.task('install-definitions', function () {
*/
gulp.task('deploy-third-party', function() {

var sources = gulp.src( thirdPartyFiles, { base: "third-party" } )
return gulp.src( thirdPartyFiles, { base: "third-party" } )
.pipe(gulp.dest(outDir + "/third-party"));
});

Expand All @@ -258,12 +271,13 @@ gulp.task('deploy-third-party-release', function() {
const jsFilter = filter('**/*.js', {restore: true});
const cssFilter = filter('**/*.css', {restore: true});

var sources = gulp.src( thirdPartyFiles, { base: "third-party" } )
return gulp.src( thirdPartyFiles, { base: "third-party" } )
.pipe(jsFilter)
.pipe(concat("third-party.min.js"))
.pipe(uglify())
.pipe(jsFilter.restore)
.pipe(cssFilter)
.pipe(cleanCss())
.pipe(concat("third-party.min.css"))
.pipe(cssFilter.restore)
.pipe(gulp.dest(outDir + "/third-party"));
Expand All @@ -273,7 +287,7 @@ gulp.task('deploy-third-party-release', function() {
* Builds the definition
*/
gulp.task('html-to-ng', function() {
gulp.src("./src/**/*.html")
return gulp.src("./src/**/*.html")
.pipe(minifyHtml({
empty: true,
spare: true,
Expand All @@ -290,4 +304,4 @@ gulp.task('html-to-ng', function() {

gulp.task('install', [ 'install-definitions', 'install-third-parties']);
gulp.task('build-all', [ 'deploy-third-party', 'html-to-ng', 'copy-index', 'sass', 'ts-code']);
gulp.task('build-all-release', [ 'deploy-third-party-release', 'html-to-ng', 'copy-index-release', 'sass', 'ts-code-release']);
gulp.task('build-all-release', [ 'deploy-third-party-release', 'html-to-ng', 'copy-index-release', 'sass-release', 'ts-code-release']);
8 changes: 4 additions & 4 deletions install-script-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ set -e
echo "Downloading latest version from github dev"

#download latest
wget https://github.com/MKHenson/webinate-blacktip/archive/dev.zip
wget https://github.com/Webinate/blacktip/archive/dev.zip
unzip -o "dev.zip"


# Moves the server folder to the current directory
cp -r webinate-blacktip-dev/* ./
cp -r blacktip-dev/* ./

# Remove modepress temp folder
if [ -d "webinate-blacktip-dev" ]; then
rm webinate-blacktip-dev -R
if [ -d "blacktip-dev" ]; then
rm blacktip-dev -R
fi

# Remove the zip file
Expand Down
10 changes: 5 additions & 5 deletions install-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@ set -e

# Functiom that prints the latest stable version
version() {
echo "0.1.1"
echo "0.1.3"
}

echo "Downloading latest version from github $(version)"

#download latest
wget https://github.com/MKHenson/webinate-blacktip/archive/v$(version).zip
wget https://github.com/Webinate/blacktip/archive/v$(version).zip
unzip -o "v$(version).zip"

# Moves the server folder to the current directory
cp -r webinate-blacktip-$(version)/* ./
cp -r blacktip-$(version)/* ./

# Remove temp folder
if [ -d "webinate-blacktip-$(version)" ]; then
rm webinate-blacktip-$(version) -R
if [ -d "blacktip-$(version)" ]; then
rm blacktip-$(version) -R
fi

# Remove the zip file
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webinate-blacktip",
"version": "0.1.1",
"version": "0.1.2",
"description": "A tempate for the Webinate 2015 website",
"main": "gulpfile.js",
"author": "Mathew Henson",
Expand All @@ -19,6 +19,7 @@
"gulp-ng-html2js": "^0.2.2",
"gulp-minify-html": "^1.0.6",
"gulp-uglify": "^1.5.4",
"gulp-clean-css" : "^2.0.11",
"sprity": "^1.0.8",
"gulp-if": "^2.0.1",
"gulp-sass": "^2.3.2",
Expand Down
17 changes: 10 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Webinate Blacktip
Webinate 'Blacktip' is a codename of the theme designed for the webinate 2015 site.
Blacktip is built in Angular and relies on [ModePress](https://github.com/MKHenson/modepress)
# Blacktip
'Blacktip' is a codename of the theme designed for the webinate 2015 site.
Blacktip is built in Angular and relies on Webinate's [ModePress](https://github.com/Webinate/modepress)
to provide some its backend content.

## Current stable version
* Version v0.1.1
* Version v0.1.3

## Requirements
* MongoDB v3.*
Expand Down Expand Up @@ -34,13 +34,13 @@ sudo su
If you want the latest stable version:

```
curl -o- https://raw.githubusercontent.com/MKHenson/webinate-blacktip/master/install-script.sh | bash
curl -o- https://raw.githubusercontent.com/Webinate/blacktip/master/install-script.sh | bash
```

OR if you want the dev build

```
curl -o- https://raw.githubusercontent.com/MKHenson/webinate-blacktip/dev/install-script-dev.sh | bash
curl -o- https://raw.githubusercontent.com/Webinate/blacktip/dev/install-script-dev.sh | bash
```

5) Install the build dependencies
Expand All @@ -54,6 +54,7 @@ gulp install
gulp build-all
```

<<<<<<< HEAD
Note: To build a release version, replace the build-all with build-all-release

```
Expand All @@ -62,6 +63,8 @@ gulp build-all-release
```
The release version is a lot smaller.

=======
>>>>>>> 0ad432979e7438995d9f706d61b067ba833a8c7e
Once this is complete, the built project will reside in the dist folder

7) (Optional) Add the "dist" folder as a new target for Modepress
Expand Down Expand Up @@ -99,4 +102,4 @@ Blacktip makes use of the following third party libraries
* [AngularJS](https://angularjs.org/)
* [Angular UI Router](https://github.com/angular-ui/ui-router)
* [JSSOR Slider](http://www.jssor.com/)
* [Google Maps](https://developers.google.com/maps/)
* [Google Maps](https://developers.google.com/maps/)
1 change: 1 addition & 0 deletions src/_references.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@
/// <reference path="./definitions/required/users.d.ts" />
/// <reference path="./definitions/required/modepress-api.d.ts" />
/// <reference path="./definitions/required/google.maps.d.ts" />
/// <reference path="./definitions/required/modepress-client.d.ts" />
/// <reference path="./definitions/custom/jssor.d.ts" />
5 changes: 2 additions & 3 deletions src/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ module blacktip
{
'use strict';



angular.module("blacktip", ["ui.router", 'ngSanitize', 'angular-loading-bar', "admin-templates"])
angular.module("blacktip", ["ui.router", 'ngSanitize', 'angular-loading-bar', "admin-templates", "modepress-client"])
.value('apiUrl', '.')
.factory("signaller", function ()
{
return function ()
Expand Down
37 changes: 17 additions & 20 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,31 @@

// Prior to the blog state loading, make sure the categories are downloaded
stateProvider.state("blog", {
url: "/blog", templateUrl: "templates/blog.html", controller: "blogCtrl", controllerAs: "controller", abstract: true,
url: "/blog",
templateUrl: "templates/blog.html",
controller: "blogCtrl",
controllerAs: "controller",
abstract: true,
resolve: {
categories: ["$http", "apiURL", function ($http: ng.IHttpService, apiURL: string)
{
return $http.get<Modepress.IGetCategories>(`${apiURL}/categories`).then(function (categories)
{
return categories.data.data;
});
categories: ["categories", function (categories: ModepressClientPlugin.CategoryService) {
return categories.all();
}]
}
});

stateProvider.state("blog.posts", { url: "?author&category&tag&index", templateUrl: "templates/blog-posts.html", controller: "blogSubCtrl", controllerAs: "subController" });
stateProvider.state("blog.posts", {
url: "?author&category&tag&index",
templateUrl: "templates/blog-posts.html",
controller: "blogSubCtrl",
controllerAs: "subController"
});

// Download the post prior to loading this state
// then assign the post to the scope
stateProvider.state("post", {
url: "/post/:slug", templateUrl: "templates/post.html",
url: "/post/:slug",
templateUrl: "templates/post.html",
resolve: {
post: ["$http", "apiURL", "$stateParams", function ($http: ng.IHttpService, apiURL: string, stateParams)
{
return $http.get<Modepress.IGetPost>(`${apiURL}/posts/slug/${stateParams.slug}`).then(function (posts)
{
if (posts.data.error)
return posts.data;

return posts.data.data;
});
post: ["$stateParams", "posts", function ( stateParams, posts : ModepressClientPlugin.PostService ) {
return posts.bySlug(stateParams.slug);
}]
},
controller: "postCtrl"
Expand Down
4 changes: 2 additions & 2 deletions src/controllers/blog-ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/**
* Creates an instance of the home controller
*/
constructor(http: ng.IHttpService, apiURL: string, stateParams: any, categories: Array<Modepress.ICategory>, signaller: Function, meta: Meta)
constructor(http: ng.IHttpService, apiURL: string, stateParams: any, categories: Modepress.IGetCategories, signaller: Function, meta: Meta)
{
this.http = http;
this.posts = [];
Expand All @@ -41,7 +41,7 @@
this.author = stateParams.author || "";
this.category = stateParams.category || "";
this.tag = stateParams.tag || "";
this.categories = categories;
this.categories = categories.data;

meta.defaults();
meta.description = "Webinate app and mobile apps development blog - here you will find up to date information on what's happening at the webinate studio";
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/post-ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* Creates an instance of the home controller
*/
constructor(scope: any, post: Modepress.IPost, sce: ng.ISCEService, signaller: Function, meta: Meta)
constructor(scope: any, post: Modepress.IPost, sce: ng.ISCEService, signaller: Function, meta: Meta )
{
meta.title = post.title;
meta.bigImage = (post.featuredImage && post.featuredImage != "" ? post.featuredImage : "");
Expand Down
Loading

0 comments on commit d941859

Please sign in to comment.