mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-18 00:55:35 +00:00
Greatly improved example page and command for dev — watch:example
This commit is contained in:
parent
e54d0cf27e
commit
044aa2d533
4 changed files with 28 additions and 14 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -14,7 +14,10 @@ website/public/
|
|||
website/.deploy*/
|
||||
website/src/_drafts
|
||||
website/themes/uppy/source/uppy/
|
||||
npm-debug.log*
|
||||
website/themes/uppy/_config.yml
|
||||
|
||||
npm-debug.log*
|
||||
config/
|
||||
nohup.out
|
||||
|
||||
example/bundle.js
|
||||
|
|
|
|||
|
|
@ -7,15 +7,14 @@
|
|||
<body>
|
||||
<h1>Uppy is here</h1>
|
||||
<button id="uppyModalOpener">Open Modal</button>
|
||||
<link href="../dist/uppy.min.css" rel="stylesheet">
|
||||
<script src="../dist/uppy.min.js"></script>
|
||||
<script src="../dist/locales/ru_RU.js"></script>
|
||||
<link href="uppy.min.css" rel="stylesheet">
|
||||
<script src="bundle.js"></script>
|
||||
<script>
|
||||
var uppy = new Uppy.Core({locales: Uppy.locales.ru_RU, debug: true})
|
||||
.use(Uppy.plugins.Modal, {trigger: '#uppyModalOpener'})
|
||||
.use(Uppy.plugins.Dashboard, {target: Uppy.plugins.Modal})
|
||||
.use(Uppy.plugins.Dummy, {target: Uppy.plugins.Modal})
|
||||
.run();
|
||||
// var uppy = new Uppy.Core({locales: Uppy.locales.ru_RU, debug: true})
|
||||
// .use(Uppy.plugins.Modal, {trigger: '#uppyModalOpener'})
|
||||
// .use(Uppy.plugins.Dashboard, {target: Uppy.plugins.Modal})
|
||||
// .use(Uppy.plugins.Dummy, {target: Uppy.plugins.Modal})
|
||||
// .run();
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
|
|
|||
8
example/main.js
Normal file
8
example/main.js
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
const Uppy = require('../src/index.js')
|
||||
|
||||
const uppy = new Uppy.Core({debug: true})
|
||||
.use(Uppy.plugins.Modal, {trigger: '#uppyModalOpener'})
|
||||
.use(Uppy.plugins.Dashboard, {target: Uppy.plugins.Modal})
|
||||
.use(Uppy.plugins.Dummy, {target: Uppy.plugins.Modal})
|
||||
|
||||
uppy.run()
|
||||
14
package.json
14
package.json
|
|
@ -32,10 +32,13 @@
|
|||
"test:unit": "node test/unit/index.js | tap-spec",
|
||||
"test": "npm run lint && npm run test:unit",
|
||||
"travis:deletecache": "travis cache --delete",
|
||||
"watch:css": "nodemon --watch src --ext scss -x 'npm run build:css && node website/update.js'",
|
||||
"watch:fast": "npm-run-all --parallel watch:css web:preview",
|
||||
"watch:js": "nodemon --watch src --ext js -x 'npm run build:bundle && node website/update.js'",
|
||||
"watch:css": "nodemon --watch src --ext scss -x 'npm run build:css'",
|
||||
"watch:js": "nodemon --watch src --ext js -x 'npm run build:bundle'",
|
||||
"watch": "npm-run-all --parallel watch:js watch:css",
|
||||
"watch:fast": "npm-run-all --parallel watch:css web:preview",
|
||||
"watch:example:browsersync": "browser-sync start --server 'example' --serveStatic 'dist' --files 'example/bundle.js, dist/uppy.min.css'",
|
||||
"watch:example:js": "watchify -t ['babelify'] example/main.js -o example/bundle.js -vd",
|
||||
"watch:example": "npm-run-all --parallel watch:example:js watch:css watch:example:browsersync",
|
||||
"web:build": "cd website && node update.js && ./node_modules/.bin/hexo generate --silent && node build-examples.js",
|
||||
"web:clean": "cd website && ./node_modules/.bin/hexo clean",
|
||||
"web:deploy": "npm-run-all web:install web:disc docs web:build && ./bin/web-deploy",
|
||||
|
|
@ -70,8 +73,9 @@
|
|||
"babel-preset-es2015-loose": "7.0.0",
|
||||
"babel-register": "6.7.2",
|
||||
"babelify": "7.2.0",
|
||||
"browser-sync": "2.10.0",
|
||||
"browserify": "12.0.1",
|
||||
"browser-sync": "2.13.0",
|
||||
"browserify": "13.0.1",
|
||||
"watchify": "3.7.0",
|
||||
"chalk": "1.1.1",
|
||||
"cssnano": "3.6.2",
|
||||
"disc": "1.3.2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue