As said here : https://www.drupal.org/node/2655142#comment-12170581, and as doostinharrell responded, I'm created this issue to talk about the use of bower in the stater kit.

The 2 packages its call and install are available through npm. Furthermore, as bower is now in maintenance stage only, and foundation leaving its use in its package to use npm instead (https://github.com/zurb/foundation-zurb-template/blob/master/package.json) .

I propose to remove the bower install, and use the package.json instead.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

FlorisMoriceau created an issue. See original summary.

HongPong’s picture

I support this +1 . If we can patch and test it I will put it in.

doostinharrell’s picture

@HongPong I'm working on a patch now. I will hit you back once it is ready to review.

doostinharrell’s picture

HongPong’s picture

Also if D7.x gets a foundation 6.x branch I think the same thing should be done, dumping bower, i noted here #2656046: Zurb's Foundation 6 for Drupal 7. thanks doostinharrell :)

doostinharrell’s picture

Attached is a patch that moves dependencies from bower.json to package.json as well as path updates.

doostinharrell’s picture

Assigned: doostinharrell » Unassigned
Status: Active » Needs review
HongPong’s picture

It went up to 6.4.1 so I think we should probably shift up to that sooner or later. However there are enough breaking changes it is probably another task to test everything. See https://github.com/zurb/foundation-sites/releases/ for the notes on 6.4.0 updates.

If this was done here, then #2895757: STARTER installs outdated version of Foundation (6.3.1 to 6.4.1) would be moot.

doostinharrell’s picture

Yea, if I had more time today I would have updated to 6.4.1 and tested everything. I haven't had a chance to review the changelog to see if any of the UI patterns have been updated etc so I elected to keep the versions the same to avoid any breaking changes. But yes getting XY Grid into this project should definitely be a priority.

I may be able to make some time on Monday to test and update accordingly.

HongPong’s picture

Makes sense. Let's put that stuff on the other thread since it's more complicated. If someone else can test this then I can roll it in and we get done with bower on this branch.

Edit ... also readme.txt should be updated in the same patch, it has a lot of bower references. I can probably do this.

doostinharrell’s picture

Hi @HongPong thanks for catching that.

The attached patch should cover all of the necessary updates to the readme files. I also removed the .bowerrc files.

doostinharrell’s picture

Drush sub-theme creation was completing however there was an error regarding the bower.json as drush_op was trying to replace content in a file that didn't exist. This has been resolved in the latest patch.

doostinharrell’s picture

Alright more progress...

As part of this new attached patch I have also addressed issue #2895757 and updated to Foundation 6.4.1. This includes updates to both zurb_foundation and STARTER to use Float Grid by default. I also added some additional documentation to STARTER.scss explaining how disabling Float Grid in favor or XY Grid would also mean they have to migrate base theme templates to their sub theme to rework markup for XY Grid compatibility.

serg2’s picture

Do we still install 6.3.1 in starter for compatibility or is this this an oversight?

diff --git a/STARTER/package.json b/STARTER/package.json
index 129133f..6a03800 100644
--- a/STARTER/package.json
+++ b/STARTER/package.json
@@ -4,6 +4,8 @@
   "devDependencies": {
     "extend": "^3.0.0",
     "del": "^2.2.0",
+    "foundation-sites": "~6.3.1",
+    "motion-ui": "~1.2.2",
     "gulp": "^3.9.1",
doostinharrell’s picture

Yes @serg2 that was an oversight. This why we perform peer review. Thanks!

HongPong’s picture

I would suggest that we stick with 6.3.1 on this issue and get that locked in first. (some are set to 6.3.1 and some 6.4.1 on the latest patch #5 here) Note the patch is +2MB because it covers this.

Really even, we could remove bower and put this on the next tagged release, since it will make the theme easier to develop from, but put the shift to 6.4.1 onto the release after that one ( #2895757: STARTER installs outdated version of Foundation (6.3.1 to 6.4.1) ) . It is better not to roll issues that are somewhat separate on the same issue/patch.

doostinharrell’s picture

Sounds good to me. Let's see if someone can review/test patch #3 then we can close this task out.

serg2’s picture

Status: Needs review » Reviewed & tested by the community

Tested zurb_foundation--remove-bower-and-use-npm-instead--2895755-3.patch

It works just as before but skips the requirement for bower, just as the IS required.

HongPong’s picture

Version: 8.x-6.x-dev » 7.x-5.x-dev

Looks good and is now in 8.x-6.x - thank you doostinharrell, serg2, FlorisMoriceau ! I am switching this to 7.x-5.x if anyone wants to submit a patch for that branch, or we can close this as fixed.

I think this will help with adoption a lot because bower was a sticking point for a lot of people :)

HongPong’s picture

Status: Reviewed & tested by the community » Active
doostinharrell’s picture

doostinharrell’s picture

Assigned: Unassigned » doostinharrell