Artur Paikin преди 9 години
родител
ревизия
aa1dd95c76
променени са 9 файла, в които са добавени 133 реда и са изтрити 57 реда
  1. 1 0
      .gitignore
  2. 3 4
      .travis.yml
  3. 30 0
      CHANGELOG.MD
  4. 34 0
      Makefile
  5. 2 2
      bin/build-umd
  6. 1 0
      env.example.sh
  7. 29 26
      package.json
  8. 25 25
      website/package.json
  9. 8 0
      website/src/disc.html

+ 1 - 0
.gitignore

@@ -1,6 +1,7 @@
 .DS_Store
 Thumbs.db
 npm-debug.log
+env.sh
 node_modules
 
 dist/

+ 3 - 4
.travis.yml

@@ -9,10 +9,9 @@ addons:
     - g++-4.8
 
 script:
-  - "npm run-script build"
-
-# Automatically deploy website onto gh-pages (if master and not PR)
-after_success:
+  - npm run-script build
+  # Automatically deploy website onto gh-pages (if master and not PR)
+  # Don't do this in `after_success`, because then failures won't bubble up
   - git config --global user.name 'Uppy Bot'
   - git config --global user.email 'uppybot@uppyjs.io'
   - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && npm run web:deploy

+ 30 - 0
CHANGELOG.MD

