
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
orangejuice
Advanced tools
A minimal static site generator inspired by Middleman and Sprockets, compatible with gulp plugins.
A minimal static site generator inspired by Middleman and Sprockets, compatible with some gulp plugins. The project is currently very experimental, use it for fun. Things will change.
This project is an attempt to port a subset of middleman to the node.js ecosystem.
We are specifically targeting the features that are useful when building single page JS apps.
If you already love middleman and Sprockets but want/need to use node.js, this might be interesting to you.
The name "Orangejuice" because of gulp and you know, it's healthy and tasty.
Features
Orangejuice favors convention over configuration. For example, Grunt & Gulp provides powerful API's for building very customized build scripts. This requires you to write a bit of code everytime you want your build system to do something new. Each step in the build pipeline is carefully orchestrated so every project becomes special. This means there's a lot of copy-pasta going on when starting something new.
Orangejuice is inspired by Sprockets and uses a convention approach: A set of simple rules are used to determine what files to build, how to build them and where to put them. Files are processed bases on their filename extensions.
Example: "index.html.ejs" will be run through the EJS processor. These processors are gulp plugins, which allows us to leverage a large collection of great existing plugins. If you want to teach Orangejuice something new, you just have to define the mapping between a file ending and a gulp plugin. That's it!
npm install orangejuice
Your project should have a so called "ojfile.js" which is used to configure and run Orangejuice.
Here's a minimal ojfile with comments:
#!/usr/bin/env node
var oj = require('orangejuice');
// The directory with your source tree, relative to the ojfile.
oj.sourcePath = 'source';
// The directory you want to build to, relative to the ojfile.
oj.buildPath = 'build';
Here's another ojfile that uses a gulp plugin to compile html files into the angular template cache. In this case the The files are named .html.ngt so we register the processor for the 'ngt' file ending.
#!/usr/bin/env node
var oj = require('orangejuice');
var html2js = require('gulp-html2js');
oj.sourcePath = 'source';
oj.buildPath = 'build';
oj.preProcessor('ngt', function() {
return html2js({
base: 'source'
})
});
Make your ojfile.js executable:
chmod +x ojfile.js
Build once and quit:
./ojfile.js build
Start the server:
./ojfile.js
Start the server on a custom port:
./ojfile.js server -p 1111
We've made an Angular.js template project that builds with Orangejuice.
It's the best reference to how Orangejuice works right now:
https://github.com/jpettersson/orangejuice-ng-template
Run the bats e2e tests:
./tests.sh
Licensed under the MIT license.
Version 0.4.0
FAQs
A minimal static site generator inspired by Middleman and Sprockets, compatible with gulp plugins.
The npm package orangejuice receives a total of 1 weekly downloads. As such, orangejuice popularity was classified as not popular.
We found that orangejuice demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.