danawoodman / react-fontawesome

A React Font Awesome component.
https://www.npmjs.com/package/react-fontawesome
MIT License
667 stars 72 forks source link

Update API For Stack #49

Closed JacobTheEvans closed 7 years ago

JacobTheEvans commented 7 years ago

Update to show link to docs and example of input. This was done for clarity since the tag must be inside a span with the classes fa-stack fg- in order for the Icons to behave correctly.

danawoodman commented 7 years ago

Hi @JacobTheEvans thanks for the contrubtion! Unfortunately, api.md is auto generated. Could you instead make the change here: https://github.com/danawoodman/react-fontawesome/blob/master/src/index.js#L20

And then run npm run dist and commit the changes from that?

Thanks!

JacobTheEvans commented 7 years ago

Attempting to but getting a failed build on my system. Here is my debug log.

1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dist' ]
2 info using npm@4.2.0
3 info using node@v7.9.0
4 verbose run-script [ 'predist', 'dist', 'postdist' ]
5 info lifecycle react-fontawesome@1.6.1~predist: react-fontawesome@1.6.1
6 silly lifecycle react-fontawesome@1.6.1~predist: no script for predist, continuing
7 info lifecycle react-fontawesome@1.6.1~dist: react-fontawesome@1.6.1
8 verbose lifecycle react-fontawesome@1.6.1~dist: unsafe-perm in lifecycle true
9 verbose lifecycle react-fontawesome@1.6.1~dist: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/home/jacob/Documents/react-fontawesome/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
10 verbose lifecycle react-fontawesome@1.6.1~dist: CWD: /home/jacob/Documents/react-fontawesome
11 silly lifecycle react-fontawesome@1.6.1~dist: Args: [ '-c',
11 silly lifecycle   'npm run format && npm run build && npm test && npm run docs' ]
12 silly lifecycle react-fontawesome@1.6.1~dist: Returned: code: 1  signal: null
13 info lifecycle react-fontawesome@1.6.1~dist: Failed to exec dist script
14 verbose stack Error: react-fontawesome@1.6.1 dist: `npm run format && npm run build && npm test && npm run docs`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid react-fontawesome@1.6.1
16 verbose cwd /home/jacob/Documents/react-fontawesome
17 error Linux 4.4.0-83-generic
18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dist"
19 error node v7.9.0
20 error npm  v4.2.0
21 error code ELIFECYCLE
22 error errno 1
23 error react-fontawesome@1.6.1 dist: `npm run format && npm run build && npm test && npm run docs`
23 error Exit status 1
24 error Failed at the react-fontawesome@1.6.1 dist script 'npm run format && npm run build && npm test && npm run docs'.
24 error Make sure you have the latest version of node.js and npm installed.
24 error If you do, this is most likely a problem with the react-fontawesome package,
24 error not with npm itself.
24 error Tell the author that this fails on your system:
24 error     npm run format && npm run build && npm test && npm run docs
24 error You can get information on how to open an issue for this project with:
24 error     npm bugs react-fontawesome
24 error Or if that isn't available, you can get their info via:
24 error     npm owner ls react-fontawesome
24 error There is likely additional logging output above.
25 verbose exit [ 1, true ]

Im running node v7.9.0 Is this just a problem with my system I am using ubuntu linux.

gavingregory commented 7 years ago

Hi @JacobTheEvans, see PR #50 for the fix to your issue.

in short, the format script is broken and just needs --prettier.single-quote changed to --single-quote and --prettier.no-semi changed to --no-semi.

tested on ubuntu linux.

JacobTheEvans commented 7 years ago

Thanks that works. I will open a new pull request since I am also changing the package.json to work on linux.