Comments (6)
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.
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.
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.
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.
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.
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)
- kickoff-react HOT 2
- Docs site down HOT 4
- Kickoff 8 checklist HOT 20
- Fix SVG minification HOT 3
- Finalise SVG sizing & correct CSS workflow
- Form themes HOT 1
- Hot module reloading HOT 1
- Production build requires optional dependencies HOT 5
- Generated CSS file not respect the name given in config.js HOT 1
- Kickoff Builds HOT 3
- problem with current grunt-contrib-imagemin version in package.json HOT 7
- When selecting statix in Yeoman generator missing comma in Gruntfile HOT 1
- Issue with grunt-icon/NPM, causing error HOT 1
- Remove Placeholder Mixin
- Version 7 - TODO HOT 27
- Moving to Gulp HOT 1
- KO FlexGrid HOT 11
- Broken link in Docs HOT 1
- Error in styleguide.scss HOT 3
- IE11 Printing Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kickoff.