Giter VIP home page Giter VIP logo

Comments (11)

satya164 avatar satya164 commented on April 23, 2024

I'm wondering seeing so much 'Mac-first approaches' in React land. Shouldn't traditional MS Windows dev-environments supported from the beginning?

We don't use windows and it's extremely difficult for us to verify that everything works fine on windows. It's mac-first, because we use macs to develop it.

Though it would be great I people who actually use windows can send PRs to fix bugs on windows. And probably tests too, to make sure that we don't break windows.

Shouldn't traditional MS Windows dev-environments supported from the beginning?

It should be, but most of the developers here work on mac, and it's impossible to verify that it'll work on windows. PRs welcome.

Tried to hint this issue with rimraf in package.json, but then the install breaks at

I personally prefer del-cli. If you could figure out why it's not working, it'd be awesome.

from react-navigation.

Steviey avatar Steviey commented on April 23, 2024

I simply did this for function split() in compile-docs.js: "docs"+path.sep

Next error then causes 'mkdir', which probably can be hinted by https://www.npmjs.com/package/mkdirp on Windows, or even without any third party hint. But then it has to be a node.js - convention or another neutral thingy.

All in all it needs a cross-platform install (very common these days, should be preferred).
Easy for professionals to implement, while keeping other OS's in mind. Not so easy for beginners :-).
Wondering how I could install RN without such issues on Win 7.

Added PR, but unfortunately there is a lot more to do, which could have been avoided.

from react-navigation.

Steviey avatar Steviey commented on April 23, 2024

Update:

I also managed to 'node.jsish cross platformarize' this from package.json:

"watch-rn": "node scripts/watch-rn",
"watch-web": "node scripts/watch-web",
"build-rn": "node scripts/build-rn",
"build-web": "node scripts/build-web",

Example:

var shell = require('shelljs');
shell.mkdir('-p', 'lib/views/');
shell.cp('-R', 'src/views/assets', 'lib/views/assets');
process.env.BABEL_ENV = 'publish-web';
shell.exec('babel src -d lib');

So who has fun to translate this into cross platform node.js (last step)?

"build-dot-flow": "find ./src -name '*.js' -not -path '*/__tests__*' | while read filepath; do cp $filepath echo $filepath | sed 's/\\/src\\//\\/lib\\//g'.flow && cp $filepath echo $filepath | sed 's/\\/src\\//\\/lib-rn\\//g'.flow; done",`

Or is it time for: https://github.com/shelljs/shelljs again?

from react-navigation.

Steviey avatar Steviey commented on April 23, 2024

Update:

Since there seem to be no '-not -path flag' available in shelljs, I would suggest
for the last part to make cross platform, this with a simple directory exception:
http://stackoverflow.com/questions/25460574/find-files-by-extension-html-under-a-folder-in-nodejs
But I have no idea what sed does, and why it sits in a pipe.
Any suggestions?

from react-navigation.

satya164 avatar satya164 commented on April 23, 2024

@Steviey Thanks a lot for looking into it

Since there seem to be no '-not -path flag' available in shelljs

So this is what -path does according to the manpage

image

I guess we can just filter out paths which have __tests__ in their pathname.

But I have no idea what sed does

sed is used to replace part of text here. For example, echo '/src/some/path' | sed 's/\\/src\\//\\/lib\\//g' will become /lib/some/path. It just replaces the text /src/ with /lib/.

and why it sits in a pipe

pipes are used to communicate between shell commands, the output of what's on the left side is passed to sed

from react-navigation.

Steviey avatar Steviey commented on April 23, 2024

Now I see. So it could be done by a simple
str.replace("src", "lib")
in a 'looped file traversal' from the link above (including a copy-action).
followed by a second
str.replace("src", "lib-rn")
in a second 'looped file traversal' from the link above (including a copy-action).

As far as I understand it duplicates js-files to .flow files which have src in there name.
Am I right?

from react-navigation.

Steviey avatar Steviey commented on April 23, 2024

I'm a little bit confused and need a clarification.

I don't know how the files should look like after...

sed 's/\/src\//\/lib\//g'.flow and
sed 's/\/src\//\/lib-rn\//g'.flow

...respective a string replace and a copy.

I need before and after state of example files.

Currently I can't see any files ending with 'flow'.

from react-navigation.

satya164 avatar satya164 commented on April 23, 2024

It needs to copy files from /src to lib/ and lib-rn/ folder and adds .flow extension to them

image

from react-navigation.

Steviey avatar Steviey commented on April 23, 2024

Thank you, worked out.
But currently my complete RN environment is broken...looking forward to fix this.

from react-navigation.

satya164 avatar satya164 commented on April 23, 2024

Thank you, worked out

Great!

But currently my complete RN environment is broken...looking forward to fix this.

Ouch. Hope you fix it soon

from react-navigation.

Steviey avatar Steviey commented on April 23, 2024

already fixed.

from react-navigation.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.