Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rikschennink committed Mar 22, 2019
1 parent 71dca9b commit e35da25
Show file tree
Hide file tree
Showing 223 changed files with 16,769 additions and 7 deletions.
14 changes: 14 additions & 0 deletions .babelrc
@@ -0,0 +1,14 @@
{
"presets": [
["@babel/preset-env", {
"exclude": ["transform-typeof-symbol"],
"modules": false
}]
],
"plugins": [
["@babel/plugin-proposal-object-rest-spread", {
"loose": true,
"useBuiltIns": true
}]
]
}
Empty file modified .gitattributes 100644 → 100755
Empty file.
Empty file modified .github/ISSUE_TEMPLATE.md 100644 → 100755
Empty file.
3 changes: 2 additions & 1 deletion .gitignore 100644 → 100755
@@ -1 +1,2 @@
npm-debug.log
npm-debug.log
node_modules/
6 changes: 6 additions & 0 deletions CHANGELOG.md 100644 → 100755
@@ -1,5 +1,11 @@
# Changelog

## 4.3.4

- Add source code
- Add build scripts


## 4.3.3

- Fix issue where aborting a file load while the file was being prepared (for instance, encoded) did not work.
Expand Down
Empty file modified LICENSE 100644 → 100755
Empty file.
7 changes: 7 additions & 0 deletions README.md 100644 → 100755
Expand Up @@ -120,6 +120,13 @@ Or get it from a CDN:
[Getting started with FilePond](https://pqina.nl/filepond/docs/patterns/getting-started/)


## Build

```
npm run build
```


## Publications

* [Smooth file uploading with React and FilePond](https://itnext.io/uploading-files-with-react-and-filepond-f8a798308557)
Expand Down
8 changes: 8 additions & 0 deletions banner-cli.js
@@ -0,0 +1,8 @@
const banner = require('./banner');
const pkg = require('./package.json');
const args = process.argv.slice(2);
process.stdin.resume();
process.stdin.setEncoding('utf8');
process.stdin.on('data', function(data) {
process.stdout.write(banner({ id: args[0], ...pkg }) + data);
});
8 changes: 8 additions & 0 deletions banner.js
@@ -0,0 +1,8 @@
module.exports = ({ id, version, license, homepage }) => `/*!
* ${ id } ${ version }
* Licensed under ${ license }, https://opensource.org/licenses/${ license }/
* Please visit ${ homepage } for details.
*/
/* eslint-disable */
`;
24 changes: 24 additions & 0 deletions index.html
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FilePond Demo</title>
<link href="./dist/filepond.css" rel="stylesheet">
</head>
<body>

<input type="file"/>

<script src="./dist/filepond.js"></script>

<script>
// Get a reference to the file input element
const inputElement = document.querySelector('input[type="file"]');

// Create the FilePond instance
const pond = FilePond.create(inputElement);
</script>

</body>
</html>
6 changes: 6 additions & 0 deletions jest.config.js
@@ -0,0 +1,6 @@
module.exports = {
bail: true,
verbose: true,
setupFiles: ['<rootDir>/jest.stubs.js'],
roots: ['<rootDir>/js']
};
31 changes: 31 additions & 0 deletions jest.stubs.js
@@ -0,0 +1,31 @@
const uuid = require('uuid/v4');

window.URL.createObjectURL = (blob) => {
return `blob:${serializeURL(location.origin)}/${uuid()}`;
}

window.URL.revokeObjectURL = (url) => {}

// var _createObjectURL = window.URL.createObjectURL;
// Object.defineProperty(window.URL, 'createObjectURL', {
// set: function (value) {
// console.trace('set createObjectURL')
// _createObjectURL = value;
// },
// get: function () {
// console.trace('get createObjectURL')
// return _createObjectURL;
// }
// })

// var _URL = window.URL;
// Object.defineProperty(window, 'URL', {
// set: function (value) {
// console.trace('set URL')
// _URL = value;
// },
// get: function () {
// console.trace('get URL')
// return _URL;
// }
// })

0 comments on commit e35da25

Please sign in to comment.