-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,970 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
components | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"bitwise": true, | ||
"browser": true, | ||
"curly": true, | ||
"eqeqeq": true, | ||
"evil": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"noempty": true, | ||
"nomen": false, | ||
"nonew": true, | ||
"plusplus": true, | ||
"strict": true, | ||
"trailing": true, | ||
"undef": true, | ||
"globals": { | ||
"afterEach": true, | ||
"beforeEach": true, | ||
"console": true, | ||
"define": false, | ||
"describe": true, | ||
"document": false, | ||
"it": true, | ||
"require": false, | ||
"requirejs": true, | ||
"tinymce": true, | ||
"window": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module.exports = function(grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
bower: { | ||
target: { | ||
rjsConfig: 'config.js' | ||
} | ||
}, | ||
requirejs: { | ||
compile: { | ||
options: { | ||
name: 'core', | ||
mainConfigFile: 'config.js', | ||
out: "jspak.js" | ||
} | ||
} | ||
}, | ||
bowerbuster: { | ||
path: 'bowerbuster.json' | ||
}, | ||
buster: { | ||
test: { | ||
config: 'buster.js' | ||
}, | ||
server: { | ||
port: 1111 | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-requirejs'); | ||
grunt.loadNpmTasks('grunt-bower-requirejs'); | ||
grunt.loadNpmTasks('grunt-bower-busterjs'); | ||
grunt.loadNpmTasks('grunt-buster'); | ||
|
||
grunt.registerTask('default', ['bower', 'requirejs']); | ||
grunt.registerTask('test', ['bower', 'bowerbuster', 'buster']); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# jspak | ||
|
||
A sample project where we hook up Bower to RequireJS and Bower to | ||
Buster.JS, using Grunt. | ||
|
||
You need to have nodejs, npm, bower, grunt, buster and PhantomJS | ||
installed. | ||
|
||
Installation: | ||
|
||
$ npm install | ||
|
||
Install client-side dependencies: | ||
|
||
$ bower install | ||
|
||
Run the tests with buster (and PhantomJS): | ||
|
||
$ grunt test | ||
|
||
For more about the background, see this blog post: | ||
|
||
http://blog.startifact.com/posts/overwhelmed-by-javascript-dependencies.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "jspak", | ||
"version": "0.1.0", | ||
"ignore": [ | ||
"**/.*", | ||
"node_modules", | ||
"components" | ||
], | ||
"dependencies": { | ||
"jquery": "~2.0.0", | ||
"requirejs": "", | ||
"patternslib": "2.0.13" | ||
}, | ||
"resolutions": { | ||
"jquery": "~2.0.0", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
["components/backbone/backbone.js",["components/bootstrap/dist/css/bootstrap.css","components/bootstrap/dist/js/bootstrap.js","components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot","components/bootstrap/dist/fonts/glyphicons-halflings-regular.svg","components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf","components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff"],"components/console-polyfill/index.js","components/es5-shim","components/jquery/jquery.js","components/lodash/dist/lodash.compat.js","components/marked/lib/marked.js","components/react/react.js","components/requirejs-text","components/selectivizr","components/underscore/underscore.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
var config = module.exports; | ||
|
||
var fs = require('fs'); | ||
|
||
var sources = JSON.parse(fs.readFileSync('bowerbuster.json', 'utf8')); | ||
sources.push('src/**/*.js'); | ||
|
||
config.core = { | ||
rootPath: ".", | ||
environment: "browser", | ||
libs: [ | ||
'components/requirejs/require.js', | ||
'config.js' | ||
], | ||
sources: sources, | ||
tests: [ | ||
"test/**/*.js" | ||
], | ||
extensions: [require('buster-amd')], | ||
"buster-amd": { | ||
pathMapper: function(path) { | ||
return path.replace(/\.js$/, "").replace(/^\//, "../"); | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require.config({ | ||
baseUrl: 'src', | ||
paths: { | ||
backbone: '../components/backbone/backbone', | ||
bootstrap: '../components/bootstrap/dist/js/bootstrap', | ||
'console-polyfill': '../components/console-polyfill/index', | ||
jquery: '../components/jquery/jquery', | ||
lodash: '../components/lodash/dist/lodash.compat', | ||
marked: '../components/marked/lib/marked', | ||
react: '../components/react/react', | ||
'requirejs-text': '../components/requirejs-text/text', | ||
selectivizr: '../components/selectivizr/selectivizr', | ||
underscore: '../components/underscore/underscore', | ||
'pat-registry': '../components/patternslib/src/core/registry', | ||
'pat-base': '../components/patternslib/src/core/base', | ||
'plone-patterns-toolbar': 'toolbar' | ||
} | ||
}); |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"name": "jspak", | ||
"version": "0.1.0", | ||
"devDependencies": { | ||
"grunt": "~0.4.1", | ||
"grunt-contrib-jshint": "~0.1.1", | ||
"grunt-contrib-nodeunit": "~0.1.2", | ||
"grunt-requirejs": "~0.4.2", | ||
"grunt-bower-requirejs": "~0.4.2", | ||
"buster-amd": "", | ||
"grunt-bower-busterjs": "~0.1.1", | ||
"bower": "~0.9.2", | ||
"grunt-buster": "~0.1.2" | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.