Comments (4)
Hello,
Yeah, I see the bug has been fixed now. Thanks for the quick response!
By the way, I also wrote an article about Agrippa here:
https://blog.bitsrc.io/create-react-components-from-the-command-line-with-agrippa-621a6f4d19e8
I hope more people know about this tool because it's very useful 👍
from agrippa.
Hi @nitzanhen
I just did a further debug with the --debug
option and it seems --typescript
option is set to true
even when tsconfig.json
is not found.
Take a look at the following output from the --debug
command:
agrippa gen button --debug true
[DEBUG]: Agrippa v1.1.0
[DEBUG]: Looking for tsconfig.json...
[DEBUG]: Looking for .agripparc.json...
[DEBUG]: Looking for .package.json...
_[DEBUG]: No tsconfig.js found._
[DEBUG]: .agripparc.json found!
[DEBUG]: path: /Users/nsebhastian/Desktop/Sandbox/example-app/.agripparc.json
[DEBUG]: config: { styling: 'css', props: 'none' }
[DEBUG]: package.json found!
[DEBUG]: path: /Users/nsebhastian/Desktop/Sandbox/example-app/package.json
[DEBUG]: content: {
name: 'example-app',
version: '0.1.0',
private: true,
dependencies: {
'@testing-library/jest-dom': '^5.11.4',
'@testing-library/react': '^11.1.0',
'@testing-library/user-event': '^12.1.10',
react: '^17.0.2',
'react-dom': '^17.0.2',
'react-scripts': '4.0.3',
'web-vitals': '^1.0.1'
},
scripts: {
start: 'react-scripts start',
build: 'react-scripts build',
test: 'react-scripts test',
eject: 'react-scripts eject'
},
eslintConfig: { extends: [ 'react-app', 'react-app/jest' ] },
browserslist: {
production: [ '>0.2%', 'not dead', 'not op_mini all' ],
development: [
'last 1 chrome version',
'last 1 firefox version',
'last 1 safari version'
]
}
}
[DEBUG]: baseDir option, before resolving, is undefined
[DEBUG]: No baseDir specified, resolving relative to cwd
[DEBUG]: Generating component...
[DEBUG]: config: {
name: 'button',
debug: true,
styling: 'css',
props: 'none',
children: false,
_typescript: true,_
flat: false,
overwrite: false,
destination: '.',
stylingModule: true,
importReact: true,
postCommand: undefined,
baseDir: '/Users/nsebhastian/Desktop/Sandbox/example-app/src',
allowOutsideBase: false
}
As you can see, the output says No tsconfig.js found
but typescript: true
just below the Generating component...
line
from agrippa.
(I closed this by mistake, sorry.)
Thank you for reporting this awkward bug! You're most correct, if a tsconfig.json
file is not found, the project is assumed to be Javascript by default, and jsx
files should be generated.
This should be fixed in v1.1.1; I fixed two other, small bugs along the way. Please test it out!
Also, your included debug
output sent me in the right direction, so thanks again!
from agrippa.
Your article is great! Thank you for writing about Agrippa!
from agrippa.
Related Issues (20)
- Add unit tests for `strings` utils. HOT 1
- Set up E2E tests HOT 1
- Add support for MUI 5 HOT 1
- Fix generation bug with `--children`
- Index file is listed twice in CLI output (v1.3.0) HOT 1
- More examples? HOT 4
- Fix `props` default value logic HOT 1
- Update the JSON schema for v1.3.0 HOT 3
- Make integration test Dockerfile version-agnostic HOT 1
- Have option to use type instead of interfaces for component props HOT 6
- Add support for this component file structure HOT 7
- Add component name variables to post-command vars HOT 1
- Typo in the warning for upates HOT 2
- Add support for types HOT 1
- Also stub the test file as well? HOT 6
- Update JSON schema for v1.4.0 HOT 2
- Default option of `importReact` is not aligned with the documentation HOT 2
- Add support for Tailwind CSS? HOT 1
- What to do with not existing properties in docs but existing in JSON schema? HOT 3
- Create tsx/jsx file at destination without child folder HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from agrippa.