Browse Source

Merge branch 'master' into gh-pages

pull/126/merge
RubaXa 10 years ago
parent
commit
bbc47b185e
  1. 1
      .gitignore
  2. 3
      Sortable.js
  3. 2
      bower.json
  4. 2
      component.json
  5. 18
      index.html
  6. 24
      meteor/package.js
  7. 23
      meteor/publish.sh
  8. 28
      meteor/runtests.sh
  9. 9
      meteor/test.js
  10. 2
      package.json
  11. BIN
      st/face-01.jpg
  12. BIN
      st/face-02.jpg
  13. BIN
      st/face-03.jpg
  14. BIN
      st/face-04.jpg
  15. BIN
      st/face-05.jpg
  16. BIN
      st/face-06.jpg
  17. BIN
      st/face-07.jpg
  18. BIN
      st/face-08.jpg
  19. BIN
      st/face-09.jpg

1
.gitignore vendored

@ -1,3 +1,4 @@
node_modules node_modules
mock.png mock.png
.*.sw* .*.sw*
.build*

3
Sortable.js

@ -14,6 +14,9 @@
else if( typeof module != "undefined" && typeof module.exports != "undefined" ){ else if( typeof module != "undefined" && typeof module.exports != "undefined" ){
module.exports = factory(); module.exports = factory();
} }
else if( typeof Package !== "undefined" ){
Sortable = factory(); // export for Meteor.js
}
else { else {
window["Sortable"] = factory(); window["Sortable"] = factory();
} }

2
bower.json

