diff --git a/.npmignore b/.npmignore index 77df6f8..bc04553 100644 --- a/.npmignore +++ b/.npmignore @@ -6,3 +6,5 @@ src gulpfile.js npm-debug.log package.json +/scripts/ +/bower.json diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..82af880 --- /dev/null +++ b/bower.json @@ -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" + ] +} diff --git a/package.json b/package.json index 81f0338..074db2e 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/scripts/bower.sh b/scripts/bower.sh new file mode 100755 index 0000000..28b0ea4 --- /dev/null +++ b/scripts/bower.sh @@ -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 git@github.com:$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