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
- Host: GitHub
- URL: https://github.com/ai/file-container
- Owner: ai
- License: mit
- Created: 2014-08-24T18:45:38.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-12-18T12:52:39.000Z (over 11 years ago)
- Last Synced: 2025-01-13T20:52:11.663Z (over 1 year ago)
- Language: JavaScript
- Size: 126 KB
- Stars: 14
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# File Container [](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
```