-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from 43081j/typescript
1.0.0
- Loading branch information
Showing
28 changed files
with
1,855 additions
and
386 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,6 @@ | ||
root = true | ||
|
||
[*] | ||
indent_size = 2 | ||
indent_style = space | ||
trim_trailing_whitespace = true |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
*.swp | ||
build/ | ||
lib/ | ||
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,7 @@ | ||
node_modules | ||
tslint.json | ||
src/ | ||
lib/test/ | ||
test/ | ||
.travis.yml | ||
.editorconfig |
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,6 @@ | ||
language: node_js | ||
node_js: | ||
- "8" | ||
- "node" | ||
script: | ||
- npm test |
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
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 |
---|---|---|
@@ -1,32 +1,28 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Test</title> | ||
</head> | ||
<body> | ||
<!-- Make a file input for you to select an archive --> | ||
<input type="file"> | ||
<br> | ||
<!-- Include rar.js --> | ||
<script src="../dist/rar.js"></script> | ||
<script type="text/javascript"> | ||
document.querySelector('input[type="file"]').onchange = function(e) { | ||
/* | ||
Pass the File instance to rar.js | ||
You could iterate over this.files to handle many at once | ||
*/ | ||
var file = RarArchive(this.files[0], function(err) { | ||
if(err) { | ||
console.log(err); | ||
return; | ||
} | ||
this.entries.forEach(function(val) { | ||
var div = document.createElement('div'); | ||
div.textContent = val.path; | ||
document.body.appendChild(div); | ||
}); | ||
}); | ||
} | ||
</script> | ||
</body> | ||
<head> | ||
<title>Test</title> | ||
</head> | ||
<body> | ||
<!-- Make a file input for you to select an archive --> | ||
<input type="file"> | ||
<br> | ||
<!-- Include rar.js --> | ||
<script src="../rar.js"></script> | ||
<script type="text/javascript"> | ||
document.querySelector('input[type="file"]').onchange = function(e) { | ||
/* | ||
Pass the File instance to rar.js | ||
You could iterate over this.files to handle many at once | ||
*/ | ||
var file = Rar.fromFile(this.files[0]).then((archive) => { | ||
archive.entries.forEach(function(val) { | ||
var div = document.createElement('div'); | ||
div.textContent = val.path; | ||
document.body.appendChild(div); | ||
}); | ||
}); | ||
} | ||
</script> | ||
</body> | ||
</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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
var RarArchive = require('rarjs'); | ||
var Rar = require('rarjs'); | ||
|
||
var file = RarArchive({type: RarArchive.OPEN_LOCAL, file: '../build/test.rar'}, function(err) { | ||
this.entries.forEach(function(val) { | ||
Rar.fromLocal('test.rar').then((archive) => { | ||
archive.entries.forEach((val) => { | ||
console.log(val.path); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.