GithubHelp home page GithubHelp logo

Here is builder in nodejs about locutus HOT 11 CLOSED

locutusjs avatar locutusjs commented on May 18, 2024
Here is builder in nodejs

from locutus.

Comments (11)

liverbool avatar liverbool commented on May 18, 2024

small add for build by packages you want.
https://gist.github.com/liverbool/6256341

from locutus.

bmatusiak avatar bmatusiak commented on May 18, 2024

cool!

from locutus.

bmatusiak avatar bmatusiak commented on May 18, 2024

i few more tweaks and we can add this to a PR πŸ˜„

from locutus.

kvz avatar kvz commented on May 18, 2024

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.

bmatusiak avatar bmatusiak commented on May 18, 2024

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.

bmatusiak avatar bmatusiak commented on May 18, 2024

also if you can give me a short list of arguments you want to use that would be good too

from locutus.

kvz avatar kvz commented on May 18, 2024

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.

liverbool avatar liverbool commented on May 18, 2024

++1

// declare dependencies with this format: [package,package.name]
--include [array,datetime,...]
--exclude [array,var.is_array,var.is_object]

from locutus.

bmatusiak avatar bmatusiak commented on May 18, 2024

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.

liverbool avatar liverbool commented on May 18, 2024

ok, up to you and thanks for make my life easy.
πŸ‘

from locutus.

kvz avatar kvz commented on May 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.