@@ -0,0 +1,30 @@
+Our combined changelog and todo. Items can be tagged by owner and optionally, if discussion
+happened / is needed, a GitHub issue.
+
+## TODO (Work not started yet)
+
+- [ ] Add basic modal plugin that can be used as a target
+- [ ] Add basic Instagram plugin example (#21)
+- [ ] Add basic preset that mimics Transloadit's jQuery plugin (#28)
+- [ ] Add support tus 1.0 uploading capabilities (#3)
+- [ ] Apply plugins when DOM elements aren't static (#25)
+- [ ] Create a progressbar/spinner/etc plugin (#18)
+- [ ] Create an Uppy logo (@vvolfy)
+- [ ] Write an acceptance test for the Multipart example via Saucelabs (#2, #23, @hedgerh)
+
+## 0.0.2 (Unreleased)
+
+- [ ] Add a deploy target for uppy-server so we can use it in demos (#39, @kvz)
+- [ ] Add basic i18n support via `core.translate()` and locale loading (#47, @arturi)
+- [ ] Create a (barely) working uppy-server (#39, @hedgerh)
+- [ ] Fix Uppy deploys (postcss-svg problem) (@arturi, @kvz)
+
+## 0.0.1 (December 20, 2015)
+
+- [x] Add basic DragDrop plugin example (#7)
+- [x] Add basic Dropbox plugin example (#31)
+- [x] Add CSS Framework (#14)
+- [x] Create Hexo site that also contains our playground (#5, #34, #12 #22, #44, #35, #15, #37, #40, #43)
+- [x] Individual progress (#24)
+- [x] Setup Basic Plugin system (#1, #4, #20)
+- [x] Setup Build System (#30, #13)

+ 34 - 0
Makefile

@@ -0,0 +1,34 @@
+# Licensed under MIT.
+# Copyright (2016) by Kevin van Zonneveld https://twitter.com/kvz
+#
+# This Makefile offers convience shortcuts into any Node.js project that utilizes npm scripts.
+# It functions as a wrapper around the actual listed in `package.json`
+# So instead of typing:
+#
+#  $ npm script build:assets
+#
+# you could also type:
+#
+#  $ make build-assets
+#
+# Notice that colons (:) are replaced by dashes for Makefile compatibility.
+#
+# The benefits of this wrapper are:
+#
+# - You get to keep the the scripts package.json, which is more portable
+#   (Makefiles & Windows are harder to mix)
+# - Offer a polite way into the project for developers coming from different
+#   languages (npm scripts is obviously very Node centric)
+# - Profit from better autocomplete (make <TAB><TAB>) than npm currently offers.
+#   OSX users will have to install bash-completion
+#   (http://davidalger.com/development/bash-completion-on-os-x-with-brew/)
+
+define npm_script_targets
+TARGETS := $(shell node -e 'for (var k in require("./package.json").scripts) {console.log(k.replace(/:/g, "-"));}')
+$$(TARGETS):
+	npm run $(subst -,:,$(MAKECMDGOALS))
+
+.PHONY: $$(TARGETS)
+endef
+
+$(eval $(call npm_script_targets))

+ 2 - 2
bin/build-umd

@@ -10,7 +10,7 @@ __file="${__dir}/$(basename "${BASH_SOURCE[0]}")"
 __base="$(basename ${__file} .sh)"
 
 SRC="src/index.js"
-OUT="uppy.js"
+OUT="${OUT:-uppy.js}"
 
 OUTDIR="dist"
 TRANSFORMS="[ babelify ]"
@@ -18,4 +18,4 @@ FLAGS="-t [ babelify ] --standalone Uppy"
 
 mkdir -p "${OUTDIR}"
 
-browserify $SRC $FLAGS > $OUTDIR/$OUT
+browserify ${@:-} $SRC $FLAGS > $OUTDIR/$OUT

+ 1 - 0
env.example.sh

@@ -0,0 +1 @@
+export GHPAGES_URL=https://GITHUB_SECRET_ACCESS_TOKEN@github.com/transloadit/uppy.git

+ 29 - 26
package.json

@@ -6,28 +6,30 @@
   "scripts": {
     "build:css": "bin/build-css",
     "build:lib": "babel src -d lib --stage 0",
+    "build:umd:fullpath": "env OUT=uppy-fp.js ./bin/build-umd --full-paths",
     "build:umd:min": "./bin/build-umd",
     "build:umd": "./bin/build-umd",
     "build": "npm run build:lib && npm run build:umd && npm run build:umd:min && npm run build:css",
     "clean": "rm -rf lib && rm -rf dist",
+    "docs": "cd website && node documentation.js",
     "lint": "eslint src/**/*.js",
     "server": "browser-sync start --config .browsersync.js",
+    "start": "npm run build && npm run web",
     "test:phantom": "zuul test/spec/upload.js --phantom",
     "test": "bin/test",
-    "watch": "nodemon --watch src --ext scss,js -x \"npm run build && node website/update.js\"",
     "watch:all": "parallelshell \"npm run watch\" \"npm run web\"",
     "watch:css": "nodemon --watch src --ext scss -x \"npm run build && node website/update.js\"",
     "watch:examples": "cd website && node build-examples.js watch",
     "watch:js": "nodemon --watch src --ext js -x \"npm run build && node website/update.js\"",
-    "web:update-frontpage-code-sample": "cd website && ./node_modules/.bin/hexo generate && cp -f public/frontpage-code-sample.html ./themes/uppy/layout/partials/frontpage-code-sample.html",
-    "web:clean": "cd website && ./node_modules/.bin/hexo clean",
+    "watch": "nodemon --watch src --ext scss,js -x \"npm run build && node website/update.js\"",
     "web:build": "cd website && node update.js && ./node_modules/.bin/hexo generate",
-    "web:deploy": "npm run web:install && npm run web:build && ./bin/web-deploy",
+    "web:clean": "cd website && ./node_modules/.bin/hexo clean",
+    "web:deploy": "npm run web:install && npm run web:disc && npm run web:build && ./bin/web-deploy",
+    "web:disc": "npm run build:umd:fullpath && discify dist/uppy-fp.js --output website/src/_disc.html && echo '---\nlayout: false\n---\n' |cat - website/src/_disc.html > website/src/disc.html && rm website/src/_disc.html",
     "web:install": "cd website && rm -rf node_modules/hexo-renderer-uppyexamples && npm install",
     "web:preview": "cd website && ./node_modules/.bin/hexo server --debug",
-    "web": "npm run web:install && npm run web:clean && npm run web:build && npm run web:preview",
-    "docs": "cd website && node documentation.js",
-    "start": "npm run build && npm run web"
+    "web:update-frontpage-code-sample": "cd website && ./node_modules/.bin/hexo generate && cp -f public/frontpage-code-sample.html ./themes/uppy/layout/partials/frontpage-code-sample.html",
+    "web": "npm run web:install && npm run web:clean && npm run web:build && npm run web:preview"
   },
   "repository": {
     "type": "git",
@@ -40,26 +42,27 @@
   },
   "homepage": "https://github.com/transloadit/uppy#readme",
   "devDependencies": {
-    "babel": "^5.8.34",
-    "babel-eslint": "^4.1.5",
-    "babelify": "^6.4.0",
-    "browser-sync": "^2.10.0",
-    "browserify": "^12.0.1",
-    "chalk": "^1.1.1",
-    "eslint": "^1.9.0",
-    "http-server": "^0.8.5",
-    "multi-glob": "^1.0.1",
-    "node-notifier": "^4.4.0",
-    "node-sass": "^3.4.2",
-    "nodemon": "^1.8.1",
-    "phantomjs": "^1.9.18",
-    "tape": "^4.4.0",
-    "watchify": "^3.6.1",
-    "zuul": "^3.7.2"
+    "babel": "5.8.34",
+    "babel-eslint": "4.1.5",
+    "babelify": "6.4.0",
+    "browser-sync": "2.10.0",
+    "browserify": "12.0.1",
+    "chalk": "1.1.1",
+    "eslint": "1.9.0",
+    "http-server": "0.8.5",
+    "multi-glob": "1.0.1",
+    "node-notifier": "4.4.0",
+    "node-sass": "3.4.2",
+    "nodemon": "1.8.1",
+    "phantomjs": "1.9.18",
+    "tape": "4.4.0",
+    "watchify": "3.6.1",
+    "zuul": "3.7.2"
   },
   "dependencies": {
-    "parallelshell": "^2.0.0",
-    "superagent": "^1.5.0",
-    "tus-js-client": "^1.1.3"
+    "disc": "1.3.2",
+    "parallelshell": "2.0.0",
+    "superagent": "1.5.0",
+    "tus-js-client": "1.1.3"
   }
 }

+ 25 - 25
website/package.json

@@ -6,35 +6,35 @@
     "version": "3.1.1"
   },
   "dependencies": {
-    "autoprefixer": "^6.1.2",
-    "hexo": "^3.1.1",
-    "hexo-browsersync": "^0.2.0",
+    "autoprefixer": "6.1.2",
+    "hexo": "3.1.1",
+    "hexo-browsersync": "0.2.0",
     "hexo-deployer-git": "0.0.4",
-    "hexo-generator-archive": "^0.1.2",
-    "hexo-generator-category": "^0.1.2",
-    "hexo-generator-index": "^0.1.2",
-    "hexo-generator-tag": "^0.1.1",
-    "hexo-renderer-ejs": "^0.1.0",
-    "hexo-renderer-marked": "^0.2.4",
+    "hexo-generator-archive": "0.1.2",
+    "hexo-generator-category": "0.1.2",
+    "hexo-generator-index": "0.1.2",
+    "hexo-generator-tag": "0.1.1",
+    "hexo-renderer-ejs": "0.1.0",
+    "hexo-renderer-marked": "0.2.4",
     "hexo-renderer-postcss": "https://github.com/arturi/hexo-renderer-postcss#afca2bc12f5816067b15a9d24017c70e077b9f0b",
-    "hexo-renderer-scss": "^1.0.1",
+    "hexo-renderer-scss": "1.0.1",
     "hexo-renderer-uppyexamples": "file:./private_modules/hexo-renderer-uppyexamples",
-    "hexo-server": "^0.1.2",
-    "hexo-tag-emojis": "^2.0.0",
-    "hexo-util": "^0.2.1",
-    "mkdirp": "^0.5.1",
-    "postcss-svg": "^1.0.4",
-    "uuid": "^2.0.1"
+    "hexo-server": "0.1.2",
+    "hexo-tag-emojis": "2.0.0",
+    "hexo-util": "0.2.1",
+    "mkdirp": "0.5.1",
+    "postcss-svg": "https://github.com/kvz/postcss-svg#9239b6dd4ab0dc3ef37f41c9cbc0e23d25549c7b",
+    "uuid": "2.0.1"
   },
   "devDependencies": {
-    "browserify": "^12.0.1",
-    "chalk": "^1.1.1",
-    "documentation": "^3.0.4",
-    "glob": "^6.0.1",
-    "mdast-util-inject": "^1.1.0",
-    "multi-glob": "^1.0.1",
-    "node-notifier": "^4.4.0",
-    "remark": "^3.0.0",
-    "watchify": "^3.6.1"
+    "browserify": "12.0.1",
+    "chalk": "1.1.1",
+    "documentation": "3.0.4",
+    "glob": "6.0.1",
+    "mdast-util-inject": "1.1.0",
+    "multi-glob": "1.0.1",
+    "node-notifier": "4.4.0",
+    "remark": "3.0.0",
+    "watchify": "3.6.1"
   }
 }

Файловите разлики са ограничени, защото са твърде много
+ 8 - 0
website/src/disc.html


Някои файлове не бяха показани, защото твърде много файлове са промени