Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

combine and simplify build routines

  • Loading branch information...
commit 282a5e41655f675dc0d68b6d0f8ef83b826855bc 1 parent 6b70865
@michaelsbradleyjr michaelsbradleyjr authored
View
1  .gitignore
@@ -11,7 +11,6 @@
.lein*
mori*.js
!/spec/mori*.js
-tmp.js
*.swp
.#*
_site
View
5 .npmignore
@@ -8,9 +8,8 @@
/checkouts
/.lein-deps-sum
.lein*
-mori_dev.js
-mori_rel.js
-tmp.js
+mori.bare.js
+mori.dev.js
*.swp
.#*
_site
View
4 package.json
@@ -41,10 +41,6 @@
"scripts": {
"build": "./scripts/build.sh",
"build-clean": "./scripts/build_clean.sh",
- "build-node": "./scripts/build_node.sh",
- "build-node-clean": "rm -f mori.node.js && ./bin/lein_prefer cljsbuild clean && npm run-script build-node",
- "build-web": "./scripts/build_web.sh",
- "build-web-clean": "rm -f mori.js && ./bin/lein_prefer cljsbuild clean && npm run-script build-web",
"clean": "./scripts/clean.sh",
"prepublish": "npm run-script build-clean",
"test": "jasmine-node spec"
View
9 project.clj
@@ -6,18 +6,13 @@
:cljsbuild
{:builds
[{:source-paths ["src"],
- :id "tmp",
- :compiler
- {:output-to "tmp.js",
- :optimizations :advanced}}
- {:source-paths ["src"],
:id "dev",
:compiler
- {:output-to "mori_dev.js",
+ {:output-to "mori.dev.js",
:optimizations :whitespace}}
{:source-paths ["src"],
:id "release",
:compiler
- {:output-to "mori_rel.js",
+ {:output-to "mori.bare.js",
:optimizations :advanced
:pretty-print false}}]})
View
13 scripts/build.ps1
@@ -1,14 +1,11 @@
lein cljsbuild clean
-lein cljsbuild once tmp
+lein cljsbuild once release
+$moribarejs = Get-Content mori.bare.js
ni "mori.js" -type file -force
ac "mori.js" "(function() {"
-$tmpjs = Get-Content tmp.js
-ac "mori.js" $tmpjs
+ac "mori.js" $moribarejs
ac "mori.js" "}).call(this);"
-rm tmp.js
-lein cljsbuild once release
ni "mori.node.js" -type file -force
-$reljs = Get-Content mori_rel.js
-ac "mori.node.js" $reljs
+ac "mori.node.js" $moribarejs
ac "mori.node.js" ";module.exports = this.mori;"
-rm mori_rel.js
+rm mori.bare.js
View
18 scripts/build.sh
@@ -1,4 +1,18 @@
#!/bin/sh
-./scripts/build_node.sh
-./scripts/build_web.sh
+./bin/lein_prefer deps
+./bin/lein_prefer cljsbuild once release
+
+echo "Finalizing mori.js"
+
+(echo "(function() {"; cat mori.bare.js; echo "}).call(this);") > mori.js
+
+echo "Finalizing mori.node.js"
+
+(cat mori.bare.js; echo ";module.exports = this.mori;") > mori.node.js
+
+echo "Deleting mori.bare.js"
+
+rm mori.bare.js
+
+echo "Build finished."
View
14 scripts/build_node.sh
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-./bin/lein_prefer deps
-./bin/lein_prefer cljsbuild once release
-
-echo "Finalizing mori.node.js"
-
-(cat mori_rel.js; echo ";module.exports = this.mori;") > mori.node.js
-
-echo "Deleting mori_rel.js"
-
-rm mori_rel.js
-
-echo "Build finished."
View
14 scripts/build_web.sh
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-./bin/lein_prefer deps
-./bin/lein_prefer cljsbuild once tmp
-
-echo "Finalizing mori.js"
-
-(echo "(function() {"; cat tmp.js; echo "}).call(this);") > mori.js
-
-echo "Deleting tmp.js"
-
-rm tmp.js
-
-echo "Build finished."

0 comments on commit 282a5e4

Please sign in to comment.
Something went wrong with that request. Please try again.