New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@agence-webup/gulpy

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agence-webup/gulpy

## Install

  • 0.4.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by900%
Maintainers
2
Weekly downloads
 
Created
Source

Gulpy

Install

npm i -D @agence-webup/gulpy

Example

In your gulpfile.js:

const gulp = require('gulp')
const Gulpy = require('@agence-webup/gulpy')

// config
const gulpy = new Gulpy({
  publicFolder: 'dist',
  manifest: 'dist/rev-manifest.json',
  npmManifest: 'dist/npm-manifest.json'
})

// tasks
const sass = gulpy.sass('src/sass/style.scss', 'dist/css') // this will watch all .scss files in src/sass/**/*
const js = gulpy.js(['src/js/**/*', '!src/js/*.js'], 'dist/js')
const bundle = gulpy.bundle('src/js/*.js', 'dist/js', 'bundle.js')
const images = gulpy.images('src/img/**/*', 'dist/img')
const copy = gulp.parallel(
  gulpy.copy('src/fonts/**/*', 'dist/fonts'),
  gulpy.copy('src/**/*.html', 'dist')
)
const copyNpm = gulpy.copyNpm('dist/node_modules')
const version = gulpy.version(['dist/**', '!dist/node_modules/**', '!**/*.html'])
const replaceVersion = gulpy.replaceVersion('dist/**/*.html', 'dist')
const npmVersion = gulpy.npmVersion()
const clean = gulpy.clean(['dist/**'])

// export
exports.default = gulp.series(clean, gulp.series(sass, js, bundle, images, copy, copyNpm))
if (gulpy.isProduction()) {
  exports.default = gulp.series(exports.default, version, replaceVersion, npmVersion)
}
exports.watch = gulpy.watch()


Methods

  • sass(src, dist)
  • js(src, dist)
  • bundle(src, dist, filename)
  • images(src, dist)
  • clean(dist)
  • copy(src, dist)
  • copyNpm(dist)
  • version(src)
  • npmVersion() generate a cache manifest for node_modules (useful for cache busting)
  • watch() auto watch all configured tasks
  • isProduction() return true if the flag --production or --prod is used

src and distcan be glob strings (https://gulpjs.com/docs/en/getting-started/explaining-globs)

Local development

./node_modules/gulp/bin/gulp.js watch

You can also use browsersync:

./node_modules/gulp/bin/gulp.js watch --proxy http://localhost:8000

Production:

./node_modules/gulp/bin/gulp.js --production

It will automatically handle production requirement (like files minification) and generate a manifest file for cache busting.

FAQs

Package last updated on 08 Oct 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