Comments (11)
small add for build by packages you want.
https://gist.github.com/liverbool/6256341
from locutus.
cool!
from locutus.
i few more tweaks and we can add this to a PR π
from locutus.
I'd probably accept a builder in ./_tools/bundler/bundler.js
as a pr. But if you do decide to pr, please make sure the coding standards are applied, and use an npm like cli so it's behavior can be easily controlled via commandline arguments. Putting it in a subdir also allows having a dedicated package.json
to declare it's dependencies.
from locutus.
sounds good! my thoughts exactly...
coding standards errors show up in my IDE so thats not a problem,
i do need to add a proper header.
but when you say npm like cli
can you give me a better idea on how you want it because theres about 2 or 3 different ways it can be done
ex
npm install
bundler --out PHPJS.js
let me know if this is what you want above
from locutus.
also if you can give me a short list of arguments you want to use that would be good too
from locutus.
I used cli
here and kinda liked it, could be worth checking out for argument parsing, progress animations, etc. It's got a lot of cool cli stuff built in.
as for the options, i noticed you guys already made it optional to minify, and to include different categories. so maybe. it would also be cool if you can choose export format.
--include array/*
--include var/is_array
--exclude array/array_uintersect_uassoc
--minify
--format commonjs | globalscope | object
--output <filename> | - for STDOUT
I realise it's much, but just consider it as ideas you can use.
One other thing to consider that just popped into my head. Maybe grunt can do the heavy lifting here. It seems to be the bundler of choice nowadays, and I would not be surprised if we can just put this in one Gruntfile.js
..
from locutus.
++1
// declare dependencies with this format: [package,package.name]
--include [array,datetime,...]
--exclude [array,var.is_array,var.is_object]
from locutus.
i was going to use var argv = require('optimist').argv;
for argument parsing
--out = argv.out;
or
-o = argv.o;
and then ill resubmit a updated gist..
and show you what i come up with
from locutus.
ok, up to you and thanks for make my life easy.
from locutus.
Hey, we support npm now through https://npmjs.org/phpjs.
You can build your own via
node bin/phpjs.js --action buildnpm --output build/npm.js
# or
node bin/phpjs.js --action buildnpm --output build/php_string.js --category strings
from locutus.
Related Issues (20)
- bin2hex() fails with unicode characters like Γ Γ Γ Γ¦ ΓΈ Γ₯
- "contributing guidelines coding standards" url broken HOT 2
- [php/array/array_intersect.js] Simpler option HOT 3
- float bug and missing Q code HOT 2
- Linting upgrade HOT 1
- Failure to recognize some format and extract values in sscanf HOT 2
- [c/stdio/sprintf] %% consumes an extra arg HOT 5
- Question: Is strtotime Algorithmically Equivalent to the PHP Version? HOT 2
- hex2bin() Never Returns If More Than 1 Million Chars HOT 3
- Percentage for "similar_text" HOT 2
- Trying to get in touch regarding a security issue HOT 3
- strip_tags has some differences with php's version HOT 1
- Invalid syntax '/php/_helpers/_bc' in released '_locutus_shared/_locutus_shared_bc.js' HOT 2
- TypeError: Cannot read property '$locutus' of undefined HOT 1
- BUG : php function unserialize not working HOT 6
- php similar_text performance HOT 4
- Invalid serialization for floating numbers HOT 1
- Help - How install with Ionic? HOT 1
- bcmul is not working with decimal HOT 2
- fmod: toFixed() digits argument must be between 0 and 100
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from locutus.