Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is almost based on [Keep a Changelog](https://keepachangelog.com/en/1

## [16.x.x]
### Changed
- Added vue and ng-vue packages
### Fixed

## [15.x.x]
Expand Down
3 changes: 2 additions & 1 deletion js/app/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ $('#content.app-news')
.attr('ng-controller', 'AppController as App');

/* jshint unused: false */
var app = angular.module('News', ['ngRoute', 'ngSanitize', 'ngAnimate']);
var app = angular.module('News', ['ngRoute', 'ngSanitize', 'ngAnimate', 'ngVue']);

3 changes: 3 additions & 0 deletions js/app/VueComponents.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
var IconLinkCompact = require('../vue_components/IconLinkCompact.vue').default;
var iconLinkCompactComponent = Vue.component('IconLinkCompact', IconLinkCompact);
app.value('IconLinkCompact', iconLinkCompactComponent);
2 changes: 2 additions & 0 deletions js/controller/AppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ app.controller('AppController', function (Loading, FeedResource, FolderResource)
this.play = function (item) {
this.playingItem = item;
};

this.t = window.t;
});
20 changes: 15 additions & 5 deletions js/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ const gulp = require('gulp'),
jshint = require('gulp-jshint'),
KarmaServer = require('karma').Server,
concat = require('gulp-concat'),
sourcemaps = require('gulp-sourcemaps');
sourcemaps = require('gulp-sourcemaps'),
webpackStream = require('webpack-stream'),
webpackConfig = require('./webpack.config.js');

// Configuration
const buildTarget = 'app.min.js';
Expand All @@ -30,6 +32,8 @@ const sources = [
'node_modules/angular-sanitize/angular-sanitize.min.js',
'node_modules/moment/min/moment-with-locales.min.js',
'node_modules/masonry-layout/dist/masonry.pkgd.min.js',
'node_modules/vue/dist/vue.js',
'node_modules/ngVue/build/index.js',
'app/App.js', 'app/Config.js', 'app/Run.js',
'controller/**/*.js',
'filter/**/*.js',
Expand All @@ -40,8 +44,10 @@ const sources = [
'directive/**/*.js'
];
const testSources = ['tests/**/*.js'];
const watchSources = sources.concat(testSources).concat(['*.js']);
const lintSources = watchSources;
const watchSources = sources.concat(testSources);
const lintSources = watchSources.filter((item) => {
return item !== 'webpack.config.js';
});

// tasks
gulp.task('lint', () => {
Expand All @@ -51,8 +57,12 @@ gulp.task('lint', () => {
.pipe(jshint.reporter('fail'));
});

gulp.task('default', gulp.series('lint', () => {
return gulp.src(sources)
gulp.task('webpack', () => {
return webpackStream(webpackConfig)
.pipe(gulp.dest('./webpacked'));
});
gulp.task('default', gulp.series('lint', 'webpack', () => {
return gulp.src(sources.concat(['webpacked/webpacked_vue_components.js']))
.pipe(ngAnnotate())
.pipe(sourcemaps.init())
.pipe(concat(buildTarget))
Expand Down
Loading