getchopchop / chopchop

Front end user interface primer toolkit for the pro's
https://getchopchop.github.io
MIT License
31 stars 7 forks source link

Updated build process (Gulp) #189

Closed jakecobley closed 7 years ago

jakecobley commented 7 years ago

Each build function can now be run on multiple sources, cleaned up the formatting, and split the task and path config out.

daveredfern commented 7 years ago

@jakecobley are all the commands still the same? these are just under the hood stuff?

jakecobley commented 7 years ago

None of NPM commands have changed. You still have the following:

npm run watch
npm run build
npm run build:production
gazjoy commented 7 years ago

@jakecobley there are a few things I have noticed that need changing before we can merge this.

  1. you are using "vectors" instead of "vector" in the gulpfile. Everything from now on should be singular to avoid confusion.
  2. When adding a new folder to the vector folder it doesn't get built. (It does in the current gulpfile).
jakecobley commented 7 years ago

The path object has changed to allow multiple sources, exclusions, and a third-party flag for all tasks. This allows vendor scripts and scripts from Bower/NPM modules to be minified etc.

See here:

"svgSprite":
    [
        {
            "src": "./src/img/vectors/general/**/*.svg",
            "dist": "./build/img/vectors/general/",
            "exclude": []
        },
        {
            "src": "./src/img/vectors/payments/**/*.svg",
            "dist": "./build/img/vectors/payments/",
            "exclude": []
        },
        {
            "src": "./src/img/vectors/social/**/*.svg",
            "dist": "./build/img/vectors/social/",
            "exclude": [],
        }
    ],

I've not had time to add the option to run on all files within a directory. Just committed a HACK to solve this until I have time to do it properly.

gazjoy commented 7 years ago

@jakecobley this works now thanks.

gazjoy commented 7 years ago

pasted_image @jakecobley just found the watch task gives a fat error, can you fix as soon as possible? Hoping to get this into the next release, (before end of Feb).

jakecobley commented 7 years ago

Tonight. If not I'm in the office tomorrow anyway.

jakecobley commented 7 years ago

Patched in PR #191