Skip to content

Commit

Permalink
create-play: add support for older node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
6km committed Apr 19, 2022
1 parent bf702e3 commit 42a529d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions plop-templates/component.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

import { useLocation } from 'react-router-dom';
import { getPlayById } from 'meta/play-meta-util';

import PlayHeader from 'common/playlists/PlayHeader';
Expand Down
4 changes: 4 additions & 0 deletions plopfile.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
String.prototype.replaceAll = String.prototype.replaceAll || function(string, replaced) {
return this.replace(new RegExp(string, 'g'), replaced);
};

module.exports = plop => {
plop.setHelper('trim', str => str.trim());
plop.setHelper('removeAllSpaces', str => str.replaceAll(/\s/g,''));
Expand Down

0 comments on commit 42a529d

Please sign in to comment.