@ -6,7 +6,7 @@
"authors": [ "authors": [
"RubaXa <ibnRubaXa@gmail.com>" "RubaXa <ibnRubaXa@gmail.com>"
], ],
"description": "Sortable is a minimalist JavaScript library for modern browsers and touch devices. No jQuery.", "description": "Minimalist library for reorderable drag-and-drop lists on modern browsers and touch devices. No jQuery.",
"keywords": [ "keywords": [
"sortable", "sortable",
"reorder", "reorder",

2
component.json

@ -7,7 +7,7 @@
"authors": [ "authors": [
"RubaXa <ibnRubaXa@gmail.com>" "RubaXa <ibnRubaXa@gmail.com>"
], ],
"description": "Sortable is a minimalist JavaScript library for modern browsers and touch devices. No jQuery.", "description": "Minimalist library for reorderable drag-and-drop lists on modern browsers and touch devices. No jQuery.",
"keywords": [ "keywords": [
"sortable", "sortable",
"reorder", "reorder",

18
index.html

@ -62,27 +62,27 @@
<div class="layer tile" data-force="30"> <div class="layer tile" data-force="30">
<div class="tile__name">Group A</div> <div class="tile__name">Group A</div>
<div class="tile__list"> <div class="tile__list">
<img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1/c9.9.113.113/s100x100/59436_1391411357920_1388516_s.jpg"/><!-- <img src="st/face-01.jpg"/><!--
--><img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-ash3/c13.8.104.104/s100x100/941190_10151608397684663_1532692251_s.jpg"/><!-- --><img src="st/face-02.jpg"/><!--
--><img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-frc3/c0.0.103.103/s100x100/382696_10150378364701671_1792621129_a.jpg"/><!-- --><img src="st/face-03.jpg"/><!--
--><img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-ash3/c44.10.116.116/s100x100/552948_430685950285752_1435082176_a.jpg"/> --><img src="st/face-04.jpg"/>
</div> </div>
</div> </div>
<div class="layer tile" data-force="25"> <div class="layer tile" data-force="25">
<div class="tile__name">Group B</div> <div class="tile__name">Group B</div>
<div class="tile__list"> <div class="tile__list">
<img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-ash3/c8.8.105.105/s100x100/558916_4874661741992_448469446_s.jpg"/><!-- <img src="st/face-05.jpg"/><!--
--><img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1/c29.9.117.117/s100x100/68347_385372304875713_1358705380_a.jpg"/><!-- --><img src="st/face-06.jpg"/><!--
--><img src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash2/c9.9.113.113/s100x100/424349_465457316812937_2106915541_s.jpg"/> --><img src="st/face-07.jpg"/>
</div> </div>
</div> </div>
<div class="layer tile" data-force="20"> <div class="layer tile" data-force="20">
<div class="tile__name">Group C</div> <div class="tile__name">Group C</div>
<div class="tile__list"> <div class="tile__list">
<img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-frc3/c12.12.156.156/s100x100/303317_320632284665935_15996162_a.jpg"/><!-- <img src="st/face-08.jpg"/><!--
--><img src="//fbcdn-profile-a.akamaihd.net/hprofile-ak-ash2/c9.9.109.109/s100x100/484507_4207733265938_1693034881_s.jpg"/> --><img src="st/face-09.jpg"/>
</div> </div>
</div> </div>

24
meteor/package.js

@ -0,0 +1,24 @@
var packageName = 'rubaxa:sortable';
Package.describe({
name: packageName,
summary: 'Sortable (official): minimalist reorderable drag-and-drop lists on modern browsers and touch devices',
version: '0.5.2',
git: 'https://github.com/RubaXa/Sortable.git'
});
Package.onUse(function (api) {
api.versionsFrom('0.9.0');
api.export('Sortable');
api.addFiles([
'Sortable.js'
], 'client'
);
});
Package.onTest(function (api) {
api.use(packageName, 'client');
api.use('tinytest', 'client');
api.addFiles('meteor/test.js', 'client');
});

23
meteor/publish.sh

@ -0,0 +1,23 @@
# Publish package on Meteor's Atmosphere.js
# Make sure Meteor is installed, per https://www.meteor.com/install. The curl'ed script is totally safe; takes 2 minutes to read its source and check.
type meteor >/dev/null 2>&1 || { curl https://install.meteor.com/ | sh; }
# sanity check: make sure we're in the root directory of the checkout
DIR=$( cd "$( dirname "$0" )" && pwd )
cd $DIR/..
# Meteor expects package.js to be in the root directory of the checkout, so copy it there temporarily
cp meteor/package.js ./
# publish package, creating it if it's the first time we're publishing
PACKAGE_NAME=$(grep -i name package.js | head -1 | cut -d "'" -f 2)
PACKAGE_EXISTS=$(meteor search $PACKAGE_NAME 2>/dev/null | wc -l)
if [ $PACKAGE_EXISTS -gt 0 ]; then
meteor publish
else
meteor publish --create
fi
rm package.js

28
meteor/runtests.sh

@ -0,0 +1,28 @@
# Test Meteor package before publishing to Atmosphere.js
# Make sure Meteor is installed, per https://www.meteor.com/install. The curl'ed script is totally safe; takes 2 minutes to read its source and check.
type meteor >/dev/null 2>&1 || { curl https://install.meteor.com/ | sh; }
# sanity check: make sure we're in the root directory of the checkout
DIR=$( cd "$( dirname "$0" )" && pwd )
cd $DIR/..
# Meteor expects package.js to be in the root directory of the checkout, so copy it there temporarily
cp meteor/package.js ./
# run tests and delete the temporary package.js even if Ctrl+C is pressed
int_trap() {
echo
echo "Tests interrupted."
}
trap int_trap INT
meteor test-packages ./
PACKAGE_NAME=$(grep -i name package.js | head -1 | cut -d "'" -f 2)
rm -rf ".build.$PACKAGE_NAME"
rm -rf ".build.local-test:$PACKAGE_NAME"
rm versions.json
rm package.js

9
meteor/test.js

@ -0,0 +1,9 @@
'use strict';
Tinytest.add('Sortable.is', function (test) {
var items = document.createElement('ul');
items.innerHTML = '<li data-id="one">item 1</li><li data-id="two">item 2</li><li data-id="three">item 3</li>';
var sortable = new Sortable(items);
test.instanceOf(sortable, Sortable, 'Instantiation OK');
test.length(sortable.toArray(), 3, 'Three elements');
});

2
package.json

@ -7,7 +7,7 @@
"grunt-version": "*", "grunt-version": "*",
"grunt-contrib-uglify": "*" "grunt-contrib-uglify": "*"
}, },
"description": "Sortable is a minimalist JavaScript library for modern browsers and touch devices. No jQuery.", "description": "Minimalist library for reorderable drag-and-drop lists on modern browsers and touch devices. No jQuery.",
"main": "Sortable.js", "main": "Sortable.js",
"scripts": { "scripts": {
"test": "grunt" "test": "grunt"

BIN
st/face-01.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
st/face-02.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

BIN
st/face-03.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

BIN
st/face-04.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
st/face-05.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
st/face-06.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
st/face-07.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
st/face-08.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
st/face-09.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Loading…
Cancel
Save