Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix npm run new #909

Merged
merged 5 commits into from
Jul 24, 2020
Merged

Fix npm run new #909

merged 5 commits into from
Jul 24, 2020

Conversation

illepic
Copy link
Contributor

@illepic illepic commented Jul 24, 2020

Pull Request

Closes Issue #905

Issue Description

npm run new was failing to write out files with proper extensions. Also updates deps.

Summary of Changes

Yeoman released a fix to internal file writing mechanisms that invalidated a stopgap measure we had in place.

@illepic illepic requested a review from a team July 24, 2020 04:44
path.extname = ext;
// Remove extension ('.twig') from basename, replace 'pattern" with name
path.basename = path.basename.replace(ext, '').replace('pattern', name);
// basename is ie '_patterns.twig' here
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the stuff above here was a duct tape fix due to a quirk in Yeoman. Looks like Yeoman fixed the quirk.

@illepic illepic self-assigned this Jul 24, 2020
@juranosaurustechs
Copy link

Possibly unrelated, we've had issues when yoeman is installed globally... The end result being that a new component is created in the directory/project where the theme was last installed. Does this fix that or is that a whole new issue?

@illepic
Copy link
Contributor Author

illepic commented Jul 24, 2020

@adamjuran this file should indicate to Yeoman the "root" from which to run. npm run new should be reaching for locally-installed yeoman first as well. I'd be super interested in your experience. If you can replicated it, hit me with a ticket and I'll tackle. We're going to use yeoman a lot for the project generator in Particle 11, so this is great to know!

@illepic illepic merged commit bd5a73b into master Jul 24, 2020
@illepic illepic deleted the fix/fix-new branch July 24, 2020 16:24
madhaze added a commit that referenced this pull request Jul 24, 2020
* master:
  Fix `npm run new` (#909)
  feature: revise layout and add bottom spacer option (#903)
  issue-906: phpcs validation. (#907)
  bug: update particle namespace and update details class (#900)
  Remove reference to composer.json in editorconfig (#881)
  Update dependency yeoman-generator to ^4.11.0 (#866)
  July 02, 2020 npm dependencies (#882)
  task: update js config for forms (#880)
  Feature :: Add Tailwind Custom Forms Plugin + Drupal Templates (#859)
  PHP deprecated warning: Swapping parameters order in implode() function. (#858)
  NPM update to fix eslint regression (#865)
  Update dependency eslint to ^7.3.0 (#855)
  Update dependency terser-webpack-plugin to ^3.0.6 (#853)
  Update dependency webpack-cli to ^3.3.12 (#852)
  Update dependency stylelint to ^13.6.1 (#850)
  Update dependency eslint-import-resolver-webpack to ^0.12.2 (#846)
  Update Font Awesome (#854)
  NPM updates (#843)
  Prettier now runs against twig, update files with new linting (#839)

# Conflicts:
#	apps/pl-default/pattern-lab/_patterns/01-atoms-demo/image/images.twig
#	source/default/_patterns/01-atoms/image/_image--bg.twig
#	source/default/_patterns/01-atoms/image/_image--picture.twig
#	source/default/_patterns/01-atoms/image/_image.twig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants