0

The 0.22.0 version of superset is currently in development.

I am looking for a handy way to change the code in the jsx file and see how it actually works and works.

For example, line 59 of $ SUPERSET_HOME / superset / assets / javascript / addSlice / AddSliceContainer.jsx file looks like this:

{t ('Choose a datasource')} 

I want to change this as follows.

{t ('Choose a DATABASE')}

And when I save and refresh it, the changes do not take effect. Restarting superset runserver does not work either.

In order to apply this, I did the following:

  1. Go to the $ SUPERSET_HOME / superset / assets folder
  2. Run the yarn run build again
  3. Go to $ SUPERSET_HOME folder
  4. Run python setup.py install again
  5. Run the superset runserver again

I was able to verify that my jsx changes were applied after I did the above. But I think this process is too inefficient and time consuming. And I believe there will be a good way to check my changes without repeating the above process.

I am concerned that it may be related to configuration files such as webpack or package.json, but I do not know for sure.

But I have no idea about it.

TylerH
  • 20,799
  • 66
  • 75
  • 101
  • Under superset/assets in package.json you will see a dev command, run `npm run dev`. You will also have to build superset so that is used locally and not from pythons package list,then changes are reflected without having reinstall constantly. – will7200 Jun 19 '18 at 15:58

1 Answers1

1

You can use the command yarn run build --watch to watch and validate the changes you make in the jsx files. This will essentially help in checking for any syntax errors while you're writing the jsx models.

However, to reflect these changes, you will have to build superset again (python setup.py install) and restart the server. :(