Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
module.exports = (grunt) ->

require('load-grunt-tasks')(grunt)
grunt.initConfig(require("load-grunt-config") grunt,
configPath: "tasks/options"
)
grunt.initConfig require("load-grunt-config")(grunt)

grunt.task.registerTask 'test', ['buildtest', 'karma']
grunt.task.registerTask 'local', ['builddist', 'clean:local', 'concat:test', 'recess:bootstrap', 'connect']
Expand Down
19 changes: 19 additions & 0 deletions grunt/clean.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports =
build: [
'build'
'tests/build'
'coverage'
]
local: [
'build/app.js'
'build/deps.js'
'build/dsmcode.js'
'build/tmpl.js'
]
ci: [
'build/app.js'
'build/deps.js'
'build/dsmcode.js'
'build/localdata.js'
'build/tmpl.js'
]
14 changes: 14 additions & 0 deletions grunt/coffee.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports =
options:
bare: true
compile:
files:
'build/app.js': [
'src/*.coffee',
'src/**/*.coffee'
],
'build/localdata.js': 'local/fixture_data.coffee',
'tests/build/tests.js': [
'tests/helper.coffee',
'tests/*tests.coffee'
]
2 changes: 2 additions & 0 deletions grunt/coffeelint.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module.exports =
app: ["src/*.coffee"]
20 changes: 20 additions & 0 deletions grunt/concat.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports =
deps:
src: [
'bower_components/jquery/jquery.min.js'
'bower_components/handlebars/handlebars.js'
'bower_components/ember/ember.js'
'bower_components/ember-data-shim/ember-data.js'
'bower_components/bootstrap/js/bootstrap-collapse.js'
'bower_components/bootstrap/js/bootstrap-dropdown.js'
]
dest: 'build/deps.js'
dsmcode:
src: [
'build/app.js'
'build/tmpl.js'
]
dest: 'build/dsmcode.js'
test:
src: ['bower_components/jquery-mockjax/jquery.mockjax.js']
dest: 'build/test_deps.js'
6 changes: 6 additions & 0 deletions grunt/connect.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports =
server:
options:
port: 9000
base: '.'
keepalive: true
3 changes: 3 additions & 0 deletions grunt/coveralls.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports =
options:
coverage_dir: 'coverage'
8 changes: 8 additions & 0 deletions grunt/emberhandlebars.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports =
compile:
options:
templateName: (sourceFile) ->
newSource = sourceFile.replace 'src/templates/', ''
newSource.replace '.handlebars', ''
files: ['src/templates/*.handlebars']
dest: 'build/tmpl.js'
30 changes: 30 additions & 0 deletions grunt/karma.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports =
unit:
options:
basePath: '.'
frameworks: ['qunit']
files: [
"build/deps*"
"build/dsmcode*"
"build/test_deps*"
"tests/build/*.js"
]
port: 9876
runnerPort: 9100
colors: true
browsers: ['PhantomJS']
captureTimeout: 60000
singleRun: true
autoWatch: false
reporters: ['coverage', 'progress']
preprocessors:
"build/dsmcode*.js": "coverage"
coverageReporter:
type: "lcov"
dir: 'coverage/'
plugins: [
'karma-coverage'
'karma-qunit'
'karma-chrome-launcher'
'karma-phantomjs-launcher'
]
9 changes: 9 additions & 0 deletions grunt/recess.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports =
options:
compile: true
bootstrap:
src: [
'bower_components/bootstrap/less/bootstrap.less'
'bower_components/bootstrap/less/responsive.less'
]
dest: 'build/css/bootstrap-responsive.min.css'
7 changes: 7 additions & 0 deletions grunt/uglify.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports =
app:
src: ['build/dsmcode.js']
dest: 'build/dsmcode.min.js'
deps:
src: ['build/deps.js']
dest: 'build/deps.min.js'
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@
"version": "1.0.0",
"dependencies": {
"coffee-script": "*",
"bower": "~1.2.3",
"bower": "~1.2.7",
"grunt-cli": "*",
"grunt-recess": "*",
"grunt-contrib-connect": "*",
"grunt-contrib-concat": "*",
"grunt-contrib-coffee": "*",
"grunt-contrib-uglify": "*",
"grunt-contrib-clean": "*",
"grunt-ember-template-compiler": "1.0.6",
"load-grunt-tasks": "*",
"grunt-ember-template-compiler": "1.1.2",
"load-grunt-config": "*"
},
"devDependencies": {
Expand Down
20 changes: 0 additions & 20 deletions tasks/options/clean.js

This file was deleted.

18 changes: 0 additions & 18 deletions tasks/options/coffee.js

This file was deleted.

3 changes: 0 additions & 3 deletions tasks/options/coffeelint.js

This file was deleted.

26 changes: 0 additions & 26 deletions tasks/options/concat.js

This file was deleted.

9 changes: 0 additions & 9 deletions tasks/options/connect.js

This file was deleted.

5 changes: 0 additions & 5 deletions tasks/options/coveralls.js

This file was deleted.

14 changes: 0 additions & 14 deletions tasks/options/emberhandlebars.js

This file was deleted.

35 changes: 0 additions & 35 deletions tasks/options/karma.js

This file was deleted.

12 changes: 0 additions & 12 deletions tasks/options/recess.js

This file was deleted.

10 changes: 0 additions & 10 deletions tasks/options/uglify.js

This file was deleted.