Remove bower dependencies.

Setup karma to work with browserify setup.
This commit is contained in:
Dorian 2015-05-08 17:15:13 -04:00
parent 14f74ffe82
commit d8ee2a2d91
7 changed files with 43 additions and 11 deletions

1
.gitignore vendored
View File

@ -10,7 +10,6 @@ rookeries/static/.webassets-cache/
rookeries/static/css/*.css
rookeries/static/scripts/*.js
rookeries/static/scripts/*.js.map
rookeries/static/scripts/vendor/
rookeries_webapp/
rookeries-*.tar.bz2

View File

@ -7,11 +7,22 @@
"coffee-script": "1.9.2",
"less": "1.7.5",
"react": "0.13.2",
"coffee-reactify": "3.0.0"
"coffee-reactify": "3.0.0",
"font-awesome": "4.3.0",
"angular": "1.3.1",
"angular-bootstrap": "0.12.0",
"angular-ui-router": "~0.2.12",
"angular-md": "1.0.0",
"bootstrap": "3.2.0",
"react-bootstrap": "0.21.2",
"highlight.js": "8.3.0",
"marked": "0.3.3"
},
"devDependencies": {
"angular-mocks": "1.3.1",
"chai": "1.9.2",
"karma": "0.12.24",
"karma-browserify": "4.1.2",
"karma-chai": "0.1.0",
"karma-phantomjs-launcher": "0.1.4",
"karma-mocha": "0.1.9",

View File

@ -5,10 +5,14 @@
* @license AGPL v3
* @author Dorian Pula [dorian.pula@amber-penguin-software.ca]
###
angular = require('angular')
hljs = require('highlight.js')
'use strict'
rookeries_app = angular.module 'rookeriesApp', [
'hc.marked'
'yaru22.md'
'ui.bootstrap'
'ui.router'
]
@ -35,3 +39,5 @@ rookeries_app.config ['markedProvider', (markedProvider) ->
]
# TODO Add logging to rookeries app
module.export = rookeries_app

View File

@ -6,6 +6,8 @@
* @author Dorian Pula [dorian.pula@amber-penguin-software.ca]
###
rookeries_app = require('../app.coffee')
###*
* Controller for switching between predefined themes.
* Based off : http://stackoverflow.com/questions/16514330/angularjs-switch-stylesheets-based-on-user-input

View File

@ -6,6 +6,8 @@
* @author Dorian Pula [dorian.pula@amber-penguin-software.ca]
###
rookeries_app = require('../app.coffee')
rookeries_app.controller 'UserLoginController', [
'$scope', '$modal', '$log'
($scope, $modal, $log) ->

View File

@ -6,6 +6,8 @@
* @author Dorian Pula [dorian.pula@amber-penguin-software.ca]
###
rookeries_app = require('../app.coffee')
###*
* Controller for switching between predefined themes.
* Based off : http://stackoverflow.com/questions/16514330/angularjs-switch-stylesheets-based-on-user-input

View File

@ -10,17 +10,19 @@ module.exports = (config) ->
# frameworks to use
# available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai']
frameworks: ['browserify', 'mocha', 'chai']
# list of files / patterns to load in the browser
files: [
'rookeries/static/scripts/vendor/angular/angular.js',
'rookeries/static/scripts/vendor/angular-bootstrap/ui-bootstrap-tpls.js',
'rookeries/static/scripts/vendor/angular-mocks/angular-mocks.js',
'rookeries/static/scripts/vendor/angular-marked/angular-marked.js',
'rookeries/static/scripts/vendor/angular-ui-router/release/angular-ui-router.js',
'node_modules/angular/angular.js',
'node_modules/angular-bootstrap/dist/ui-bootstrap-tpls.js',
'node_modules/angular-mocks/angular-mocks.js',
'node_modules/angular-md/dist/angular-md.js',
'node_modules/angular-ui-router/release/angular-ui-router.js',
'node_modules/react/dist/react.js',
'rookeries/static/scripts/rookeries/**/*.coffee',
'rookeries/static/scripts/rookeries/**/*.cjsx',
'tests/client/unit/**/*.coffee'
]
@ -33,7 +35,15 @@ module.exports = (config) ->
# preprocess matching files before serving them to the browser
# available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'**/*.coffee': ['coffee']
'tests/**/*.coffee': ['browserify'],
'rookeries/static/**/*.coffee': ['browserify'],
'rookeries/static/**/*.cjsx': ['browserify'],
}
browserify: {
debug: true,
transform: ['coffee-reactify']
extensions: ['.js', '.jsx', '.coffee', '.cjsx']
}
@ -67,7 +77,7 @@ module.exports = (config) ->
# start these browsers
# available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS']
browsers: ['PhantomJS', 'Chrome']
# Continuous Integration mode