Permalink
Browse files

Merge branch 'site-templates'

Conflicts:
	.gitignore
	Makefile
	README.md
	package.json
  • Loading branch information...
2 parents 6adf103 + cc217d3 commit 5c55f11fd0126d5b0eb1b5bde0d688455dd4a297 @paularmstrong committed Dec 8, 2012
View
@@ -6,3 +6,5 @@ tests/browser/*.test.js
lib-cov/*
tests/coverage.html
dist/*
+tmp_build/*
+docs/css/*
View
@@ -1,8 +1,18 @@
+SHA := $(shell git rev-parse HEAD)
+THIS_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
+
+TMP = 'tmp_build'
+REMOTE = origin
+BRANCH = gh-pages
+
all:
@npm install -d
@cp scripts/githooks/* .git/hooks/
@chmod -R +x .git/hooks/
+clean:
+ @rm -rf ${TMP}
+
build:
@scripts/browser.sh
@@ -15,7 +25,7 @@ test:
test-browser: build
@node_modules/mocha-phantomjs/bin/mocha-phantomjs tests/browser/index.html
-files := $(shell find . -name '*.js' ! -path "*node_modules/*" ! -path "*dist/*" ! -path "*tests/browser/*")
+files := $(shell find . -name '*.js' ! -path "./node_modules/*" ! -path "./dist/*" ! -path "./tests/browser/*" ! -path "./docs*")
lint:
@node_modules/nodelint/nodelint ${files} --config=scripts/config-lint.js
@@ -34,4 +44,23 @@ coverage:
speed:
@node tests/speed.js
-.PHONY: all build test test-browser lint coverage speed
+docs: all clean build
+ @mkdir -p docs/css
+ @node_modules/.bin/lessc --yui-compress --include-path=docs/less docs/less/swig.less docs/css/swig.css
+ @node_modules/.bin/still docs -o ${TMP} -i "layout" -i "json" -i "less"
+ @mkdir -p ${TMP}/js
+ @cp dist/swig.* ${TMP}/js/
+ @cp node_modules/zepto/zepto.min.js ${TMP}/js/lib
+ @git checkout ${BRANCH}
+ @cp -r ${TMP}/* ./
+ @rm -rf ${TMP}
+ @git add .
+ @git commit -n -am "Automated build from ${SHA}"
+ @git push ${REMOTE} ${BRANCH}
+ @git checkout ${THIS_BRANCH}
+
+port = 3000
+test-docs:
+ @node_modules/.bin/still-server docs/ -p ${port} -o
+
+.PHONY: all build test test-browser lint coverage speed docs test-docs
View
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
Swig [![Build Status](https://secure.travis-ci.org/paularmstrong/swig.png)](http://travis-ci.org/paularmstrong/swig)
====
@@ -74,3 +75,38 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
[1]: http://paularmstrong.github.com/node-templates/
+=======
+Swig Website
+============
+
+Use Swig to build the Website for Swig and publish to GitHub pages. Uses [still](https://github.com/paularmstrong/still).
+
+Getting Started
+---------------
+
+Install dependencies
+
+```
+make
+```
+
+Editing & Testing
+-----------------
+
+Start the server
+
+```
+make run
+```
+
+Edit and reload pages at will.
+
+Publishing
+----------
+
+Publish to gh-pages. Requires swig main repo push access.
+
+```
+make build
+```
+>>>>>>> site-templates
Oops, something went wrong.

0 comments on commit 5c55f11

Please sign in to comment.