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:
parent
3cdb0c7c1a
commit
eae8062252
6 changed files with 39 additions and 5 deletions
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
4
res/app/components/stf/common/nothing-to-show/index.js
Normal file
4
res/app/components/stf/common/nothing-to-show/index.js
Normal 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'))
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
.nothing-to-show {
|
||||
color: #b7b7b7;
|
||||
min-height: 130px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.nothing-to-show p {
|
||||
font-size: 20px;
|
||||
}
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue