Skip to content

Commit

Permalink
produce optimized rjs blob
Browse files Browse the repository at this point in the history
  • Loading branch information
purge committed Oct 2, 2013
1 parent 84a03da commit b45f984
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
config.js
compiled/**/*.*
lib/
dist/
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ npm-debug.log
node_modules
src
test
compiled
13 changes: 12 additions & 1 deletion Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks('grunt-contrib-connect')
grunt.loadNpmTasks('grunt-contrib-copy')
grunt.loadNpmTasks('grunt-contrib-requirejs')
grunt.loadNpmTasks('grunt-karma')


grunt.initConfig

clean:
all:
src: [ "compiled/js", "compiled/tests" ]
src: [ "compiled", "dist" ]

connect:
publisher:
Expand Down Expand Up @@ -61,7 +62,17 @@ module.exports = (grunt) ->
files: ["src/**/*.coffee", "tests/**/*.coffee"]
tasks: ["build", "karma"]

requirejs:
compile:
options:
name: "sqwidget"
optimize: 'none'
baseUrl: "compiled/js",
mainConfigFile: "compiled/js/sqwidget.js",
out: "dist/sqwidget.js"

grunt.registerTask "build", [ "coffee" ]
grunt.registerTask "dist", [ "coffee", "requirejs" ]
grunt.registerTask "test", [ "clean", "build", "karma" ]
grunt.registerTask "default", [ "clean", "build", "connect", "watch" ]

11 changes: 0 additions & 11 deletions config-sample.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Adhip Gupta <[email protected]>",
"Simon Elliott <[email protected]>"
],
"main": "compiled/js/sqwidget.js",
"main": "dist/sqwidget.js",
"engines": {
"node": ">= 0.8.0"
},
Expand Down
1 change: 1 addition & 0 deletions src/sqwidget.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ requirejs.config
paths:
jquery: '../../lib/jquery/jquery'
underscore: '../../lib/underscore-amd/underscore'
backbone: '../../lib/backbone-amd/backbone'

# The module that is loaded first
requirejs [
Expand Down

0 comments on commit b45f984

Please sign in to comment.