TryKickoff / kickoff

:basketball: A lightweight front-end framework for creating scalable, responsive sites. Version 8 has just been released!
http://trykickoff.com
MIT License
463 stars 59 forks source link

Production build requires optional dependencies #134

Closed CiaranPark closed 7 years ago

CiaranPark commented 8 years ago

Currently within the index.js there is a mapping function that requires all gulp tasks and their package dependencies including --optional. When running the RELEASE build, the optional packages are not installed so it fails. We need a check for RELEASE and a separate dev require list, I'll make a Pull Request for my version soon

CiaranPark commented 8 years ago

The map function mentioned

tasks.forEach(task => {
    if (task.match(/\.js$/)) {
        require(`${tasksDirectory}/${task}`);
    }
});
mrmartineau commented 8 years ago

As I previously mentioned, this bug could be fixed by moving all optionalDependencies items into the devDependencies object. I think we should keep the items in optionalDependencies so we can reduce build times on CI environments.

jpdriver commented 8 years ago

is this something we would run into using the production version of master as it exists today too? looks like we use load-grunt-tasks at the moment anyway so wouldn't this hit pretty much the same issue?

see https://github.com/TryKickoff/kickoff/blob/master/Gruntfile.js#L26

mrmartineau commented 8 years ago

@jpdriver we haven't experienced this before. I think the existing Grunt tasks aren't required-then-run, in the same way that we are using gulp for now.

mrmartineau commented 7 years ago

FYI, decided to move all optionalDependencies into devDependencies so we don't need to worry about this bug.