-
Notifications
You must be signed in to change notification settings - Fork 2
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
Nx migration, refactor main package as core, publish auxiliary packages instagram & linkedin #92
Conversation
Codecov Report
@@ Coverage Diff @@
## master #92 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 26 32 +6
Lines 612 637 +25
Branches 164 166 +2
=========================================
+ Hits 612 637 +25
Continue to review full report at Codecov.
|
- consolidating with main webpack.config.js that creates the main botmation package in /dist - referring to 'botmation' npm package as 'core'
It's been a few weeks since I've last written code for this project. I mistakenly created this branch off master instead of dev. I might delete the food for thought edit: maybe going forward, delete dev and in the future, when it's worth the cost, do a dev branch except name it something more useful like |
- support core & instagram
- tested locally, had to upgrade types/puppetter
need to pull in changes from #93 |
- considering moving to monorepo w/ Nx
exploring Nx mono-repo for lib publishing thus far, locally, got a nx repo setup with botmation v3.0 building and working (the dist build package installs locally in a separate repo and works fine with doc's installation guide) setup an org on npm intention is to publish botmation 3.0 as then publish site specific packages as |
core & instagram packages builds work, dists' codes look good however in a local test, there is a Module not found error from the instagram package when referencing the peerDependency in a local test with just the |
got both packages building in Nx environment and published on npm v0.0.1 @botmation/core and @botmation/instagram in a local environment, the published packages are missing library may switch Botmation over to Nx monorepo edit: edit2: |
added tests from main repo into the new local nx repo wip edit: see |
linkedin package code setup; punting testing/setting up the dist/npm package now libs are test lib has shareable test files & mock server HTML files unit test files are now coupled with their files in the respective libs. since all tests for botmation focuses on core, all tests have been moved into that lib, inside /actions, /helpers, /etc -- this is a diversion from the current repo structure that separated tests from the lib code |
- libs: core (was botmation v3), instagram, linkedin, test - core & instagram can be published but need tslib added - linkedin punted for publishing - nx test core runs all pre-existing tests for environment but requires an additional script running `npm run localtestsite` - to be integrated with jest in future dev
impressed with how easy it was to migrate botmation to Nx excited for this upgrade |
existing CI for automated testing will break and be adjusted in subsequent PR refraining from scope creep as this PR's focus is publishing an instagram package (now including separate core package under an organization) |
need to restore GIT files (ie changelog) and other CI config files (ie travis.yml) |
could publish as minor releases v0.1.x and reserve major v1 for what was "v4" |
in the future, can consolidate the botmation-docs repo with this one as an app |
- remove /assets from example build
- test/server moved into /assets & localtestsite script updated - mocks & localtestsite (selectors + urls) moved into lib core/mocks - with new barrel - core tests passing
- with mocks included in core lib, no more circular dependency so mock can be strongly typed without duplicating code
- example of using puppeteer-cluster - works with current Puppeteer v7 (at least in this basic test)
- concurrently npm scripts to run tests
- text for CI logs - json for code coverage collecting
issue #94 has been resolved; TravisCI passing is no longer a false positive |
- polished readme's - polished notes
- would like to add e2e tests for auxiliary packages
- @botmation/core, the only peer dependency of an auxiliary botmation package is the major version anchor for all @Botmation packages
Kudos, SonarCloud Quality Gate passed!
|
Description
The main
webpack.config.js
file builds the main Botmation npm package.Goal is to make it dynamic so it can build other npm packages, for starters, the
botmation-instagram
package.Solution
Replace developing the build script(s) with Nx.
Botmation v3.0 published as @botmation/core v1.0 & Instagram specific published as @botmation/instagram v1.0
Related
Botmation npm
Checklist
Instagram npm package barrel file for all instagram stuffWebpack build dynamic flag (CLI ?)Webpack can dynamically build dist packagesinstagramcoreReadme specific to the Botmation-Instagram package (botactions, helpers, etc)dynamic package.json for the npm package (core or instagram)custom tsconfig for instagramnx test core
npm run localtestsite
in tandem withnx test core
as the local HTTP server is required for some e2e testsDocumentation
Update the Instagram documentation page to include a link to the npm package
Extra