+++ /dev/null
-module.exports = function() {
- var main = './src/showcase/';
- var config = {
- main: main,
- index: main + 'index.html',
- port: 9000,
- script: './server.js',
- directory: './server/'
- };
-
- return config;
-};
'use strict';
var currentDir = process.cwd();
+var $ = {
+ path: require('path')
+};
+var pkg = require($.path.join(process.cwd(), 'package.json'));
var express = require('express');
var proxy = require('express-http-proxy');
var app = express();
default:
console.log('development mode');
- app.use(express.static(currentDir + '/src/showcase/'));
+ app.use(express.static(currentDir + '/src/' + pkg.name + '/'));
app.use(express.static(currentDir + '/'));
// Deep linking (exclude XHR requests)
- app.use('/((?!api)).*', express.static(currentDir + '/src/showcase/index.html'));
+ app.use('/((?!api)).*', express.static(currentDir + '/src/' + pkg.name + '/index.html'));
break;
}
module.exports = function() {
- var main = './src/showcase/';
+ var $ = {
+ path: require('path')
+ };
+ var pkg = require($.path.join(process.cwd(), 'package.json'));
+ var main = './src/' + pkg.name + '/';
var app = main + 'app/';
var bower = {
json: require(process.cwd() + '/bower.json'),
directory: process.cwd() + '/bower_components/',
ignorePath: '../..'
};
- var $ = {
- path: require('path')
- };
return {
main: main,