GithubHelp home page GithubHelp logo

JavaScript Concatenation? about hugulp HOT 4 CLOSED

jbrodriguez avatar jbrodriguez commented on June 25, 2024
JavaScript Concatenation?

from hugulp.

Comments (4)

jbrodriguez avatar jbrodriguez commented on June 25, 2024

If you're using the default .hugulprc, try putting your js files in assets/scripts.

Does that work ?

from hugulp.

prime31 avatar prime31 commented on June 25, 2024

That is what I was doing and it just seems to jslint the files and copy them in static/scripts but not concat them.
screen shot 2018-03-27 at 2 06 48 pm

from hugulp.

jbrodriguez avatar jbrodriguez commented on June 25, 2024

You know what, you're absolutely right.

In watch mode, it does jshint only.

In build mode, It's uglifying each individual file, but it's not concatenating it.

I'll probably have some time to fix it by the weekend.

It's a small change

    .pipe(uglify())
+   .pipe(concat('scripts.js'))
    .pipe(size({ title: 'scripts: ' }))

right around here

https://github.com/jbrodriguez/hugulp/blob/master/gulp/build.js#L91

from hugulp.

prime31 avatar prime31 commented on June 25, 2024

Bingo. Works like a champ! Thanks! If I wasnt such a Node/Gulp newbie I would have found that myself! I assume that this will just concat in filename order.

Totally unrelated but it would be a pretty nice feature to be able to have it work like scss files: an underscore in the filename ignores it and then a script with includes makes ordering the files nice and simple.

from hugulp.

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.