1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00

Adding nothing to show.

Exporting webpack options.
This commit is contained in:
Gunther Brunner 2014-02-19 22:51:40 +09:00
parent 3cdb0c7c1a
commit eae8062252
6 changed files with 39 additions and 5 deletions

View file

@ -38,7 +38,7 @@ module.exports = function(options) {
app.use('/static', express.static(pathutil.resource('app')))
if (!options.disableWatch) {
app.use(require('./webpack-config'))
app.use(require('./webpack-config').middleware)
}
app.use(express.cookieParser(options.secret))

View file

@ -3,7 +3,7 @@ var webpack = require('webpack')
var pathutil = require('../util/pathutil')
var webpackConfig = webpackMiddleware(webpack({
var webpackOptions = {
cache: true,
debug: true,
devtool: 'eval',
@ -28,12 +28,13 @@ var webpackConfig = webpackMiddleware(webpack({
loaders: [
{ test: /\.css$/, loader: 'style!css' },
{ test: /\.jade/, loader: 'template-html-loader' },
{ test: /\.html/, loader: 'html-loader' },
{ test: /angular\.js/, loader: 'exports?angular'},
{ test: /angular-route\.js/, loader: 'imports?angular=angular'},
{ test: /oboe-browser\.js/, loader: 'imports?define=>false!exports?oboe'}
],
noParse: [
// pathutil.resource('lib')
// pathutil.resource('lib')
]
},
plugins: [
@ -45,7 +46,9 @@ var webpackConfig = webpackMiddleware(webpack({
)
//new webpack.optimize.UglifyJsPlugin({mangle: false})
]
}), {
}
module.exports.middleware = webpackMiddleware(webpack(webpackOptions), {
noInfo: false,
quiet: false,
lazy: false,
@ -55,4 +58,4 @@ var webpackConfig = webpackMiddleware(webpack({
}
})
module.exports = webpackConfig
module.exports.options = webpackOptions

View file

@ -0,0 +1,4 @@
require('./nothing-to-show.css')
module.exports = angular.module('stf/common/nothing-to-show', [])
.directive('nothingToShow', require('./nothing-to-show-directive'))

View file

@ -0,0 +1,14 @@
module.exports = function () {
return {
restrict: 'EA',
scope: {
icon: '@',
message: '@'
},
template: require('./nothing-to-show.html'),
link: function (scope, element, attrs) {
scope.icon = attrs.icon;
scope.message = attrs.message;
}
}
}

View file

@ -0,0 +1,9 @@
.nothing-to-show {
color: #b7b7b7;
min-height: 130px;
text-align: center;
}
.nothing-to-show p {
font-size: 20px;
}

View file

@ -0,0 +1,4 @@
<div class="nothing-to-show vertical-center">
<i class="fa fa-4x" ng-class="icon"></i>
<p ng-bind="message"></p>
</div>