Giter Site home page Giter Site logo

Comments (6)

mrmartineau avatar mrmartineau commented on July 21, 2024

I'll get started, I think we should include:

  • trak.js via bower or included properly? My thought is to include it with bower so we can update it independently.
  • @nicbell's Shimly grunt plugin for generating js shims

Our existing helpers are quite useful, but not all are necessarily needed. We could add them to gists and link to them (the ones that aren't shims), I think these should be included:

  • log / console.log wrapper
  • cookies

The libs (html5 polyfill shims, mobile helpers etc) probably could be left out, most projects include Modernizr anyway so the html5 shims are probably not needed, and if they are, the dev can add them themselves.

The mobile libs probably aren't needed unless we are support iOS 4!

from kickoff.

ashleynolan avatar ashleynolan commented on July 21, 2024

I'm all for moving kickoff onto using Browserify. The JS setup isn't necessarily core to the framework anyway and is easily replaced, and if the compilation is included in the grunt setup, wouldn't need people to upskill much to use it.

I think it would be useful to move the mobile helpers in /js/libs/mobile into a centralised mobile.js file in the /js/helpers directory. We can then evolve this over time, and add in any mobile specific helpers as we need them.

Agree with removing html5 shiv – not needed as we use modernizr. I think we could potentially keep the polyfill directory and move it to helpers – I think we should make libs very specifically for more complex maintained libraries rather than smaller chunks of code.

Happy to start work on the initial browserify setup if we all see the value in it though.

from kickoff.

tommaton avatar tommaton commented on July 21, 2024

Browserify would be a good route to go down and I've found it to be very useful in creating a much cleaner JS.

I also would recommend https://github.com/Modernizr/grunt-modernizr for generating modernizr as it only generates what is needed creating a lighter weight version of the file.

from kickoff.

mrmartineau avatar mrmartineau commented on July 21, 2024

I tried using grunt-modernizr back in the early days of Kickoff and removed it because I found that downloading from the site, using their builder app, was easier and better (which is what I do nowadays), than the this grunt plugin. I realise that it is an entirely different beast now and generates a new modernizr file when corresponding Modernizr tests are seen, which sounds like a good idea but I am wary of using this. I think we should do some testing before including in the framework.

@tommaton can you give some more info about the plugin based on your usage? Does it slow down build times?

from kickoff.

tommaton avatar tommaton commented on July 21, 2024

when I've used the plugin I've specified the folders/files rather than setting parseFiles:true; otherwise it will go through the entire project and check all the .js, .scss & .css which will slow it down especially on larger projects.

I've also set the extra parameter to set things like shiv, mq etc which also saves time as it add's it in by default.

But I can honestly say I've not come across any performance issues

from kickoff.

mrmartineau avatar mrmartineau commented on July 21, 2024

Thanks @tommaton, it's good to hear someone else's workflow. Could you paste your settings for grunt-modernizr below? Cheers

from kickoff.

Related Issues (20)

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.