Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/optimize #104

Merged
merged 49 commits into from
Nov 14, 2013
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3c1c317
cram build
purge Oct 30, 2013
2d3c51c
minify + add version from bower
purge Oct 30, 2013
d0b5841
splat with curl
purge Oct 30, 2013
af0efc6
clean
purge Oct 30, 2013
78dc45a
include plugin
purge Oct 30, 2013
eb91f45
move to lodash + cdns
purge Oct 31, 2013
fdcc6ca
cram is included for now due to npm issues
purge Oct 31, 2013
2dceac6
move to bean
purge Oct 31, 2013
fbe28a0
build fixes
purge Nov 2, 2013
3a396b4
* use require instead of curl due to path bugs.
purge Nov 5, 2013
bf211b3
update scaffold
purge Nov 5, 2013
f25c8a7
fixes
purge Nov 6, 2013
e158d7a
pass config
purge Nov 7, 2013
e6eed0e
nest options + add class back
purge Nov 7, 2013
b2124a7
data attrs are converted to camel case../..
purge Nov 7, 2013
fdc2d48
remove console
purge Nov 7, 2013
bc3c376
documentation
purge Nov 7, 2013
ab3619f
Merge pull request #103 from premasagar/feature/nest-options
adhipg Nov 7, 2013
1e13c70
don't always require curl promise
purge Nov 8, 2013
31bbf0e
remove cram
purge Nov 11, 2013
ff4b577
install stage
purge Nov 11, 2013
2e4be2a
tests working again + new optimization stage
purge Nov 11, 2013
02520b7
namespace rjs + don't use almond(no remote support) + working index
purge Nov 11, 2013
8553cce
bower publish task
purge Nov 11, 2013
7f8818c
fix config
purge Nov 11, 2013
1bac5b3
preserve licences
purge Nov 11, 2013
40252e8
promise test
purge Nov 11, 2013
aa2ea7d
ensure its actually deferred
purge Nov 11, 2013
4087373
add async
purge Nov 11, 2013
231b433
wrapper should only attach to window
purge Nov 12, 2013
1f58634
watcher
purge Nov 12, 2013
87505b2
allow plugin config to be received from bundles, and force sqwidget b…
purge Nov 12, 2013
3b88121
use uglify
purge Nov 12, 2013
3f52322
rename + docs
purge Nov 12, 2013
c5945e3
plugin tests, grunt test task, clean up
purge Nov 13, 2013
0bd1724
don't stop other widgets from loading if one failes
purge Nov 13, 2013
4fcd47e
src not needed any more
purge Nov 13, 2013
74042ca
update scaffold
purge Nov 13, 2013
9e1a3e4
update paths
purge Nov 13, 2013
cff21a4
caps issue
purge Nov 13, 2013
e4c5ba9
merge in dev
purge Nov 13, 2013
6c86fe0
bundles should return initializer instead of defined Controller
purge Nov 14, 2013
ecec9cb
update scaffold
purge Nov 14, 2013
e360111
update rror
purge Nov 14, 2013
d229775
update README
purge Nov 14, 2013
7440c22
remove unused file
purge Nov 14, 2013
041249e
remove default task
purge Nov 14, 2013
3df7e34
remove extraneous rendered function and use . namespacing
purge Nov 14, 2013
5257a8b
update tests
purge Nov 14, 2013
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
2 changes: 1 addition & 1 deletion .bowerrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"directory": "app/lib"
"directory": "src/lib"
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
node_modules/
config.js
compiled/**/*.*
app/lib/
src/lib/
dist/
example-widget/
build/
61 changes: 55 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-bower-release');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-shell');
grunt.initConfig({
bower: grunt.file.readJSON('bower.json'),

clean: {
all: {
src: ["compiled", "dist"]
src: ["build", "compiled", "dist"]
}
},

uglify: {
sqwidget: {
files: {
'build/sqwidget-min.js': ['build/sqwidget.js']
}
}
},

connect: {
publisher: {
options: {
Expand All @@ -24,24 +37,60 @@ module.exports = function(grunt) {
}
}
},
karma: {
integration: {
configFile: 'karma.conf.js'

requirejs: {
compile: {
options: {
baseUrl: "src",
out: 'dist/<%= bower.name %>.js',
paths: {
almond: 'lib/almond/almond',
requirejs: 'lib/requirejs/require',
domReady: 'lib/requirejs-domready/domReady',
},
include: ['requirejs', 'sqwidget'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the requirejs compile need requirejs again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because its bundled as part of the binary, so it can be namespaced and not need data-main.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right! Could there be a comment there because it does look out-of-place and it's actually a feature?

// Wrapper for AMD
wrap: {
startFile: 'src/_wrapper/top.js',
endFile: 'src/_wrapper/bottom.js'
},
//optimize: 'uglify2',
optimize: 'none',
preserveLicenseComments: false,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any particular reason for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smaller.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it makes using the libraries illegal with certain licenses.

generateSourceMaps: true
}
}
},

shell: {
build_example: {
command: "./build_example.sh"
}
},

watch: {
scaffold: {
files: ["grunt-scaffold/root/main.js", "grunt-scaffold/root/app/**/*.js", "grunt-scaffold/**/*.tmpl"],
tasks: ["build"]
}
},

bowerRelease: {
stable: {
options: {
endpoint: 'git://github.com/premasagar/sqwidget.git',
stageDir: 'dist'
},
files: {
cwd: '.',
src: ['sqwidget.js'],
}
}
}

});
grunt.registerTask("build", ["shell:build_example"]);
grunt.registerTask("test", ["clean", "build", "karma"]);
grunt.registerTask("build", ["requirejs:compile"]);
grunt.registerTask("default", ["clean", "build", "connect", "watch"]);
grunt.registerTask("dist", ["clean", "build"]);
grunt.registerTask("release", ["dist", "bowerRelease:stable"]);
};
100 changes: 0 additions & 100 deletions app/main.js

This file was deleted.

Loading