瀏覽代碼

Add build.js and update Makefile

So that we can make releases
JC Brand 12 年之前
父節點
當前提交
c5604515cc
共有 2 個文件被更改,包括 22 次插入3 次删除
  1. 4 3
      Makefile
  2. 18 0
      build.js

+ 4 - 3
Makefile

@@ -1,6 +1,3 @@
-# Makefile for Sphinx documentation
-#
-
 # You can set these variables from the command line.
 SPHINXOPTS    =
 SPHINXBUILD = sphinx-build
@@ -18,6 +15,7 @@ I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ./docs/source
 
 help:
 	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  release    to make a new minified release"
 	@echo "  html       to make standalone HTML files"
 	@echo "  dirhtml    to make HTML files named index.html in directories"
 	@echo "  singlehtml to make a single large HTML file"
@@ -38,6 +36,9 @@ help:
 	@echo "  linkcheck  to check all external links for integrity"
 	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
 
+release: 
+	r.js -o build.js
+
 clean:
 	-rm -rf $(BUILDDIR)/*
 

+ 18 - 0
build.js

@@ -0,0 +1,18 @@
+({
+    baseUrl: ".",
+    paths: {
+        "jquery": "Libraries/require-jquery",
+        "sjcl": "Libraries/sjcl",
+        "tinysort": "Libraries/jquery.tinysort",
+        "underscore": "Libraries/underscore",
+        "backbone": "Libraries/backbone",
+        "localstorage": "Libraries/backbone.localStorage",
+        "strophe": "Libraries/strophe",
+        "strophe.muc": "Libraries/strophe.muc",
+        "strophe.roster": "Libraries/strophe.roster",
+        "strophe.vcard": "Libraries/strophe.vcard",
+        "strophe.disco": "Libraries/strophe.disco"
+    },
+    name: "main",
+    out: "converse.full.min.js"
+})