mirror of
https://github.com/openstf/stf
synced 2025-10-03 17:59:28 +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: {
|
||||
debug: false,
|
||||
files: {
|
||||
'tmp/html/all.html': ['views/**/*.jade']
|
||||
'tmp/html/all.html': ['res/app/**/*.jade']
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ module.exports = function (grunt) {
|
|||
nggettext_extract: {
|
||||
pot: {
|
||||
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: {
|
||||
all: {
|
||||
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())'
|
||||
, String
|
||||
, os.hostname())
|
||||
.option('-w, --resources-watch'
|
||||
.option('-dw, --disable-watch'
|
||||
, Boolean
|
||||
, process.env.RESOURCES_WATCH)
|
||||
, process.env.DISABLE_WATCH)
|
||||
.action(function() {
|
||||
var log = logger.createLogger('cli')
|
||||
, options = cliutil.lastArg(arguments)
|
||||
|
|
|
@ -35,10 +35,14 @@ module.exports = function(options) {
|
|||
io.set('log level', 1)
|
||||
io.set('browser client', false)
|
||||
|
||||
app.use(express.compress())
|
||||
|
||||
app.use('/static/lib', express.static(pathutil.resource('lib')))
|
||||
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.cookieSession({
|
||||
|
|
|
@ -3,10 +3,9 @@ var webpack = require('webpack')
|
|||
|
||||
var pathutil = require('../util/pathutil')
|
||||
|
||||
module.exports = webpackMiddleware(webpack({
|
||||
var webpackConfig = webpackMiddleware(webpack({
|
||||
cache: true,
|
||||
debug: true,
|
||||
// devtool: 'eval-source-map',
|
||||
devtool: 'eval',
|
||||
entry: pathutil.resource('app') + '/app.js',
|
||||
output: {
|
||||
|
@ -16,7 +15,7 @@ module.exports = webpackMiddleware(webpack({
|
|||
resolve: {
|
||||
modulesDirectories: [
|
||||
pathutil.resource('lib'),
|
||||
pathutil.resource('app') + '/components',
|
||||
pathutil.resource('app') + '/components',
|
||||
'web_modules',
|
||||
'./../../node_modules'
|
||||
],
|
||||
|
@ -44,9 +43,6 @@ module.exports = webpackMiddleware(webpack({
|
|||
new webpack.ResolverPlugin(
|
||||
new webpack.ResolverPlugin.DirectoryDescriptionFilePlugin('.bower.json', ['main'])
|
||||
)
|
||||
// new webpack.ProvidePlugin({
|
||||
// angular: 'angular'
|
||||
// })
|
||||
//new webpack.optimize.UglifyJsPlugin()
|
||||
]
|
||||
}), {
|
||||
|
@ -58,3 +54,5 @@ module.exports = webpackMiddleware(webpack({
|
|||
colors: true
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = webpackConfig
|
|
@ -1,8 +1,6 @@
|
|||
require('angular')
|
||||
require('angular-route')
|
||||
|
||||
require('./app-styles')
|
||||
|
||||
angular.module('app', [
|
||||
'ngRoute',
|
||||
require('./device-list').name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue