Issue #767Opened January 16, 2018by frank-tenzing0 reactions

Generate a new grapes.min.js after make changes to grapes.js

Question

Code SnippetTEXT
Hi guys - happy new year,

I'm currently doing some investigation of GrapesJs for our further project.

The question is I fellow the https://github.com/artf/grapesjs/issues/196 to minify a new grapes.min.js, but when I deleted the grapes.min.js and tried to make some change in the grapes.js which is in the dist folder, for example, changed the logic in the **removeClass** function:

 `function removeClass(v, c) {
    if (v.classList) {
      v.classList.remove(c);
    } else {
      if (v.className instanceof SVGAnimatedString) {
        // doing something
      } else {
        v.className = v.className.replace(c, "");
      }
    }
  }`

, and then run the command `npm run build` to generate a new grapes.min.js, but the modifications were reverted back to what it was after running that command:
`function removeClass(v, c) {
    if (v.classList) {
      v.classList.remove(c);
    } else {
      v.className = v.className.replace(c, "");
    }
  }`

how can I make the changes come into effect in the grapes.min.js after making changes to **grapes.js** ? Any other config change should I make? Thank you very much!

Answers (2)

artfJanuary 17, 20180 reactions

@frank-tenzing you shouldn't edit files in the dist folder, those are generated every time by npm run build You have to edit files inside src. BTW that code seems to come from cash library, not grapesjs itself (about the issue let's keep talking here #768 )

lock[bot]September 18, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.