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

gulpzilla

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulpzilla

common gulp tasks to shaaaare

  • 1.1.0
  • Source
  • npm
  • Socket score

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

gulpzilla

Some common gulp files to shaaaare

It consists of gulpies:

  • gulp/browserify.js
  • gulp/sass.js
  • gulp/bower.js
  • gulp/jest.js

babel is used in both gulp/browserify and gulp/jest

Note: create.babelrc to add your app specific presets/plugins.

Usage

Install

$ npm install gulpzilla --save-dev                 

Create gulpfile.js

var config; // = {...see Conguration};
var gulp = require('gulpzilla')(config);

Add npm run jest script in package.json

 "scripts": {
    "test": "eslint src/js/ && npm run jest",
    "jest": "NODE_PATH=src/js:node_modules jest"
  },
  "jest": {
    "scriptPreprocessor": "<rootDir>/node_modules/babel-jest",
    "testPathDirs": [
      "<rootDir>/__tests__"
    ],
    "testPathIgnorePatterns": [
      "pending"
    ],
    "unmockedModulePathPatterns": [
      "node_modules",
      "utils",
      "constants",
      "__mocks__"
    ],
    "modulePathIgnorePatterns": []
  },

Run in Terminal

$ gulp # default tasks to run browserify, bower, compile sass 
$ gulp watch # tasks to watch changes js/sassand to compile
$ gulp test # tasks to run all test suites
$ gulp test-one # tasks to run one test suite with related changed file

Configuration

var config = {
	debug: true, // browserify debug mode (for sourcemaps)
	publicDir: './public', // public directory to serve assets 
}

config.js = {
    srcDir: './src/js', // javascript source directory
    target: './src/js/index.js', // entry point for browserify
    
    distDir: './public/js', // directory for bundled javascript
    distFilename: 'bundle.js' // filename for bundled javascript
}

config.sass = {
    srcDir: './src/sass', // sass source directory
    target: './src/sass/index.js', // entry point for sass
    
    distDir: './public/css', // directory for bundled css
    distFilename: 'bundle.css', // filename for bundled css
    
    bowerCopy: ['fontawesome'], // array of gulp copy task after bower
    bowerDir: './vendor' // directory where bower.json is
}

config.jest = {
    srcDir: './__tests__', // test files directory
    noStackTrace: true // jest should/not print stack trace on error
}

Keywords

FAQs

Package last updated on 13 Jun 2016

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