mirror of
https://github.com/openstf/stf
synced 2025-10-04 02:09:32 +02:00
Improved layout.
This commit is contained in:
parent
52b185e653
commit
6186c1cc87
6 changed files with 14 additions and 14 deletions
|
@ -9,7 +9,7 @@ module.exports = function (grunt) {
|
||||||
data: {
|
data: {
|
||||||
debug: false,
|
debug: false,
|
||||||
files: {
|
files: {
|
||||||
'tmp/html/all.html': ['views/**/*.jade']
|
'tmp/html/all.html': ['res/app/**/*.jade']
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ module.exports = function (grunt) {
|
||||||
nggettext_extract: {
|
nggettext_extract: {
|
||||||
pot: {
|
pot: {
|
||||||
files: {
|
files: {
|
||||||
'lang/po/template.pot': ['tmp/html/all.html', 'public/js/controllers/**/*.js']
|
'res/lang/po/template.pot': ['tmp/html/all.html', 'res/app/**/*.js']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -28,7 +28,7 @@ module.exports = function (grunt) {
|
||||||
nggettext_compile: {
|
nggettext_compile: {
|
||||||
all: {
|
all: {
|
||||||
files: {
|
files: {
|
||||||
'public/js/lang/translations.js': ['lang/po/*.po']
|
'res/lang/translations.js': ['res/lang/po/*.po']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -445,9 +445,9 @@ program
|
||||||
, 'provider name (or os.hostname())'
|
, 'provider name (or os.hostname())'
|
||||||
, String
|
, String
|
||||||
, os.hostname())
|
, os.hostname())
|
||||||
.option('-w, --resources-watch'
|
.option('-dw, --disable-watch'
|
||||||
, Boolean
|
, Boolean
|
||||||
, process.env.RESOURCES_WATCH)
|
, process.env.DISABLE_WATCH)
|
||||||
.action(function() {
|
.action(function() {
|
||||||
var log = logger.createLogger('cli')
|
var log = logger.createLogger('cli')
|
||||||
, options = cliutil.lastArg(arguments)
|
, options = cliutil.lastArg(arguments)
|
||||||
|
|
|
@ -35,10 +35,14 @@ module.exports = function(options) {
|
||||||
io.set('log level', 1)
|
io.set('log level', 1)
|
||||||
io.set('browser client', false)
|
io.set('browser client', false)
|
||||||
|
|
||||||
|
app.use(express.compress())
|
||||||
|
|
||||||
app.use('/static/lib', express.static(pathutil.resource('lib')))
|
app.use('/static/lib', express.static(pathutil.resource('lib')))
|
||||||
app.use('/static', express.static(pathutil.resource('app')))
|
app.use('/static', express.static(pathutil.resource('app')))
|
||||||
|
|
||||||
app.use(require('./webpack-config'))
|
if (!options.disableWatch) {
|
||||||
|
app.use(require('./webpack-config'))
|
||||||
|
}
|
||||||
|
|
||||||
app.use(express.cookieParser(options.secret))
|
app.use(express.cookieParser(options.secret))
|
||||||
app.use(express.cookieSession({
|
app.use(express.cookieSession({
|
||||||
|
|
|
@ -3,10 +3,9 @@ var webpack = require('webpack')
|
||||||
|
|
||||||
var pathutil = require('../util/pathutil')
|
var pathutil = require('../util/pathutil')
|
||||||
|
|
||||||
module.exports = webpackMiddleware(webpack({
|
var webpackConfig = webpackMiddleware(webpack({
|
||||||
cache: true,
|
cache: true,
|
||||||
debug: true,
|
debug: true,
|
||||||
// devtool: 'eval-source-map',
|
|
||||||
devtool: 'eval',
|
devtool: 'eval',
|
||||||
entry: pathutil.resource('app') + '/app.js',
|
entry: pathutil.resource('app') + '/app.js',
|
||||||
output: {
|
output: {
|
||||||
|
@ -16,7 +15,7 @@ module.exports = webpackMiddleware(webpack({
|
||||||
resolve: {
|
resolve: {
|
||||||
modulesDirectories: [
|
modulesDirectories: [
|
||||||
pathutil.resource('lib'),
|
pathutil.resource('lib'),
|
||||||
pathutil.resource('app') + '/components',
|
pathutil.resource('app') + '/components',
|
||||||
'web_modules',
|
'web_modules',
|
||||||
'./../../node_modules'
|
'./../../node_modules'
|
||||||
],
|
],
|
||||||
|
@ -44,9 +43,6 @@ module.exports = webpackMiddleware(webpack({
|
||||||
new webpack.ResolverPlugin(
|
new webpack.ResolverPlugin(
|
||||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin('.bower.json', ['main'])
|
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin('.bower.json', ['main'])
|
||||||
)
|
)
|
||||||
// new webpack.ProvidePlugin({
|
|
||||||
// angular: 'angular'
|
|
||||||
// })
|
|
||||||
//new webpack.optimize.UglifyJsPlugin()
|
//new webpack.optimize.UglifyJsPlugin()
|
||||||
]
|
]
|
||||||
}), {
|
}), {
|
||||||
|
@ -58,3 +54,5 @@ module.exports = webpackMiddleware(webpack({
|
||||||
colors: true
|
colors: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
module.exports = webpackConfig
|
|
@ -1,8 +1,6 @@
|
||||||
require('angular')
|
require('angular')
|
||||||
require('angular-route')
|
require('angular-route')
|
||||||
|
|
||||||
require('./app-styles')
|
|
||||||
|
|
||||||
angular.module('app', [
|
angular.module('app', [
|
||||||
'ngRoute',
|
'ngRoute',
|
||||||
require('./device-list').name,
|
require('./device-list').name,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue