add publish script for component and bower
This reverts commit 5543a1637b42423f97a01e2dd29acd7c302cc73e.
This commit is contained in:
parent
cf68863403
commit
ce4b77fe81
2
.gitignore
vendored
2
.gitignore
vendored
@ -11,3 +11,5 @@ coverage/
|
|||||||
*.js.html
|
*.js.html
|
||||||
index.html
|
index.html
|
||||||
.mailmap
|
.mailmap
|
||||||
|
bower.json
|
||||||
|
component.json
|
23
build/bower.json
Normal file
23
build/bower.json
Normal file
@ -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"
|
||||||
|
]
|
||||||
|
}
|
19
build/component.json
Normal file
19
build/component.json
Normal file
@ -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"
|
||||||
|
}
|
31
build/publish.sh
Executable file
31
build/publish.sh
Executable file
@ -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@github.com:leaflet/leaflet.git $VERSION
|
||||||
|
|
||||||
|
# # # Publish JS modules
|
||||||
|
# npm publish
|
||||||
|
|
||||||
|
# # # Cleanup
|
||||||
|
# git checkout master
|
||||||
|
# git branch -D build
|
@ -12,13 +12,16 @@
|
|||||||
"karma-mocha": "~0.1.1",
|
"karma-mocha": "~0.1.1",
|
||||||
"karma-coverage": "~0.2.0",
|
"karma-coverage": "~0.2.0",
|
||||||
"karma-phantomjs-launcher": "^0.1.2",
|
"karma-phantomjs-launcher": "^0.1.2",
|
||||||
"karma-chrome-launcher": "^0.1.2"
|
"karma-chrome-launcher": "^0.1.2",
|
||||||
|
"tin": "^0.4.0",
|
||||||
|
"copyfiles": "0.0.1"
|
||||||
},
|
},
|
||||||
"main": "dist/leaflet-src.js",
|
"main": "dist/leaflet-src.js",
|
||||||
"style": "dist/leaflet.css",
|
"style": "dist/leaflet.css",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "jake test",
|
"test": "jake test",
|
||||||
"prepublish": "jake build"
|
"prepublish": "jake build",
|
||||||
|
"publish": "./build/publish.sh"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
Loading…
Reference in New Issue
Block a user