forked from dropzone/dropzone
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Download files are generated with grunt now.
Closes dropzone#79
- Loading branch information
Showing
8 changed files
with
224 additions
and
61 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 @@ | ||
return module.exports; | ||
})); |
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,11 @@ | ||
// Uses AMD or browser globals to create a jQuery plugin. | ||
(function (factory) { | ||
if (typeof define === 'function' && define.amd) { | ||
// AMD. Register as an anonymous module. | ||
define(['jquery'], factory); | ||
} else { | ||
// Browser globals | ||
factory(jQuery); | ||
} | ||
} (function (jQuery) { | ||
var module = { exports: { } }; // Fake component |
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,77 @@ | ||
module.exports = (grunt) -> | ||
|
||
grunt.initConfig | ||
pkg: grunt.file.readJSON "package.json" | ||
|
||
|
||
stylus: | ||
options: | ||
compress: false | ||
default: | ||
paths: [ "node_modules/nib/lib/" ] | ||
files: [ | ||
"downloads/css/basic.css": "downloads/css/stylus/basic.styl" | ||
"downloads/css/dropzone.css": "downloads/css/stylus/dropzone.styl" | ||
] | ||
|
||
coffee: | ||
default: | ||
files: | ||
"lib/dropzone.js": "src/dropzone.coffee" | ||
|
||
|
||
component: | ||
app: | ||
output: "build/" | ||
name: "build" | ||
config: "component.json" | ||
styles: false | ||
scripts: true | ||
standalone: "Dropzone" | ||
|
||
copy: | ||
component: | ||
src: "build/build.js" | ||
dest: "downloads/dropzone.js" | ||
|
||
concat: | ||
amd: | ||
src: [ | ||
"AMD_header" | ||
"components/component-emitter/index.js" | ||
"lib/dropzone.js" | ||
"AMD_footer" | ||
] | ||
dest: "downloads/dropzone-amd-module.js" | ||
|
||
|
||
|
||
# watch: | ||
# shop: | ||
# files: "public_src/js/shop/**/*.coffee" | ||
# tasks: [ "shop" ] | ||
# options: nospawn: on | ||
# admin: | ||
# files: "public_src/js/admin/**/*.coffee" | ||
# tasks: [ "admin" ] | ||
# options: nospawn: on | ||
# css: | ||
# files: [ "public_src/css/**/*.styl", "public_src/css/**/*.css" ] | ||
# tasks: [ "css" ] | ||
# options: nospawn: on | ||
|
||
|
||
|
||
grunt.loadNpmTasks "grunt-contrib-coffee" | ||
grunt.loadNpmTasks "grunt-component-build" | ||
grunt.loadNpmTasks "grunt-contrib-stylus" | ||
grunt.loadNpmTasks "grunt-contrib-copy" | ||
grunt.loadNpmTasks "grunt-contrib-concat" | ||
grunt.loadNpmTasks "grunt-contrib-watch" | ||
|
||
# Default tasks | ||
grunt.registerTask "default", [ "coffee" ] | ||
|
||
grunt.registerTask "css", [ "stylus" ] | ||
|
||
grunt.registerTask "downloads", [ "coffee", "stylus", "component", "copy", "concat" ] |
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
Oops, something went wrong.