Code Monkey home page Code Monkey logo

gulp-process's Introduction

Arcane Build Process

Currently built on Gulpjs

Install on a new project

  1. npx install-peerdeps --dev arcane-gulp
  2. Create a gulpfile.js
    const tasks = require('arcane-gulp');
       
    tasks.config({
       source: {
           file: ['test/files/**/*.*'],
           image: 'src/images',
           script: 'test/scripts',
           style: 'test/styles/*.scss',
       },
       destination: {
           image: 'public/assets/images',
           script: 'public/assets/scripts',
           style: 'public/assets/styles',
           file: 'public/assets',
       },
    });
    
    // Gulp does not support ES module exports, default to older syntax to
    // expose tasks to Gulp CLI
    module.exports = tasks;
  3. Add the following tasks to your package.json
      "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development gulp",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production gulp"
      }

gulp-process's People

Contributors

jamiesonroberts avatar

Stargazers

Thomas Navarro avatar

Watchers

James Cloos avatar John D'Orsay avatar  avatar Chris Wright avatar Liam Stewart avatar James Michael avatar

gulp-process's Issues

Build process gets stuck on error

Errors in code during gulp watch will display in console and build process will not break. However, when errors are resolved, the build process will not rebuild. This forces me to manually stop and restart the build.

Errors should either break the build process or (preferably) gulp should be listening for the error to be resolved and trigger a rebuild on its own.

Tests

Each gulp task should be testable and create files/return properly given properly formatted inputs, and should also consume errors and return gracefully.

CLI flag to skip compression of js and css on production

Currently on the production environment it always compresses the output, it would be handy to have a flag to disable this for deploying to a staging server so we can see the uncompressed but processed files (for scripts and styles) to help with debugging.

Gulp ignoring JS files

Gulp watch isn't looking at JS files. Any changes to the JS forces user to rebuild to see their changes.

Javascript Compression

Currently the Rollup config compresses the output regardless of environment which makes it hard to debug local builds

Only run tasks as needed

Only include and run tasks that have been defined in the configuration object to only run what is needed per project

Related to #3

Image Processing - `removeViewBox` Setting Not Respected in imagemin.svgo

Experiencing errors with removeViewBox settings. In this plugin, removeViewBox is set to false, which should disable the functionality outlined here:
https://github.com/svg/svgo/blob/master/plugins/removeViewBox.js

However, if viewBox attribute in an SVG file matches the height and width attribute set, viewBox attribute will be removed. This is detrimental for SVG scaling on IE11.

Issue could have to do with the format with which imagemin properties are being set.

Browsersync

Add in live reload that is configurable for each persons machine via an environment variable

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.