5/31/2018 - 4:29 PM

Add Custom JS to FoundationPress

  1. Create new admin.js file in src/assets/js directory and add your code to it. If you're going to use jquery, make sure to add import $ from 'jquery'; at the top of the file.
  2. In config.yml add src/assets/js/admin.js to PATHS.entries.
  3. Enqueue the script conditionally in library/enqueue-scripts.php.
  4. Run gulp / npm start