Comments (8)
It is also useful for typescript but it doesn't generate index.TS...
from create-index.
By the looks of it, this change would affect only a few lines of code:
./src/utilities/readDirectory.js:36: return !_.includes(files, fileName + '.js');
./src/utilities/readDirectory.js:67: if (!isDirectory && !_.endsWith(fileName, '.js')) {
As long as this feature is implemented sticking to principles of functional programming (without use or global state variables and tested), I don't have any objections against a PR.
from create-index.
I figured I would just replace with fileName.matches(/\.jsx?$/)
On 19 Mar 2016 11:05, "Gajus Kuizinas" [email protected] wrote:
By the looks of it, this change would affect only a few lines of code:
./src/utilities/readDirectory.js:36: return !.includes(files, fileName + '.js');
./src/utilities/readDirectory.js:67: if (!isDirectory && !.endsWith(fileName, '.js')) {As long as this feature is implemented sticking to principles of
functional programming (without use or global state variables and tested),
I don't have any objections against a PR.—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#6 (comment)
from create-index.
No, that could have unwanted side-effects, e.g. someone could have Foo.js
as entry file and Foo.jsx
to contain a template. Not saying it is a good thing to do, but I have seen worse and it is a fairly likely scenario.
from create-index.
What's the status of this? @gajus ?
Would be great to just do --filetype=jsx
, or if it would just natively do JSX by default.
from create-index.
What's the status of this? @gajus ?
Not a priority for me. Will happily accept a PR.
from create-index.
It is also useful for typescript but it doesn't generate index.TS...
Would accept a PR.
from create-index.
already implemented
from create-index.
Related Issues (20)
- Feature request: Excluding specific files HOT 4
- README uses previous export syntax example HOT 1
- There is no check if the imported file has a default. HOT 2
- Add option to uppercase first char of export HOT 4
- Recursive option when using programmatically HOT 1
- Functions exported as default not picked up
- Include folder name in banner
- Importing created subdirectory index files HOT 5
- JSX Files HOT 2
- Add --output option to configure output file HOT 3
- Files with hyphen are ignored. HOT 1
- option to "disable" semicolon HOT 2
- implementation with .ts file maybe?
- [bug] can't read file or folder with "-"? HOT 5
- Tests don't work? HOT 2
- 'create-index' is not recognized as an internal or external command, operable program or batch file HOT 1
- Support creating index with default export HOT 9
- Use with typescript, add webpack plugin HOT 2
- Wrong casing in generated index.js
- Conflicts between files and folders with same name
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 create-index.