Page MenuHomePhabricator

Wrap gulp tasks in NPM scripts to avoid global gulp dependency
Closed, ResolvedPublic

Description

Build tasks such as gulp watch --portal wikipedia.org should be wrapped in NPM scripts like npm watch --portal wikipedia.org so that developers don't have to install Gulp globally and can instead rely on the local node_modules version.


UPDATE: These npm tasks have been updated during the migration to Gulp 4.

  • npm run start will now update the page stats, watch for changes in the wikipedia.org dev dir, and start a dev server
  • npm run dev-server will now start a dev server in the wikipedia.org dev dir.
  • npm run test will run gulp -- lint.

The documentation however still needs to be updated to reflect these changes.

The file in portals/docs/development/getting_started.md can be shortened considerably since the portals now do provide a dev-server. The section about running Python or PHP can be removed and replaced with a note about running npm run dev-server instead, and a note about running npm run start can be added too.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Vvjjkkii renamed this task from Wrap gulp tasks in NPM scripts to avoid global gulp dependency to pedaaaaaaa.Jul 1 2018, 1:11 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from pedaaaaaaa to Wrap gulp tasks in NPM scripts to avoid global gulp dependency.Jul 1 2018, 3:43 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.

@Bharatkhatri351 Are you still working on this? It has almost been a week, so just checking :)

@SarthakKundra Actually i was not able to run this project in my pc because of a some path issue. As @Jdrewniak told me he will fix this issue in somedays
(for window users). So when the issue will be fix i will start working on it.
But if This project somehow is running on you pc you can resolve this issue.:)

hey @Jdrewniak i learned basics of gulp to understand this issue..
Can you tell me is i am thinking right or not
According to this we have to convert all gulp function in npm scripts.
like compilation and minification watch CreateSvgSprites etc.
and totally remove gulp.js from it

@Bharatkhatri351: This task is about wrapping, so this task is not about removing Gulp. See also c5fdd747 for the "update" mentioned in the task description.

@Bharatkhatri351 if you cannot able to fix the issue can I work on this?

@Shivas1000 i am still working on this issue.
actually i am new to gulp so i am learning it to solve the issue.
But if you have prior experience with gulp
u can solve this.. :)

image.png (768×1 px, 61 KB)

hello @Jdrewniak i globally uninstalled gulp from my pc
but i am still able to run wikipedia.org
image.png (768×1 px, 95 KB)

without glopal gulp dependency.
can you tell me why this is happening...
why i am not gettiing any error.

May be gulp global dependencies is not required.

Actually i am confused. can you help me how i proceed further.
cc-@Aklapper

can you tell me why this is happening...

Please see the task description: "developers don't have to install Gulp globally and can instead rely on the local node_modules version" together with "UPDATE".

can you tell me why this is happening...

Please see the task description: "developers don't have to install Gulp globally and can instead rely on the local node_modules version" together with "UPDATE".

Oh sorry its my mistake.
Now I got this.
Thanks : )