Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-query-js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-query-js

This plugin provides automatic source maps, concatenation, minification and compiling with Babel.

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-query-js

JS plugin for gulp-query

Uses babel and uglify

This plugin provides automatic source maps, concatenation, minification and compiling with Babel.

P.S. Try gulp-query-js-buble with the blazing fast, batteries-included ES2015 compiler

npm install gulp-query gulp-query-js

Example

Paste the code into your gulpfile.js and configure it

let build = require('gulp-query')
  , js = require('gulp-query-js')
;
build((query) => {
    query.plugins([js])
      .js('src/js/app.js','js/','app')
    
      // uses own babel config and creates with new name
      .js('src/js/admin.js','js/undercover.js',{
        babel: {
          presets: ['env']
        }
      })
    
      // Config as object
      .js({
        from: 'src/js/main.js',
        to: 'js/',
        name: 'main'
      })
      
      // Multiple files
      .js(['src/js/app.js','src/js/main.js'],'js/')
      
      // Multiple files and combine
      .js(['src/js/app.js','src/js/main.js'],'js/concat.js')
    ;
});

And feel the freedom

gulp
gulp --production // For production (minification)
gulp watch // Watching change
gulp js // Only for js
gulp js:app // Only for app.js
gulp js:admin js:main watch // Watching change only for admin.js and main.js
...

Options

.js({
    name: "task_name", // For gulp js:task_name 
    from: "src/js/app.js", // ["src/js/f1.js", "src/js/f2.js"]
    to: "js/", // set filename "js/concat.js" -- for concat or rename
    source_map: true,
    source_map_type: 'inline',
    full: false, // if set true is without compress in prod
    babel: {
      presets: ['env']
    }
})

Keywords

FAQs

Package last updated on 05 Jan 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc