Created
April 19, 2014 20:04
-
-
Save Carreau/11095832 to your computer and use it in GitHub Desktop.
To build IPython Notebook themes. `node maketheme.js <variable.less> <output file>`
This file contains hidden or 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
| #!/usr/env node | |
| var less = require('less') | |
| var fs = require('fs'); | |
| var parser = new(less.Parser)({ | |
| paths : ['.','IPython/html/static/style/'], | |
| filename: 'ipython.less' | |
| }); | |
| var otherimp = process.argv[2]; | |
| var fullimport = "@import 'ipython';@import 'style' ; @import '"+otherimp+"';"; | |
| //console.log(fullimport); | |
| parser.parse(fullimport, function(e, tree){ | |
| fs.writeFile(process.argv[3], tree.toCSS({compress: false}), function(err) { | |
| if(err) { | |
| console.log(err); | |
| } else { | |
| console.log("The file was saved!"); | |
| } | |
| }); | |
| console.log(); | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment