Skip to content

Commit

Permalink
Merge pull request elementalui#84 from nkbt/bower
Browse files Browse the repository at this point in the history
Bower support, fixes elementalui#39
  • Loading branch information
JedWatson committed Oct 21, 2015
2 parents 529b1b0 + 2f7d5b5 commit 42bb9d8
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ src
gulpfile.js
npm-debug.log
package.json
/scripts/
/bower.json
35 changes: 35 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "elemental",
"version": "0.0.0",
"description": "React UI Framework",
"main": "elemental.js",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/elementalui/elemental-dist.git"
},
"dependencies": {
"react": "^0.14"
},
"keywords": [
"react",
"react-component",
"ui",
"framework",
"controls",
"element",
"css",
"less"
],
"authors": [
"Jed Watson"
],
"homepage": "http://elemental-ui.com",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"publish:npm": "gulp publish:npm",
"publish:site": "gulp publish:examples",
"publish:tag": "gulp publish:tag",
"publish:bower": "./scripts/bower.sh",
"release": "gulp release",
"site": "gulp dev:server",
"start": "gulp dev",
Expand Down
25 changes: 25 additions & 0 deletions scripts/bower.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

ORG="elementalui"
NAME=$(echo 'console.log(require("./package.json").name)' | node)
REPO="$NAME-dist"
VERSION=$(echo 'console.log(require("./package.json").version)' | node)

echo ORG=$ORG
echo NAME=$NAME
echo REPO=$REPO
echo VERSION=$VERSION

pushd .
rm -rf /tmp/$ORG/$REPO
mkdir -p /tmp/$ORG/$REPO
git clone [email protected]:$ORG/$REPO.git /tmp/$ORG/$REPO
npm run build
cp -f ./dist/* /tmp/$ORG/$REPO
cp -f ./bower.json /tmp/$ORG/$REPO
cd /tmp/$ORG/$REPO
git add .
git commit -m "Release $VERSION"
bower version $VERSION
git push && git push --tags
popd

0 comments on commit 42bb9d8

Please sign in to comment.