[Pkg-javascript-commits] [leaflet] 20/40: add bower support

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:33:07 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet.

commit 600b90b87fb95fa52066f0bac89c09d21c1698dc
Author: Calvin Metcalf <cmetcalf at appgeo.com>
Date:   Wed Mar 19 15:43:38 2014 -0400

    add bower support
---
 .gitignore           |  2 ++
 build/bower.json     | 23 +++++++++++++++++++++++
 build/component.json | 19 +++++++++++++++++++
 build/publish.sh     | 31 +++++++++++++++++++++++++++++++
 package.json         | 12 +++++++++---
 5 files changed, 84 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index 68a9b2d..d3c27b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,5 @@ coverage/
 *.js.html
 index.html
 .mailmap
+bower.json
+component.json
\ No newline at end of file
diff --git a/build/bower.json b/build/bower.json
new file mode 100644
index 0000000..7dde378
--- /dev/null
+++ b/build/bower.json
@@ -0,0 +1,23 @@
+{
+  "name": "leaflet",
+  "description": "JavaScript library for mobile-friendly interactive maps",
+  "main": [
+    "dist/leaflet.js",
+    "dist/leaflet.css",
+    "dist/leaflet-src.js",
+    "dist/images/layers-2x.png",
+    "dist/images/layers.png",
+    "dist/images/marker-icon-2x.png",
+    "dist/images/marker-icon.png",
+    "dist/images/marker-shadow.png"
+  ],
+   "ignore": [
+    ".*",
+    "CHANGELOG.json",
+    "FAQ.md",
+    "debug",
+    "spec",
+    "src",
+    "build"
+  ]
+}
\ No newline at end of file
diff --git a/build/component.json b/build/component.json
new file mode 100644
index 0000000..7b9d53b
--- /dev/null
+++ b/build/component.json
@@ -0,0 +1,19 @@
+{
+  "name": "leaflet",
+  "description": "JavaScript library for mobile-friendly interactive maps",
+  "scripts": [
+    "dist/leaflet.js",
+    "dist/leaflet-src.js"
+  ],
+  "images":[
+    "dist/images/layers-2x.png",
+    "dist/images/layers.png",
+    "dist/images/marker-icon-2x.png",
+    "dist/images/marker-icon.png",
+    "dist/images/marker-shadow.png"
+  ],
+  "styles":[
+    "dist/leaflet.css"
+  ],
+  "main": "dist/leaflet-src.js"
+}
\ No newline at end of file
diff --git a/build/publish.sh b/build/publish.sh
new file mode 100755
index 0000000..bbac38a
--- /dev/null
+++ b/build/publish.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+#make sure deps are up to date
+rm -r node_modules
+npm install
+
+# get current version
+ VERSION=$(node --eval "console.log(require('./package.json').version);")
+# Build
+git checkout -b build
+npm test || exit 1
+npm run prepublish
+git add dist/leaflet-src.js dist/leaflet.js -f
+
+# create the bower and component files
+copyfiles -u 1 build/*.json ./
+tin -v $VERSION
+git add component.json bower.json -f
+
+git commit -m "build $VERSION"
+
+# Tag and push
+echo git tag $VERSION
+# git push --tags git at github.com:leaflet/leaflet.git $VERSION
+
+# # # Publish JS modules
+# npm publish
+
+# # # Cleanup
+# git checkout master
+# git branch -D build
\ No newline at end of file
diff --git a/package.json b/package.json
index b726bb5..4f77938 100644
--- a/package.json
+++ b/package.json
@@ -8,13 +8,19 @@
     "uglify-js": "~2.4.3",
     "mocha": "~1.14.0",
     "happen": "~0.1.3",
-    "karma": "~0.10.4",
-    "karma-mocha": "~0.1.0"
+    "karma": "~0.12.0",
+    "karma-mocha": "~0.1.1",
+    "karma-coverage": "~0.2.0",
+    "karma-phantomjs-launcher": "^0.1.2",
+    "karma-chrome-launcher": "^0.1.2",
+    "tin": "^0.4.0",
+    "copyfiles": "0.0.1"
   },
   "main": "dist/leaflet-src.js",
   "scripts": {
     "test": "jake test",
-    "prepublish": "jake build"
+    "prepublish": "jake build",
+    "publish": "./build/publish.sh"
   },
   "repository": {
     "type": "git",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git



More information about the Pkg-javascript-commits mailing list