Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

custom builds, sourcemaps, etc #12

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
691aa60
yuidoc --lint in make before --server
devinrhode2 Mar 7, 2013
9106f53
allmighty Shield function + reorganized library wrapper
devinrhode2 Mar 7, 2013
1c8a6f0
allmighty Shield function + reorganized library wrapper
devinrhode2 Mar 7, 2013
e99e0ae
lower case shield, since it's not a constructor function
devinrhode2 Mar 7, 2013
f6a2fc1
custom builds and a lean lodash with just the methods we use
devinrhode2 Mar 7, 2013
84a5eba
build
devinrhode2 Mar 7, 2013
17742ca
allmighty Shield function + reorganized library wrapper
devinrhode2 Mar 7, 2013
cf5ab39
lower case shield, since it's not a constructor function
devinrhode2 Mar 7, 2013
e3d2958
custom builds and a lean lodash with just the methods we use
devinrhode2 Mar 7, 2013
49fdb65
build
devinrhode2 Mar 7, 2013
ed9730a
remove extra @return tag
devinrhode2 Mar 9, 2013
f710573
move in wrapInTryCatch from extendFunction.js
devinrhode2 Mar 11, 2013
8aad9e3
Update shield.js
devinrhode2 Mar 11, 2013
7b36286
better yuidoc'ing
devinrhode2 Mar 12, 2013
d609796
simplified custom build hash
devinrhode2 Mar 12, 2013
070ac37
`Merge branch 'master' of https://github.com/devinrhode2/shield.js
devinrhode2 Mar 12, 2013
83238ee
Update shield.js
devinrhode2 Apr 2, 2013
1b06e3a
Update shield.js
devinrhode2 Apr 2, 2013
8ec4277
Update shield.js
devinrhode2 Apr 2, 2013
bb614a4
[].slice.call to Array.prototype.slice.call
devinrhode2 Apr 2, 2013
4d484b7
pass onuncaughtException a serializable error obj
devinrhode2 Apr 5, 2013
f7e18f3
Update shield.js
devinrhode2 Apr 8, 2013
850e562
err'thang
Apr 11, 2013
0fa320d
asdf
Apr 11, 2013
6c2e3af
no clue, saving to github
May 3, 2013
4260235
custom builds and a lean lodash with just the methods we use
devinrhode2 Mar 7, 2013
481b53e
Add a Bitdeli badge to README
bitdeli-chef Sep 16, 2013
21a5108
Merge pull request #4 from bitdeli-chef/master
devinrhode2 Sep 21, 2013
e6a6e47
messy wrapInTryCatch right now, improved doc blocks
devinrhode2 Mar 7, 2013
03e581f
working on exceptionalException stuff
devinrhode2 Oct 20, 2013
cbec8f8
some unmerged codez
devinrhode2 Oct 25, 2013
a2d2e81
removing 200 millisecond wait for next exceptionalException. Feels a …
devinrhode2 Oct 25, 2013
d4422bb
yaaaaaa trick ya
devinrhode2 Oct 26, 2013
e57f1d1
save save save
devinrhode2 Oct 28, 2013
5b78fb7
guess there's where it was from
devinrhode2 Oct 29, 2013
9f3dc50
re-doing work that didn't save
devinrhode2 Oct 29, 2013
1c3d2f6
lost of comments
devinrhode2 Oct 29, 2013
2cd06a7
misc
devinrhode2 Oct 29, 2013
41618f0
misc
devinrhode2 Oct 29, 2013
626ce5b
checking in..
devinrhode2 Nov 5, 2013
9e8b2ef
simplify assignment to library module, remove normalization and ...
devinrhode2 Nov 5, 2013
9f2a15c
move in wrapInTryCatch as shield.wrap
devinrhode2 Nov 5, 2013
ffc532d
copy constructor property in shield.wrap + misc changes
devinrhode2 Nov 7, 2013
5031fc4
export library as AMD module lodash style
devinrhode2 Dec 17, 2013
96c489e
inter-library fun stuff
devinrhode2 Dec 17, 2013
a6e0a52
Update README.md
devinrhode2 Sep 24, 2015
bb93ba7
remove most of jasmine test stuff
Sep 24, 2015
00371d6
re-order dependencies list
Sep 24, 2015
6d1e358
npm install --save-dev broccoli
Sep 24, 2015
54d5312
finish build target code from 2 years ago
Sep 24, 2015
f096fc3
kill semi-colons, safeguard analytics.track call
Sep 24, 2015
c6a1e45
yuidoc improvements/fixes
Sep 24, 2015
997d728
WIP..
Sep 26, 2015
c854868
idk man
devinrhode2 Nov 27, 2018
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
80 changes: 65 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,30 @@
module.exports = function(grunt) {
'use strict';

var pkg = grunt.file.readJSON('package.json');

function banner(buildName) {
return '/*! \n * ' + [
pkg.name + ' v' + pkg.version + ' - ' + pkg.description,
pkg.url,
'',
'Copyright (c) ' + grunt.template.today('yyyy') + ' ' + pkg.name + ' contributors',
pkg.licenses + ' Licensed',
'',
'Released: ' + grunt.template.today('yyyy-mm-dd'),
'',
].join('\n * ') + '\n' +

//in /* */ comment due to IE's conditional compilaton comments
'//@ sourceMappingURL=Shield.' + buildName + '.map\n' +
' */\n';
}

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
// Simple config to re-run `grunt` any time a file is added, changed or deleted
watch: {
files: ['Gruntfile.js', 'package.json', 'src/**/*.js', 'test/**/*.js'],
tasks: ['default']
},
pkg: pkg,

jshint: {
files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
files: ['src/**/*.js'],
options: {
bitwise: true,
boss: true,
Expand Down Expand Up @@ -48,23 +62,59 @@ module.exports = function(grunt) {
}
},

jasmine: {
src: '*.js',
specs: 'spec/**/*Spec.js',
timeout: 10000,
junit: {
output: 'junit/'
lodash: {
//it'd be nice to see this configurable at some point
modifier: 'legacy',

//not sure on the best place to put this.. src/ makes it transparent/clear for a contributor though
dest: 'lib/lodash.custom.js',
include: ['isArray', 'isString', 'isFunction', 'each']
},
'closure-compiler': (function (map) {
var baseFiles = [
'lib/lodash.custom.js',
'node_modules/extend-function/extendFunction.js',
'src/Shield.js'
];
var closureHash = {};
for (var build in map) {
if (map.hasOwnProperty(build)) {
closureHash[build] = {
js: baseFiles.concat(map[build]),
jsOutputFile: 'dist/' + build + '.min.js',
maxBuffer: 500,
options: {
compilation_level: 'SIMPLE_OPTIMIZATIONS',
language_in: 'ECMASCRIPT3',
output_wrapper: banner(build) + '%output%',
source_map_format: 'V3', // || V1 || V2 || DEFAULT
create_source_map: 'dist/' + build + '.min.map'
}
};
}
}
}
return closureHash;
})({
base: [], //just use base files
historicalConsole: ['node_modules/historical-console/historicalConsole.js'],
jQuery: ['src/shield.jquery.js'],
historicalConsoleAndjQuery: ['node_modules/historical-console/historicalConsole.js', 'src/shield.jquery.js']
}),

watch: {
files: ['Gruntfile.js', 'package.json', 'src/**/*.js', 'test/**/*.js'],
tasks: ['default']
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-lodashbuilder');
grunt.loadNpmTasks('grunt-closure-compiler');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-watch');

// Default task
grunt.registerTask('default', ['jshint', 'jasmine', 'watch']);
grunt.registerTask('default', ['jshint', 'lodash', 'closure-compiler', 'jasmine', 'watch']);

// Travis-CI task
grunt.registerTask('travis', ['jshint']);
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
yuidoc:
yuidoc --server 2000 --configfile package.json
#yuidoc --lint --configfile package.json
yuidoc --server 2000 -c package.json
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
### Docs with [yuidoc](http://yui.github.com/yuidoc/)

```
sudo npm install -g yuidocjs
cd projects
git clone devinrhode2/shield.js
cd shield.js
npm install -g yuidocjs
make
open http://localhost:2000/
```
```

//focus is ease of use. for crazy efficiency, just use a try/catch block and pass exceptions to onuncaughtException

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/devinrhode2/shield.js/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

7 changes: 7 additions & 0 deletions component.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "shield.js",
"version": "0.0.0",
"dependencies": {
"extendFunction": "latest"
}
}
31 changes: 31 additions & 0 deletions dist/base.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added dist/base.min.js.report.txt
Empty file.
Loading