-
Notifications
You must be signed in to change notification settings - Fork 861
Contributing
Building remark requires you to have the following software installed:
In addition to cloning the remark repository, it's git sub modules and node package dependencies must be installed as well:
git clone https://github.com/gnab/remark.git
cd remark
git submodule update --init --recursive
npm install
To build remark, there's one final command to execute:
node make
This will trigger the all
target in the Makefile-like make.js file producing remark.js and the minified remark.min.js
The all
target comprises the targets lint
, test
, bundle
and minify
, any of which can be run individually by issuing node make <target>
.
In addition to building remark itself, there's an additional highlighter
target that will bundle Highlight.js into the src/remark/highlighter.js file.
node make highlighter
This will bundle Highlight.js itself, its styles (with a few exceptions), and the languages specified in the package.json file:
{
...
"config": {
"highlighter": {
"languages": [
"javascript",
"ruby",
...
]
}
}
}
body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
</style>
Code:
def add(a,b)
a + b
end
</textarea>
<script src="https://remarkjs.com/downloads/remark-latest.min.js">
</script>
<script>
var slideshow = remark.create();
</script>