DallasMorningNews / generator-dmninteractives

Yeoman generator for DMN-flavored "interactive" pages
https://www.npmjs.com/package/generator-dmninteractives
10 stars 1 forks source link

Page-browserify generator should install jQuery by default #37

Closed allanjamesvestal closed 7 years ago

allanjamesvestal commented 7 years ago

The page-browserify generator hasn't been built to install any Javascript libraries by default. But a number of components found on the default interactive page require jQuery.

This wouldn't be a problem in the short term, because the Javascript we bring in from @dallasmorningnews/interactives_starterkit is ES5 code that loads in a CDN-sourced jQuery (which is imported in a simple script tag in ./src/templates/base.html). But in the long term, we want to move the starter kit files into a Node package that can take advantage of the NPM-installed jQuery, and do away with the separate script embed.

Having an explicitly importable jQuery install will also help users (like the interactives team) comprehend how to get started with ES6 imports — our sample ./src/js/scripts.js will provide users a demonstration of how to import jQuery and implement a $(document).ready() function.

allanjamesvestal commented 7 years ago

Closed by b53c7328d3fcc751bc3abdc68790768e4eae5621.