Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
200 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,83 @@ | ||
[Package] | ||
name = "hastyscribe" | ||
version = "1.11.0" | ||
author = "Fabio Cevasco" | ||
description = "Self-contained markdown compiler generating self-contained HTML documents" | ||
import | ||
ospaths | ||
|
||
template thisModuleFile: string = instantiationInfo(fullPaths = true).filename | ||
|
||
when fileExists(thisModuleFile.parentDir / "src/hastyscribepkg/config.nim"): | ||
# In the git repository the Nimble sources are in a ``src`` directory. | ||
import src/hastyscribepkg/config | ||
else: | ||
# When the package is installed, the ``src`` directory disappears. | ||
import hastyscribepkg/config | ||
|
||
# Package | ||
|
||
version = pkgVersion | ||
author = pkgAuthor | ||
description = pkgDescription | ||
license = "MIT" | ||
bin = @["hastyscribe"] | ||
srcDir = "src" | ||
installFiles = @["nifty.json"] | ||
|
||
requires "nim >= 0.19.0" | ||
|
||
before install: | ||
exec "nifty install" | ||
|
||
# Tasks | ||
|
||
const | ||
compile = "nim c -d:release" | ||
linux_x86 = "--cpu:i386 --os:linux" | ||
linux_x64 = "--cpu:amd64 --os:linux" | ||
linux_arm = "--cpu:arm --os:linux" | ||
windows_x64 = "--cpu:amd64 --os:windows" | ||
macosx_x64 = "" | ||
hs = "src/hastyscribe" | ||
hs_file = "src/hastyscribe.nim" | ||
zip = "zip -X" | ||
|
||
proc shell(command, args: string, dest = "") = | ||
exec command & " " & args & " " & dest | ||
|
||
proc filename_for(os: string, arch: string): string = | ||
return "hastyscribe" & "_v" & version & "_" & os & "_" & arch & ".zip" | ||
|
||
task windows_x64_build, "Build HastyScribe for Windows (x64)": | ||
shell compile, windows_x64, hs_file | ||
|
||
bin = "hastyscribe" | ||
task linux_x86_build, "Build HastyScribe for Linux (x86)": | ||
shell compile, linux_x86, hs_file | ||
|
||
task linux_x64_build, "Build HastyScribe for Linux (x64)": | ||
shell compile, linux_x64, hs_file | ||
|
||
task linux_arm_build, "Build HastyScribe for Linux (ARM)": | ||
shell compile, linux_arm, hs_file | ||
|
||
task macosx_x64_build, "Build HastyScribe for Mac OS X (x64)": | ||
shell compile, macosx_x64, hs_file | ||
|
||
[Deps] | ||
Requires: "nim >= 0.19.0" | ||
task release, "Release HastyScribe": | ||
echo "\n\n\n WINDOWS - x64:\n\n" | ||
windows_x64_buildTask() | ||
shell zip, filename_for("windows", "x64"), hs & ".exe" | ||
shell "rm", hs & ".exe" | ||
echo "\n\n\n LINUX - x64:\n\n" | ||
linux_x64_buildTask() | ||
shell zip, filename_for("linux", "x64"), hs | ||
shell "rm", hs | ||
echo "\n\n\n LINUX - x86:\n\n" | ||
linux_x86_buildTask() | ||
shell zip, filename_for("linux", "x86"), hs | ||
shell "rm", hs | ||
echo "\n\n\n LINUX - ARM:\n\n" | ||
linux_arm_buildTask() | ||
shell zip, filename_for("linux", "arm"), hs | ||
shell "rm", hs | ||
echo "\n\n\n MAC OS X - x64:\n\n" | ||
macosx_x64_buildTask() | ||
shell zip, filename_for("macosx", "x64"), hs | ||
shell "rm", hs | ||
echo "\n\n\n ALL DONE!" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const | ||
pkgVersion* = "1.11.0" | ||
pkgAuthor* = "Fabio Cevasco" | ||
pkgDescription* = "Self-contained markdown compiler generating self-contained HTML documents" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
const | ||
stylesheet* = "../../packages/hastystyles/styles/hastyscribe.css".slurp | ||
hastyscribe_font* = "../../packages/hastystyles/fonts/hastyscribe.woff".slurp | ||
fa_solid_font* = "../../packages/hastystyles/fonts/fa-solid-900.woff".slurp | ||
fa_brands_font* = "../../packages/hastystyles/fonts/fa-brands-400.woff".slurp | ||
sourcecodepro_font* = "../../packages/hastystyles/fonts/SourceCodePro-Regular.woff".slurp | ||
sourcecodepro_it_font* = "../../packages/hastystyles/fonts/SourceCodePro-It.woff".slurp | ||
sourcecodepro_bold_font* = "../../packages/hastystyles/fonts/SourceCodePro-Bold.woff".slurp | ||
sourcecodepro_boldit_font* = "../../packages/hastystyles/fonts/SourceCodePro-BoldIt.woff".slurp | ||
sourcesanspro_font* = "../../packages/hastystyles/fonts/SourceSansPro-Light.woff".slurp | ||
sourcesanspro_bold_font* = "../../packages/hastystyles/fonts/SourceSansPro-Semibold.woff".slurp | ||
sourcesanspro_it_font* = "../../packages/hastystyles/fonts/SourceSansPro-LightIt.woff".slurp | ||
sourcesanspro_boldit_font* = "../../packages/hastystyles/fonts/SourceSansPro-SemiboldIt.woff".slurp | ||
watermark_style* = """ | ||
#container { | ||
position: relative; | ||
z-index: 0; | ||
} | ||
#container:after { | ||
content: ""; | ||
opacity: 0.1; | ||
z-index: -1; | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
bottom: 0; | ||
right: 0; | ||
background-image: url($1); | ||
background-repeat: no-repeat; | ||
background-position: center 70px; | ||
background-attachment: fixed; | ||
} | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"storage": "packages", | ||
"commands": { | ||
"build": { | ||
"name+configure.sh": { | ||
"pwd": "{{name}}", | ||
"cmd": "./configure.sh && make" | ||
} | ||
}, | ||
"install": { | ||
"git+src": { | ||
"cmd": "git clone {{src}} --depth 1" | ||
}, | ||
"git+src+tag": { | ||
"cmd": "git clone --branch {{tag}} {{src}} --depth 1" | ||
}, | ||
"curl+src+name": { | ||
"cmd": "curl {{src}} -o {{name}}" | ||
}, | ||
"_syntax": "install [<package>]", | ||
"_description": "Installs the specified package (or all mapped packages) to the storage directory." | ||
}, | ||
"upgrade": { | ||
"_syntax": "upgrade [<package>]", | ||
"_description": "Upgrades the specified previously-installed package (or all packages).", | ||
"git+name": { | ||
"cmd": "git pull", | ||
"pwd": "{{name}}" | ||
}, | ||
"curl+src+name": { | ||
"cmd": "curl {{src}} -o {{name}}" | ||
} | ||
} | ||
}, | ||
"packages": { | ||
"hastystyles": { | ||
"name": "hastystyles", | ||
"src": "https://github.com/h3rald/hastystyles.git", | ||
"git": true | ||
}, | ||
"discount": { | ||
"configure.sh": true, | ||
"name": "discount", | ||
"src": "https://github.com/Orc/discount.git", | ||
"tag": "v2.2.2", | ||
"git": true | ||
}, | ||
"niftylogger.nim": { | ||
"name": "niftylogger.nim", | ||
"src": "https://raw.githubusercontent.com/h3rald/nifty/master/lib/niftylogger.nim", | ||
"curl": true | ||
} | ||
} | ||
} |