-
Notifications
You must be signed in to change notification settings - Fork 271
Conversation
Codecov Report
@@ Coverage Diff @@
## master #21 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 37 39 +2
Lines 325 339 +14
=====================================
+ Hits 325 339 +14
Continue to review full report at Codecov.
|
1c99e38
to
6331bac
Compare
Squashed commits: [cca27ae] enable jest projects [e7dc4ce] wip [dd3ea7a] run in order [cf87275] define projects [69baf16] use specific version [c880cfa] ignore generator test [e9e0fd3] update travis [4bbb3c0] update travis [d63118b] update travis config [267fe08] remove config [44883e8] update travis [40580c3] reduce node version [59b6add] update ignore rule [fbbd03c] update readme [b299dfe] remove script [a988933] fix test and lint [95b7d5b] try install and not install [f4583b4] remove unnecessary files [c735329] remove eslint-config-xo [49b3106] pass lint and test [56c6def] remove git and readd
6331bac
to
2041ec9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! thanks for all the yak shaving and build debugging for this! had a couple of small comments, could fix the README post-merge if you're anxious to get it in.
👯
] | ||
], | ||
"jest": { | ||
"testPathIgnorePatterns": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you tell if this gets added to the ones generated beemo
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The jest.config.js
generated by beemo doesn't have this field by default.
This was added to avoid running the generator
tests twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I wasn't clear, just wanted to see if this ignore pattern is added to or over-writes the testPathIgnorePatterns
generated by beemo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested removing the field from package.json
and jest.config.js
remove the field completely. Probably doesn't have that in base.
I tried adding something to package.json
's testMatch
yesterday and that gets added to the jest.config.js
along with the one coming from beemo
cd superset-ui/packages | ||
mkdir superset-ui-new-package | ||
cd superset-ui-new-package | ||
yo @superset-ui/superset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this line correct? not @superset-ui/generator-superset
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is correct. yo xxx
looks for global npm packages (or npm link
'ed package) named generator-xxx
.
You will notice all yeoman
generator package names start with generator-
This is why I am tempted to name this package generator-superset
without @superset-ui
so we can call yo superset
, but that will not published under the npm org.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah got it, thanks for the explanation 👍
I think using the @superset-ui
namespace would still be good.
First, install [Yeoman](http://yeoman.io) and `generator-superset` using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)). | ||
|
||
```bash | ||
npm install -g yo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- is this recommended vs adding
yo
as adep
and getting it when you install this package? - also wondering if we should suggest they just run
npm run bootstrap
in the root, and then@superset-ui/generator-superset
+ its deps will be installed? - if we do keep the separate installs, do we need them to be global packages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1/3) This is the recommended way as there should be single yo
client. and yo
looks for generator in the global scope.
http://yeoman.io/learning/index.html
- This
README
was written in a way that this packaged can be used independent from this repo. I envision this generator can be extended to have multiple subgenerator for scaffolding independent chart plugin repo, etc. It will be more convenient to install the generator package alone without cloning this monorepo only tonpm link
the generator.
* fix: labels for many bars in bar chart * fix: nvd3 bar labels * docs: update example
🏆 Enhancements
generator-superset
package for scaffolding.@superset-ui/generator-superset
.babel
tasks forgenerator-superset
, as it is anode
application.jest
project configuration to separategenerator-superset
from others and run intestEnvironment: "node"
. (Although that was not the real issue that demolished CI in the early attempts.)Note about yeoman testing and interference with other packages
The key thing to add to
yeoman
tests, which are not normally included even from official yeomangenerator-generator
, is to change working directory back to original working directory after the test has completed.yeoman
tests switch totmp
directory and write files there. Usually this is fine for solo package. However, for a monorepo like this one, it madejest
confuses with current directory (being intmp
directory instead ofsuperset-ui
root) and interferes with other tests in sibling packages that are run after theyeoman
tests.By adding the directory switch in
afterAll()
block. Everything works fine again! 🍾