An open API service indexing awesome lists of open source software.

https://github.com/ai/file-container

Store different languages in one source file
https://github.com/ai/file-container

Last synced: 8 months ago
JSON representation

Store different languages in one source file

Awesome Lists containing this project

README

          

# File Container [![Build Status](https://travis-ci.org/ai/file-container.svg)](https://travis-ci.org/ai/file-container)

Parser for file format to store different languages in one file:

```js
$('.signup').click(function () {
app.showSignup();
});

sass:
.signup
background: green
color: white

haml:
%a.signup( href="#signup" )
Signup
```

```js
var parser = require('file-container');
var control = parser(code);

control.main //=> $('.signup').click(function () {
//=> app.showSignup();
//=> });
control.sass //=> .signup
//=> background: green
//=> color: white
control.haml //=> %a.signup( href="#signup" )
//=> Signup
```


Sponsored by Evil Martians