Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Ever wanted to have an #import
statement in your favorite language which
compiles into JavaScript that works like #include
in other languages?
Well now you have one! Importing files and concatenating them in the right
place is now as easy as:
#import "some_js_file"
#import "another_one"
#import "even_coco_is_supported"
#import "and_livescript"
# some code using the imported files here...
In JavaScript, the //import
directive is used instead of #import
.
Be sure to install the languages you wish to use with npm install -g
.
compile.extensions
object.
src/jspackage.coffee
and submit a pull
request.--watch
mode which automatically recompiles source files when
they change.--lib
.When installed with npm install jspackage -g
, a command line tool called
jspackage
will be made available.
Usage: jspackage input_file output_file [options]
Available options:
-h, --help shows this help section
-b, --bare compile without a top-level function wrapper
-w, --watch watch source files and recompile when any change
-l, --lib PATH add an additional search directory for source files
http = require 'http'
{compile} = require 'jspackage'
server = http.createServer (req, res) ->
res.writeHead(200)
compile {mainfile}, (err, compiled_code) ->
if err
res.end 'throw unescape("' + escape(err.toString()) + '");'
else
res.end compiled_code
server.listen(8080)
To add out-of-the-box support for another language, add it to the bottom of
src/jspackage.coffee
and submit a pull request.
To add support by wrapping the code, add an entry to the extensions
object:
{extensions} = require 'jspackage'
extensions['.lua'] =
compile: (code) -> lua.compile(code)
import_re: /^--import (".+")$/gm
To compile and watch:
coffee -wbco . src/
To run the tests:
npm test
Licensed under the MIT license.
FAQs
build tool which adds client-side import syntax
The npm package jspackage receives a total of 19 weekly downloads. As such, jspackage popularity was classified as not popular.
We found that jspackage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.