mjstahl / lavascript Goto Github PK
View Code? Open in Web Editor NEWLavaScript is Literate JavaScript
Home Page: https://npm.im/lavascript
License: MIT License
LavaScript is Literate JavaScript
Home Page: https://npm.im/lavascript
License: MIT License
https://github.com/mjstahl/lavascript/blob/master/bin.js#L37
should be console.error
not console.log
Something along the lines of
// Generated by LavaScript v0.4.4 - DO NOT EDIT
Or maybe it is helpful to point them to the file that should be used for editing
// DO NOT EDIT
// Generated by LavaScript v0.4.4
// From '../src/bin.js.md'
./loader.js.md -> dist/loader.js
./node_modules/lavascript/bin.js.md -> dist/node_modules/lavascript/bin.js
./node_modules/lavascript/extract.js.md -> dist/node_modules/lavascript/extract.js
Having a conversation with @technicalpickles:
@technicalpickles
I was wondering what happens when you get failures with line numbers, guessing those will be totally wrong.@mjstahl
Yeah, I need to generate source maps@technicalpickles
ahhh, that is probably wht that is for, huh?I was going to say, in ruby land, I’ve seen places where replace the non-code parts with code comments so it’s the same number of lines
$ lavascript . dist
/Users/mark/.nvm/versions/node/v10.15.3/bin/lavascript: line 1: //: is a directory
/Users/mark/.nvm/versions/node/v10.15.3/bin/lavascript: line 2: //: is a directory
/Users/mark/.nvm/versions/node/v10.15.3/bin/lavascript: line 4: syntax error near unexpected token `('
/Users/mark/.nvm/versions/node/v10.15.3/bin/lavascript: line 4: `const chalk = require('chalk')'
Another great idea from @technicalpickles:
I wonder if you could do something with editors to be able to fold the markdown blocks, so you can see the code all at once w/o the writing
that might defeat the point tho
Add support for reading a "lavascript"
property from package.json
.
const pkg = require('./package.json')
if (process.argv.length < 4) {
const lavascript = pkg.lavascript
if (lavascript) {
// get srcDir, and destDir from lavascript object
} else {
// print usage
}
}
Can be used https://codesandbox.io
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.