smartt / jsmacro Goto Github PK
View Code? Open in Web Editor NEWA JavaScript preprocessor
Home Page: http://www.eriksmartt.com/blog/archives/tag/jsmacro
License: MIT License
A JavaScript preprocessor
Home Page: http://www.eriksmartt.com/blog/archives/tag/jsmacro
License: MIT License
Hi,
It would be nice to be able to pull in dependencies into a file before processing it. I just looked at the code, so I'm not sure how feasible this is.
Thanks!
This, of course, needs a test case, and a definition of "slow". A quick look at crunching a yui-min.js field took:
I am surprised to see any one file taking over a second.
(For what it's worth, python2.6 is normally the fastest for me at running the test suite; and python3.2 is the slowest.)
As far as I know, at the moment there is no way to enable a section of code if two or more variables are defined.
let's say I want to have a generic "DEBUG" compilation mode wich, if enabled, automatically "enable" the logs, enable some UI modifications, etc. I also want some more fine grained variables; something along the lines of ENABLE_LOGS, ENABLE_UI_NEXT etc...
At the moment I need to duplicate the code and do something like
...normal stuff...
//#ifdef DEBUG
console.log('log debug stuff');
//#endif
//#ifdef ENABLE_LOGS
console.log('log debug stuff');
//#endif
...normal stuff...
it would be neat, for me, to do something like
//#ifdef DEBUG or ENABLE_LOGS
console.log('log debug stuff');
//#endif
I have no specified sintax for the boolean combination, if "and" and "not" or "&&" and "||" or some variant are fine
Example:
//@include "../some file.js"
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.