Skip to content

Commit

Permalink
Updates to package.json and karma.config
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Padget committed Jun 20, 2017
1 parent 7bb2d65 commit 25e08e0
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 7 deletions.
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
node_modules
build/
.env
.babelrc

# Created by https://www.gitignore.io/api/osx,linux,node,vim

### OSX ###
Expand Down Expand Up @@ -63,9 +68,3 @@ Session.vim

# auto-generated tag files
tags

# dotenv
.env

# build files
build/
32 changes: 32 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
'use strict';

const webpack = require('./webpack.config.js');
delete webpack.entry;

module.exports = function(config) {
config.set({
webpack,
basePath: '',
frameworks: ['mocha'],
files: [
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'app/entry.js',
'test/**/*-test.js',
],
exclude: [
],
preprocessors: {
'app/entry.js': ['webpack'],
'test/**/*-test.js': ['webpack'],
},
reporters: ['mocha'],
port: 9876,
colors: true,
logLevel: config.LOG_DISABLE,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
concurrency: Infinity,
});
};
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
"test": "test"
},
"scripts": {
"start": "node server.js",
"heroku-postbuild": "webpack",
"build-watch": "webpack-dev-server --inline --hot",
"test": "karma",
"start": "node server.js"
"test-watch": "karma start --auto-watch"
},
"repository": {
"type": "git",
Expand Down
9 changes: 9 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

const express = require('express');
const app = express();
const PORT = process.env.PORT || 8080;

app.use(express.static(`${__dirname}/build`));

app.listen(PORT, () => console.log('server up:', PORT));

0 comments on commit 25e08e0

Please sign in to comment.